Displays the template object (which includes the Subject line, HTML part and text part) for the template you specify.
You can execute this operation no more than once per second.
Parameters:
-
template_name
(TemplateName)
–
The name of the template to retrieve.
Raises:
Source code in docs_src/capo_ses/_services/ses.py
| def get_template(
self,
template_name: "capo_ses.types.template_name.TemplateName",
*,
config_overrides: Optional[SESClientConfig] = None,
) -> "capo_ses.types.get_template_response.GetTemplateResponse":
"""<p>Displays the template object (which includes the Subject line, HTML part and text part) for the template you specify.</p> <p>You can execute this operation no more than once per second.</p>
Args:
template_name: <p>The name of the template to retrieve.</p>
Raises:
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.get_template_request.GetTemplateRequest]",
) -> OperationResponse[
"capo_ses.types.get_template_response.GetTemplateResponse"
]:
import capo_ses._operations.simple_email_service.get_template
output, http_response = (
capo_ses._operations.simple_email_service.get_template.get_template(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetTemplate")
)
input_: capo_ses.types.get_template_request.GetTemplateRequest = {
"template_name": template_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|