Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single operation. For more information, see the Amazon SES Developer Guide.
You can execute this operation no more than once per second.
Raises:
-
InvalidTemplateException
–
Indicates that the template that you specified could not be rendered. This issue may occur when a template refers to a partial that does not exist.
-
TemplateDoesNotExistException
–
Indicates that the Template object you specified does not exist in your Amazon SES account.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_ses/_services/ses.py
| def update_template(
self,
template: "capo_ses.types.template.Template",
*,
config_overrides: Optional[SESClientConfig] = None,
) -> "capo_ses.types.update_template_response.UpdateTemplateResponse":
"""<p>Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single operation. For more information, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/send-personalized-email-api.html">Amazon SES Developer Guide</a>.</p> <p>You can execute this operation no more than once per second.</p>
Raises:
capo_ses.errors.invalid_template_exception.InvalidTemplateException: <p>Indicates that the template that you specified could not be rendered. This issue may occur when a template refers to a partial that does not exist.</p>
capo_ses.errors.template_does_not_exist_exception.TemplateDoesNotExistException: <p>Indicates that the Template object you specified does not exist in your Amazon SES account.</p>
capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ses.types.update_template_request.UpdateTemplateRequest]",
) -> OperationResponse[
"capo_ses.types.update_template_response.UpdateTemplateResponse"
]:
import capo_ses._operations.simple_email_service.update_template
output, http_response = (
capo_ses._operations.simple_email_service.update_template.update_template(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateTemplate")
)
input_: capo_ses.types.update_template_request.UpdateTemplateRequest = {
"template": template
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|