Skip to content

update_custom_verification_email_template

update_custom_verification_email_template(
    template_name: TemplateName,
    *,
    config_overrides: Optional[SESClientConfig] = None,
    from_email_address: Optional[FromAddress] = None,
    template_subject: Optional[Subject] = None,
    template_content: Optional[TemplateContent] = None,
    success_redirection_url: Optional[SuccessRedirectionURL] = None,
    failure_redirection_url: Optional[FailureRedirectionURL] = None,
) -> None

Updates an existing custom verification email template.

For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide.

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

Parameters:

  • template_name (TemplateName) –

    The name of the custom verification email template to update.

  • from_email_address (Optional[FromAddress], default: None ) –

    The email address that the custom verification email is sent from.

  • template_subject (Optional[Subject], default: None ) –

    The subject line of the custom verification email.

  • template_content (Optional[TemplateContent], default: None ) –

    The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see Custom Verification Email Frequently Asked Questions in the Amazon SES Developer Guide.

  • success_redirection_url (Optional[SuccessRedirectionURL], default: None ) –

    The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

  • failure_redirection_url (Optional[FailureRedirectionURL], default: None ) –

    The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

Raises:

Source code in docs_src/capo_ses/_services/ses.py
def update_custom_verification_email_template(
    self,
    template_name: "capo_ses.types.template_name.TemplateName",
    *,
    config_overrides: Optional[SESClientConfig] = None,
    from_email_address: Optional["capo_ses.types.from_address.FromAddress"] = None,
    template_subject: Optional["capo_ses.types.subject.Subject"] = None,
    template_content: Optional[
        "capo_ses.types.template_content.TemplateContent"
    ] = None,
    success_redirection_url: Optional[
        "capo_ses.types.success_redirection_url.SuccessRedirectionURL"
    ] = None,
    failure_redirection_url: Optional[
        "capo_ses.types.failure_redirection_url.FailureRedirectionURL"
    ] = None,
) -> None:
    """<p>Updates an existing custom verification email template.</p> <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.</p> <p>You can execute this operation no more than once per second.</p>

    Args:
        template_name: <p>The name of the custom verification email template to update.</p>
        from_email_address: <p>The email address that the custom verification email is sent from.</p>
        template_subject: <p>The subject line of the custom verification email.</p>
        template_content: <p>The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Custom Verification Email Frequently Asked Questions</a> in the <i>Amazon SES Developer Guide</i>.</p>
        success_redirection_url: <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
        failure_redirection_url: <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>

    Raises:
        capo_ses.errors.custom_verification_email_invalid_content_exception.CustomVerificationEmailInvalidContentException: <p>Indicates that custom verification email template provided content is invalid.</p>
        capo_ses.errors.custom_verification_email_template_does_not_exist_exception.CustomVerificationEmailTemplateDoesNotExistException: <p>Indicates that a custom verification email template with the name you specified does not exist.</p>
        capo_ses.errors.from_email_address_not_verified_exception.FromEmailAddressNotVerifiedException: <p>Indicates that the sender address specified for a custom verification email is not verified, and is therefore not eligible to send the custom verification email. </p>
        capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ses.types.update_custom_verification_email_template_request.UpdateCustomVerificationEmailTemplateRequest]",
    ) -> OperationResponse[None]:
        import capo_ses._operations.simple_email_service.update_custom_verification_email_template

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCustomVerificationEmailTemplate")
    )
    input_: capo_ses.types.update_custom_verification_email_template_request.UpdateCustomVerificationEmailTemplateRequest = {
        "template_name": template_name
    }
    if from_email_address is not None:
        input_["from_email_address"] = from_email_address
    if template_subject is not None:
        input_["template_subject"] = template_subject
    if template_content is not None:
        input_["template_content"] = template_content
    if success_redirection_url is not None:
        input_["success_redirection_url"] = success_redirection_url
    if failure_redirection_url is not None:
        input_["failure_redirection_url"] = failure_redirection_url

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