getTemplate method

Future<GetTemplateResponse> getTemplate({
  1. required String templateName,
})

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.

May throw TemplateDoesNotExistException.

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

Implementation

Future<GetTemplateResponse> getTemplate({
  required String templateName,
}) async {
  ArgumentError.checkNotNull(templateName, 'templateName');
  final $request = <String, dynamic>{};
  $request['TemplateName'] = templateName;
  final $result = await _protocol.send(
    $request,
    action: 'GetTemplate',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['GetTemplateRequest'],
    shapes: shapes,
    resultWrapper: 'GetTemplateResult',
  );
  return GetTemplateResponse.fromXml($result);
}