listUserPoolClients method
Lists the clients that have been created for the specified user pool.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw TooManyRequestsException. May throw NotAuthorizedException. May throw InternalErrorException.
Parameter userPoolId
:
The user pool ID for the user pool where you want to list user pool
clients.
Parameter maxResults
:
The maximum number of results you want the request to return when listing
the user pool clients.
Parameter nextToken
:
An identifier that was returned from the previous call to this operation,
which can be used to return the next set of items in the list.
Implementation
Future<ListUserPoolClientsResponse> listUserPoolClients({
required String userPoolId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(userPoolId, 'userPoolId');
_s.validateStringLength(
'userPoolId',
userPoolId,
1,
55,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
60,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.ListUserPoolClients'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'UserPoolId': userPoolId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListUserPoolClientsResponse.fromJson(jsonResponse.body);
}