deleteIdentityPolicy method

Future<void> deleteIdentityPolicy({
  1. required String identity,
  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.

Parameter identity : The identity that is associated with the policy that you want to delete. You can specify the identity by using its name or by using its Amazon Resource Name (ARN). Examples: user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com.

To successfully call this API, you must own the identity.

Parameter policyName : The name of the policy to be deleted.

Implementation

Future<void> deleteIdentityPolicy({
  required String identity,
  required String policyName,
}) async {
  ArgumentError.checkNotNull(identity, 'identity');
  ArgumentError.checkNotNull(policyName, 'policyName');
  _s.validateStringLength(
    'policyName',
    policyName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['Identity'] = identity;
  $request['PolicyName'] = policyName;
  await _protocol.send(
    $request,
    action: 'DeleteIdentityPolicy',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteIdentityPolicyRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteIdentityPolicyResult',
  );
}