deleteIdentityProvider method
Deletes an identity provider for a user pool.
May throw InvalidParameterException. May throw UnsupportedIdentityProviderException. 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<void> deleteIdentityProvider({
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.DeleteIdentityProvider'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProviderName': providerName,
'UserPoolId': userPoolId,
},
);
}