listEmailTemplates method

Future<ListEmailTemplatesResponse> listEmailTemplates({
  1. String? nextToken,
  2. int? pageSize,
})

Lists the email templates present in your Amazon SES account in the current AWS Region.

You can execute this operation no more than once per second.

May throw TooManyRequestsException. May throw BadRequestException.

Parameter nextToken : A token returned from a previous call to ListEmailTemplates to indicate the position in the list of email templates.

Parameter pageSize : The number of results to show in a single call to ListEmailTemplates. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

The value you specify has to be at least 1, and can be no more than 10.

Implementation

Future<ListEmailTemplatesResponse> listEmailTemplates({
  String? nextToken,
  int? pageSize,
}) async {
  final $query = <String, List<String>>{
    if (nextToken != null) 'NextToken': [nextToken],
    if (pageSize != null) 'PageSize': [pageSize.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v2/email/templates',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListEmailTemplatesResponse.fromJson(response);
}