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/async_ses.py
| async def get_template(
self,
template_name: "capo_ses.types.template_name.TemplateName",
*,
config_overrides: Optional[AsyncSESClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ses.types.get_template_request.GetTemplateRequest]",
) -> AsyncOperationResponse[
"capo_ses.types.get_template_response.GetTemplateResponse"
]:
import capo_ses._operations.simple_email_service.get_template
(
output,
http_response,
) = await capo_ses._operations.simple_email_service.get_template.async_get_template(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|