updateEmailTemplate method

Future<void> updateEmailTemplate({
  1. required EmailTemplateContent templateContent,
  2. required String templateName,
})

Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single API operation. For more information, see the Amazon SES Developer Guide.

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

May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException.

Parameter templateContent : The content of the email template, composed of a subject line, an HTML part, and a text-only part.

Parameter templateName : The name of the template you want to update.

Implementation

Future<void> updateEmailTemplate({
  required EmailTemplateContent templateContent,
  required String templateName,
}) async {
  ArgumentError.checkNotNull(templateContent, 'templateContent');
  ArgumentError.checkNotNull(templateName, 'templateName');
  _s.validateStringLength(
    'templateName',
    templateName,
    1,
    1152921504606846976,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'TemplateContent': templateContent,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v2/email/templates/${Uri.encodeComponent(templateName)}',
    exceptionFnMap: _exceptionFns,
  );
}