Skip to content

set_identity_dkim_enabled async

set_identity_dkim_enabled(
    identity: Identity,
    dkim_enabled: Enabled,
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> SetIdentityDkimEnabledResponse

Enables or disables Easy DKIM signing of email sent from an identity. If Easy DKIM signing is enabled for a domain, then Amazon SES uses DKIM to sign all email that it sends from addresses on that domain. If Easy DKIM signing is enabled for an email address, then Amazon SES uses DKIM to sign all email it sends from that address.

For email addresses (for example, [email protected]), you can only enable DKIM signing if the corresponding domain (in this case, example.com) has been set up to use Easy DKIM.

You can enable DKIM signing for an identity at any time after you start the verification process for the identity, even if the verification process isn't complete.

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

For more information about Easy DKIM signing, go to the Amazon SES Developer Guide.

Parameters:

  • identity (Identity) –

    The identity for which DKIM signing should be enabled or disabled.

  • dkim_enabled (Enabled) –

    Sets whether DKIM signing is enabled for an identity. Set to true to enable DKIM signing for this identity; false to disable it.

Raises:

Examples:

SetIdentityDkimEnabled The following example configures Amazon SES to Easy DKIM-sign the email sent from an identity:

>>> await client.set_identity_dkim_enabled(identity='[email protected]', dkim_enabled=True)
Source code in docs_src/capo_ses/_services/async_ses.py
async def set_identity_dkim_enabled(
    self,
    identity: "capo_ses.types.identity.Identity",
    dkim_enabled: "capo_ses.types.enabled.Enabled",
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> "capo_ses.types.set_identity_dkim_enabled_response.SetIdentityDkimEnabledResponse":
    """<p>Enables or disables Easy DKIM signing of email sent from an identity. If Easy DKIM signing is enabled for a domain, then Amazon SES uses DKIM to sign all email that it sends from addresses on that domain. If Easy DKIM signing is enabled for an email address, then Amazon SES uses DKIM to sign all email it sends from that address.</p> <note> <p>For email addresses (for example, <code>[email protected]</code>), you can only enable DKIM signing if the corresponding domain (in this case, <code>example.com</code>) has been set up to use Easy DKIM.</p> </note> <p>You can enable DKIM signing for an identity at any time after you start the verification process for the identity, even if the verification process isn't complete. </p> <p>You can execute this operation no more than once per second.</p> <p>For more information about Easy DKIM signing, go to the <a href="https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-easy.html">Amazon SES Developer Guide</a>.</p>

    Args:
        identity: <p>The identity for which DKIM signing should be enabled or disabled.</p>
        dkim_enabled: <p>Sets whether DKIM signing is enabled for an identity. Set to <code>true</code> to enable DKIM signing for this identity; <code>false</code> to disable it. </p>

    Raises:
        capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        SetIdentityDkimEnabled
        The following example configures Amazon SES to Easy DKIM-sign the email sent from an identity:

        >>> await client.set_identity_dkim_enabled(identity='[email protected]', dkim_enabled=True)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ses.types.set_identity_dkim_enabled_request.SetIdentityDkimEnabledRequest]",
    ) -> AsyncOperationResponse[
        "capo_ses.types.set_identity_dkim_enabled_response.SetIdentityDkimEnabledResponse"
    ]:
        import capo_ses._operations.simple_email_service.set_identity_dkim_enabled

        (
            output,
            http_response,
        ) = await capo_ses._operations.simple_email_service.set_identity_dkim_enabled.async_set_identity_dkim_enabled(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SetIdentityDkimEnabled")
    )
    input_: capo_ses.types.set_identity_dkim_enabled_request.SetIdentityDkimEnabledRequest = {
        "identity": identity,
        "dkim_enabled": dkim_enabled,
    }

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