describeIdentityProvider method
Gets information about a specific identity provider.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw NotAuthorizedException. May throw TooManyRequestsException. May throw InternalErrorException.
Parameter providerName
:
The identity provider name.
Parameter userPoolId
:
The user pool ID.
Implementation
Future<DescribeIdentityProviderResponse> describeIdentityProvider({
required String providerName,
required String userPoolId,
}) async {
ArgumentError.checkNotNull(providerName, 'providerName');
_s.validateStringLength(
'providerName',
providerName,
1,
32,
isRequired: true,
);
ArgumentError.checkNotNull(userPoolId, 'userPoolId');
_s.validateStringLength(
'userPoolId',
userPoolId,
1,
55,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSCognitoIdentityProviderService.DescribeIdentityProvider'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProviderName': providerName,
'UserPoolId': userPoolId,
},
);
return DescribeIdentityProviderResponse.fromJson(jsonResponse.body);
}