putEmailIdentityDkimSigningAttributes method

Future<PutEmailIdentityDkimSigningAttributesResponse> putEmailIdentityDkimSigningAttributes({
  1. required String emailIdentity,
  2. required DkimSigningAttributesOrigin signingAttributesOrigin,
  3. DkimSigningAttributes? signingAttributes,
})

Used to configure or change the DKIM authentication settings for an email domain identity. You can use this operation to do any of the following:

  • Update the signing attributes for an identity that uses Bring Your Own DKIM (BYODKIM).
  • Update the key length that should be used for Easy DKIM.
  • Change from using no DKIM authentication to using Easy DKIM.
  • Change from using no DKIM authentication to using BYODKIM.
  • Change from using Easy DKIM to using BYODKIM.
  • Change from using BYODKIM to using Easy DKIM.

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

Parameter emailIdentity : The email identity.

Parameter signingAttributesOrigin : The method to use to configure DKIM for the identity. There are the following possible values:

  • AWS_SES – Configure DKIM for the identity by using Easy DKIM.
  • EXTERNAL – Configure DKIM for the identity by using Bring Your Own DKIM (BYODKIM).

Parameter signingAttributes : An object that contains information about the private key and selector that you want to use to configure DKIM for the identity for Bring Your Own DKIM (BYODKIM) for the identity, or, configures the key length to be used for Easy DKIM.

Implementation

Future<PutEmailIdentityDkimSigningAttributesResponse>
    putEmailIdentityDkimSigningAttributes({
  required String emailIdentity,
  required DkimSigningAttributesOrigin signingAttributesOrigin,
  DkimSigningAttributes? signingAttributes,
}) async {
  final $payload = <String, dynamic>{
    'SigningAttributesOrigin': signingAttributesOrigin.value,
    if (signingAttributes != null) 'SigningAttributes': signingAttributes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/email/identities/${Uri.encodeComponent(emailIdentity)}/dkim/signing',
    exceptionFnMap: _exceptionFns,
  );
  return PutEmailIdentityDkimSigningAttributesResponse.fromJson(response);
}