Skip to content

create_custom_verification_email_template

create_custom_verification_email_template(
    template_name: EmailTemplateName,
    from_email_address: EmailAddress,
    template_subject: EmailTemplateSubject,
    template_content: TemplateContent,
    success_redirection_url: SuccessRedirectionURL,
    failure_redirection_url: FailureRedirectionURL,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreateCustomVerificationEmailTemplateResponse

Creates a new 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 (EmailTemplateName) –

    The name of the custom verification email template.

  • from_email_address (EmailAddress) –

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

  • template_subject (EmailTemplateSubject) –

    The subject line of the custom verification email.

  • template_content (TemplateContent) –

    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.

  • tags (Optional[TagList], default: None ) –

    An array of objects that define the tags (keys and values) to associate with the custom verification email template.

  • success_redirection_url (SuccessRedirectionURL) –

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

  • failure_redirection_url (FailureRedirectionURL) –

    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_sesv2/_services/se_sv2.py
def create_custom_verification_email_template(
    self,
    template_name: "capo_sesv2.types.email_template_name.EmailTemplateName",
    from_email_address: "capo_sesv2.types.email_address.EmailAddress",
    template_subject: "capo_sesv2.types.email_template_subject.EmailTemplateSubject",
    template_content: "capo_sesv2.types.template_content.TemplateContent",
    success_redirection_url: "capo_sesv2.types.success_redirection_url.SuccessRedirectionURL",
    failure_redirection_url: "capo_sesv2.types.failure_redirection_url.FailureRedirectionURL",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tags: Optional["capo_sesv2.types.tag_list.TagList"] = None,
) -> "capo_sesv2.types.create_custom_verification_email_template_response.CreateCustomVerificationEmailTemplateResponse":
    """<p>Creates a new 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.</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-faq">Custom verification email frequently asked questions</a> in the <i>Amazon SES Developer Guide</i>.</p>
        tags: <p>An array of objects that define the tags (keys and values) to associate with the custom verification email template.</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_sesv2.errors.already_exists_exception.AlreadyExistsException: <p>The resource specified in your request already exists.</p>
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_sesv2.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</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.create_custom_verification_email_template_request.CreateCustomVerificationEmailTemplateRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.create_custom_verification_email_template_response.CreateCustomVerificationEmailTemplateResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.create_custom_verification_email_template

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomVerificationEmailTemplate")
    )
    input_: capo_sesv2.types.create_custom_verification_email_template_request.CreateCustomVerificationEmailTemplateRequest = {
        "template_name": template_name,
        "from_email_address": from_email_address,
        "template_subject": template_subject,
        "template_content": template_content,
        "success_redirection_url": success_redirection_url,
        "failure_redirection_url": failure_redirection_url,
    }
    if tags is not None:
        input_["tags"] = tags

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