listIdentityPools method
Lists all of the Cognito identity pools registered for your account.
You must use AWS Developer credentials to call this API.
May throw InvalidParameterException. May throw NotAuthorizedException. May throw TooManyRequestsException. May throw ResourceNotFoundException. May throw InternalErrorException.
Parameter maxResults
:
The maximum number of identities to return.
Parameter nextToken
:
A pagination token.
Implementation
Future<ListIdentityPoolsResponse> listIdentityPools({
required int maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(maxResults, 'maxResults');
_s.validateNumRange(
'maxResults',
maxResults,
1,
60,
isRequired: true,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
65535,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListIdentityPoolsResponse.fromJson(jsonResponse.body);
}