AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the GetGeneratedTemplate operation. 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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.CloudFormation.AmazonCloudFormationRequest
      Amazon.CloudFormation.Model.GetGeneratedTemplateRequest

Namespace: Amazon.CloudFormation.Model
Assembly: AWSSDK.CloudFormation.dll
Version: 3.x.y.z

Syntax

C#
public class GetGeneratedTemplateRequest : AmazonCloudFormationRequest
         IAmazonWebServiceRequest

The GetGeneratedTemplateRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Format Amazon.CloudFormation.TemplateFormat

Gets and sets the property Format.

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

  • JSON

  • YAML

Public Property GeneratedTemplateName System.String

Gets and sets the property 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.

Examples

This example gets a generated template ins JSON format.

To get a generated template in JSON format


var client = new AmazonCloudFormationClient();
var response = client.GetGeneratedTemplate(new GetGeneratedTemplateRequest 
{
    GeneratedTemplateName = "JazzyTemplate"
});

string status = response.Status;
string templateBody = response.TemplateBody;

            

This example gets a generated template in YAML format.

To get a generated template in YAML format


var client = new AmazonCloudFormationClient();
var response = client.GetGeneratedTemplate(new GetGeneratedTemplateRequest 
{
    Format = "YAML",
    GeneratedTemplateName = "JazzyTemplate"
});

string status = response.Status;
string templateBody = response.TemplateBody;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5