deleteUserPoolDomain method
Deletes a domain for a user pool.
May throw NotAuthorizedException. May throw InvalidParameterException. May throw ResourceNotFoundException. May throw InternalErrorException.
Parameter domain
:
The domain string.
Parameter userPoolId
:
The user pool ID.
Implementation
Future<void> deleteUserPoolDomain({
required String domain,
required String userPoolId,
}) async {
ArgumentError.checkNotNull(domain, 'domain');
_s.validateStringLength(
'domain',
domain,
1,
63,
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.DeleteUserPoolDomain'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Domain': domain,
'UserPoolId': userPoolId,
},
);
}