deleteEmailIdentityPolicy method

Future<void> deleteEmailIdentityPolicy({
  1. required String emailIdentity,
  2. required String policyName,
})

Deletes the specified sending authorization policy for the given identity (an email address or a domain). This API returns successfully even if a policy with the specified name does not exist. Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException.

Parameter emailIdentity : The email identity for which you want to delete a policy.

Parameter policyName : The name of the policy.

The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

Implementation

Future<void> deleteEmailIdentityPolicy({
  required String emailIdentity,
  required String policyName,
}) async {
  ArgumentError.checkNotNull(emailIdentity, 'emailIdentity');
  _s.validateStringLength(
    'emailIdentity',
    emailIdentity,
    1,
    1152921504606846976,
    isRequired: true,
  );
  ArgumentError.checkNotNull(policyName, 'policyName');
  _s.validateStringLength(
    'policyName',
    policyName,
    1,
    64,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/v2/email/identities/${Uri.encodeComponent(emailIdentity)}/policies/${Uri.encodeComponent(policyName)}',
    exceptionFnMap: _exceptionFns,
  );
}