Lists the email templates present in your Amazon SES account in the current Amazon Web Services Region.
You can execute this operation no more than once per second.
Parameters:
-
next_token
(Optional[NextToken], default:
None
)
–
A token returned from a previous call to ListTemplates to indicate the position in the list of email templates.
-
max_items
(Optional[MaxItems], default:
None
)
–
The maximum number of templates to return. This value must be at least 1 and less than or equal to 100. If more than 100 items are requested, the page size will automatically set to 100. If you do not specify a value, 10 is the default page size.
Raises:
Source code in docs_src/capo_ses/_services/async_ses.py
| async def list_templates(
self,
*,
config_overrides: Optional[AsyncSESClientConfig] = None,
next_token: Optional["capo_ses.types.next_token.NextToken"] = None,
max_items: Optional["capo_ses.types.max_items.MaxItems"] = None,
) -> "capo_ses.types.list_templates_response.ListTemplatesResponse":
"""<p>Lists the email templates present in your Amazon SES account in the current Amazon Web Services Region.</p> <p>You can execute this operation no more than once per second.</p>
Args:
next_token: <p>A token returned from a previous call to <code>ListTemplates</code> to indicate the position in the list of email templates.</p>
max_items: <p>The maximum number of templates to return. This value must be at least 1 and less than or equal to 100. If more than 100 items are requested, the page size will automatically set to 100. If you do not specify a value, 10 is the default page size. </p>
Raises:
capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ses.types.list_templates_request.ListTemplatesRequest]",
) -> AsyncOperationResponse[
"capo_ses.types.list_templates_response.ListTemplatesResponse"
]:
import capo_ses._operations.simple_email_service.list_templates
(
output,
http_response,
) = await capo_ses._operations.simple_email_service.list_templates.async_list_templates(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListTemplates")
)
input_: capo_ses.types.list_templates_request.ListTemplatesRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_items is not None:
input_["max_items"] = max_items
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|