describeUserPool method
Given a user pool ID, returns configuration information. This operation is useful when you want to inspect an existing user pool and programmatically replicate the configuration to another user pool.
Learn more
- Signing Amazon Web Services API Requests
- Using the Amazon Cognito user pools API and user pool endpoints
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw OperationNotEnabledException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
May throw UserPoolTaggingException.
Parameter userPoolId :
The ID of the user pool you want to describe.
Implementation
Future<DescribeUserPoolResponse> describeUserPool({
required String userPoolId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.DescribeUserPool'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'UserPoolId': userPoolId,
},
);
return DescribeUserPoolResponse.fromJson(jsonResponse.body);
}