CloudFormation / Client / get_generated_template



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.

See also: AWS API Documentation

Request Syntax

response = client.get_generated_template(
  • Format (string) –

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

    • JSON

    • YAML

  • GeneratedTemplateName (string) –


    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 ``.

Return type:



Response Syntax

    'TemplateBody': 'string'

Response Structure

  • (dict) –

    • Status (string) –

      The status of the template generation. Supported values are:

      • CreatePending - the creation of the template is pending.

      • CreateInProgress - the creation of the template is in progress.

      • DeletePending - the deletion of the template is pending.

      • DeleteInProgress - the deletion of the template is in progress.

      • UpdatePending - the update of the template is pending.

      • UpdateInProgress - the update of the template is in progress.

      • Failed - the template operation failed.

      • Complete - the template operation is complete.

    • TemplateBody (string) –

      The template body of the generated template, in the language specified by the Language parameter.


  • CloudFormation.Client.exceptions.GeneratedTemplateNotFoundException