Skip to content

verify_domain_dkim

verify_domain_dkim(
    domain: Domain, *, config_overrides: Optional[SESClientConfig] = None
) -> VerifyDomainDkimResponse

Returns a set of DKIM tokens for a domain identity.

When you execute the VerifyDomainDkim operation, the domain that you specify is added to the list of identities that are associated with your account. This is true even if you haven't already associated the domain with your account by using the VerifyDomainIdentity operation. However, you can't send email from the domain until you either successfully verify it or you successfully set up DKIM for it.

You use the tokens that are generated by this operation to create CNAME records. When Amazon SES detects that you've added these records to the DNS configuration for a domain, you can start sending email from that domain. You can start sending email even if you haven't added the TXT record provided by the VerifyDomainIdentity operation to the DNS configuration for your domain. All email that you send from the domain is authenticated using DKIM.

To create the CNAME records for DKIM authentication, use the following values:

  • Name: token._domainkey.example.com

  • Type: CNAME

  • Value: token.dkim.amazonses.com

In the preceding example, replace token with one of the tokens that are generated when you execute this operation. Replace example.com with your domain. Repeat this process for each token that's generated by this operation.

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

Parameters:

  • domain (Domain) –

    The name of the domain to be verified for Easy DKIM signing.

Raises:

Examples:

VerifyDomainDkim The following example generates DKIM tokens for a domain that has been verified with Amazon SES:

>>> client.verify_domain_dkim(domain='example.com')
Source code in docs_src/capo_ses/_services/ses.py
def verify_domain_dkim(
    self,
    domain: "capo_ses.types.domain.Domain",
    *,
    config_overrides: Optional[SESClientConfig] = None,
) -> "capo_ses.types.verify_domain_dkim_response.VerifyDomainDkimResponse":
    """<p>Returns a set of DKIM tokens for a domain identity.</p> <important> <p>When you execute the <code>VerifyDomainDkim</code> operation, the domain that you specify is added to the list of identities that are associated with your account. This is true even if you haven't already associated the domain with your account by using the <code>VerifyDomainIdentity</code> operation. However, you can't send email from the domain until you either successfully <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-domain-procedure">verify it</a> or you successfully <a href="https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-easy.html">set up DKIM for it</a>.</p> </important> <p>You use the tokens that are generated by this operation to create CNAME records. When Amazon SES detects that you've added these records to the DNS configuration for a domain, you can start sending email from that domain. You can start sending email even if you haven't added the TXT record provided by the VerifyDomainIdentity operation to the DNS configuration for your domain. All email that you send from the domain is authenticated using DKIM.</p> <p>To create the CNAME records for DKIM authentication, use the following values:</p> <ul> <li> <p> <b>Name</b>: <i>token</i>._domainkey.<i>example.com</i> </p> </li> <li> <p> <b>Type</b>: CNAME</p> </li> <li> <p> <b>Value</b>: <i>token</i>.dkim.amazonses.com</p> </li> </ul> <p>In the preceding example, replace <i>token</i> with one of the tokens that are generated when you execute this operation. Replace <i>example.com</i> with your domain. Repeat this process for each token that's generated by this operation.</p> <p>You can execute this operation no more than once per second.</p>

    Args:
        domain: <p>The name of the domain to be verified for Easy DKIM signing.</p>

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

    Examples:
        VerifyDomainDkim
        The following example generates DKIM tokens for a domain that has been verified with Amazon SES:

        >>> client.verify_domain_dkim(domain='example.com')
    """

    def _handler(
        req: "OperationRequest[capo_ses.types.verify_domain_dkim_request.VerifyDomainDkimRequest]",
    ) -> OperationResponse[
        "capo_ses.types.verify_domain_dkim_response.VerifyDomainDkimResponse"
    ]:
        import capo_ses._operations.simple_email_service.verify_domain_dkim

        output, http_response = (
            capo_ses._operations.simple_email_service.verify_domain_dkim.verify_domain_dkim(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("VerifyDomainDkim")
    )
    input_: capo_ses.types.verify_domain_dkim_request.VerifyDomainDkimRequest = {
        "domain": domain
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output