getGeneratedTemplate method

Future<GetGeneratedTemplateOutput> getGeneratedTemplate({
  1. required String generatedTemplateName,
  2. TemplateFormat? format,
})

Retrieves a generated template. If the template is in an InProgress or Pending status then the template returned will be the template when the template was last in a Complete status. If the template has not yet been in a Complete status then an empty template will be returned.

May throw GeneratedTemplateNotFoundException.

Parameter generatedTemplateName : The name or Amazon Resource Name (ARN) of the generated template. The format is arn:${Partition}:cloudformation:${Region}:${Account}:generatedtemplate/${Id}. For example, arn:aws:cloudformation:us-east-1:123456789012:generatedtemplate/2e8465c1-9a80-43ea-a3a3-4f2d692fe6dc .

Parameter format : The language to use to retrieve for the generated template. Supported values are:

  • JSON
  • YAML

Implementation

Future<GetGeneratedTemplateOutput> getGeneratedTemplate({
  required String generatedTemplateName,
  TemplateFormat? format,
}) async {
  final $request = <String, String>{
    'GeneratedTemplateName': generatedTemplateName,
    if (format != null) 'Format': format.value,
  };
  final $result = await _protocol.send(
    $request,
    action: 'GetGeneratedTemplate',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'GetGeneratedTemplateResult',
  );
  return GetGeneratedTemplateOutput.fromXml($result);
}