getIdentityProviderByIdentifier method
Gets the specified identity provider.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw NotAuthorizedException. May throw TooManyRequestsException. May throw InternalErrorException.
Parameter idpIdentifier
:
The identity provider ID.
Parameter userPoolId
:
The user pool ID.
Implementation
Future<GetIdentityProviderByIdentifierResponse>
getIdentityProviderByIdentifier({
required String idpIdentifier,
required String userPoolId,
}) async {
ArgumentError.checkNotNull(idpIdentifier, 'idpIdentifier');
_s.validateStringLength(
'idpIdentifier',
idpIdentifier,
1,
40,
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.GetIdentityProviderByIdentifier'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IdpIdentifier': idpIdentifier,
'UserPoolId': userPoolId,
},
);
return GetIdentityProviderByIdentifierResponse.fromJson(jsonResponse.body);
}