Skip to content

put_email_identity_dkim_attributes

put_email_identity_dkim_attributes(
    email_identity: Identity,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    signing_enabled: Optional[Enabled] = None,
) -> PutEmailIdentityDkimAttributesResponse

Used to enable or disable DKIM authentication for an email identity.

Parameters:

  • email_identity (Identity) –

    The email identity.

  • signing_enabled (Optional[Enabled], default: None ) –

    Sets the DKIM signing configuration for the identity.

    When you set this value true, then the messages that are sent from the identity are signed using DKIM. If you set this value to false, your messages are sent without DKIM signing.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def put_email_identity_dkim_attributes(
    self,
    email_identity: "capo_sesv2.types.identity.Identity",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    signing_enabled: Optional["capo_sesv2.types.enabled.Enabled"] = None,
) -> "capo_sesv2.types.put_email_identity_dkim_attributes_response.PutEmailIdentityDkimAttributesResponse":
    """<p>Used to enable or disable DKIM authentication for an email identity.</p>

    Args:
        email_identity: <p>The email identity.</p>
        signing_enabled: <p>Sets the DKIM signing configuration for the identity.</p> <p>When you set this value <code>true</code>, then the messages that are sent from the identity are signed using DKIM. If you set this value to <code>false</code>, your messages are sent without DKIM signing.</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.
    """

    def _handler(
        req: "OperationRequest[capo_sesv2.types.put_email_identity_dkim_attributes_request.PutEmailIdentityDkimAttributesRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.put_email_identity_dkim_attributes_response.PutEmailIdentityDkimAttributesResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.put_email_identity_dkim_attributes

        output, http_response = (
            capo_sesv2._operations.simple_email_service_v2.put_email_identity_dkim_attributes.put_email_identity_dkim_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutEmailIdentityDkimAttributes")
    )
    input_: capo_sesv2.types.put_email_identity_dkim_attributes_request.PutEmailIdentityDkimAttributesRequest = {
        "email_identity": email_identity
    }
    if signing_enabled is not None:
        input_["signing_enabled"] = signing_enabled

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