Skip to content

put_email_identity_dkim_signing_attributes async

put_email_identity_dkim_signing_attributes(
    email_identity: Identity,
    signing_attributes_origin: DkimSigningAttributesOrigin,
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    signing_attributes: Optional[DkimSigningAttributes] = None,
) -> PutEmailIdentityDkimSigningAttributesResponse

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.

Parameters:

  • email_identity (Identity) –

    The email identity.

  • signing_attributes_origin (DkimSigningAttributesOrigin) –

    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).

  • signing_attributes (Optional[DkimSigningAttributes], default: None ) –

    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.

Raises:

Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
async def put_email_identity_dkim_signing_attributes(
    self,
    email_identity: "capo_sesv2.types.identity.Identity",
    signing_attributes_origin: "capo_sesv2.types.dkim_signing_attributes_origin.DkimSigningAttributesOrigin",
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    signing_attributes: Optional[
        "capo_sesv2.types.dkim_signing_attributes.DkimSigningAttributes"
    ] = None,
) -> "capo_sesv2.types.put_email_identity_dkim_signing_attributes_response.PutEmailIdentityDkimSigningAttributesResponse":
    """<p>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:</p> <ul> <li> <p>Update the signing attributes for an identity that uses Bring Your Own DKIM (BYODKIM).</p> </li> <li> <p>Update the key length that should be used for Easy DKIM.</p> </li> <li> <p>Change from using no DKIM authentication to using Easy DKIM.</p> </li> <li> <p>Change from using no DKIM authentication to using BYODKIM.</p> </li> <li> <p>Change from using Easy DKIM to using BYODKIM.</p> </li> <li> <p>Change from using BYODKIM to using Easy DKIM.</p> </li> </ul>

    Args:
        email_identity: <p>The email identity.</p>
        signing_attributes_origin: <p>The method to use to configure DKIM for the identity. There are the following possible values:</p> <ul> <li> <p> <code>AWS_SES</code> – Configure DKIM for the identity by using <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Easy DKIM</a>.</p> </li> <li> <p> <code>EXTERNAL</code> – Configure DKIM for the identity by using Bring Your Own DKIM (BYODKIM).</p> </li> </ul>
        signing_attributes: <p>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 <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Easy DKIM</a>.</p>

    Raises:
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_sesv2.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
        capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
        capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sesv2.types.put_email_identity_dkim_signing_attributes_request.PutEmailIdentityDkimSigningAttributesRequest]",
    ) -> AsyncOperationResponse[
        "capo_sesv2.types.put_email_identity_dkim_signing_attributes_response.PutEmailIdentityDkimSigningAttributesResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.put_email_identity_dkim_signing_attributes

        (
            output,
            http_response,
        ) = await capo_sesv2._operations.simple_email_service_v2.put_email_identity_dkim_signing_attributes.async_put_email_identity_dkim_signing_attributes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_sesv2.types.put_email_identity_dkim_signing_attributes_request.PutEmailIdentityDkimSigningAttributesRequest",
    ) -> dict[str, Any]:
        import capo_sesv2.types.put_email_identity_dkim_signing_attributes_request

        return capo_sesv2.types.put_email_identity_dkim_signing_attributes_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "PutEmailIdentityDkimSigningAttributes", redact_input=_redact_input
        ),
    )
    input_: capo_sesv2.types.put_email_identity_dkim_signing_attributes_request.PutEmailIdentityDkimSigningAttributesRequest = {
        "email_identity": email_identity,
        "signing_attributes_origin": signing_attributes_origin,
    }
    if signing_attributes is not None:
        input_["signing_attributes"] = signing_attributes

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output