listProfiles method

Future<ListProfilesOutput> listProfiles({
  1. int? maxResults,
  2. String? nextToken,
  3. String? profileNamePrefix,
  4. ProfileOwnerType? profileOwnerType,
})

List profiles.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter profileNamePrefix : An optional string added to the beginning of each profile name returned in the results.

Parameter profileOwnerType : Profile owner type.

Implementation

Future<ListProfilesOutput> listProfiles({
  int? maxResults,
  String? nextToken,
  String? profileNamePrefix,
  ProfileOwnerType? profileOwnerType,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
    if (profileNamePrefix != null) 'ProfileNamePrefix': [profileNamePrefix],
    if (profileOwnerType != null)
      'ProfileOwnerType': [profileOwnerType.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/profileSummaries',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListProfilesOutput.fromJson(response);
}