listAccountPools method
Lists existing account pools.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The ID of the domain where exsting account pools are to be listed.
Parameter maxResults :
The maximum number of account pools to return in a single call to
ListAccountPools. When the number of account pools to be listed is greater
than the value of MaxResults, the response contains a NextToken value that
you can use in a subsequent call to ListAccountPools to list the next set
of account pools.
Parameter name :
The name of the account pool to be listed.
Parameter nextToken :
When the number of account pools is greater than the default value for the
MaxResults parameter, or if you explicitly specify a value for MaxResults
that is less than the number of account pools, the response includes a
pagination token named NextToken. You can specify this NextToken value in
a subsequent call to ListAccountPools to list the next set of account
pools.
Parameter sortBy :
The sort by mechanism in which the existing account pools are to be
listed.
Parameter sortOrder :
The sort order in which the existing account pools are to be listed.
Implementation
Future<ListAccountPoolsOutput> listAccountPools({
required String domainIdentifier,
int? maxResults,
String? name,
String? nextToken,
SortFieldAccountPool? sortBy,
SortOrder? sortOrder,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (name != null) 'name': [name],
if (nextToken != null) 'nextToken': [nextToken],
if (sortBy != null) 'sortBy': [sortBy.value],
if (sortOrder != null) 'sortOrder': [sortOrder.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/account-pools',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListAccountPoolsOutput.fromJson(response);
}