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.

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.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to GetGeneratedTemplateAsync.

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

Syntax

C#
public abstract GetGeneratedTemplateResponse GetGeneratedTemplate(
         GetGeneratedTemplateRequest request
)

Parameters

request
Type: Amazon.CloudFormation.Model.GetGeneratedTemplateRequest

Container for the necessary parameters to execute the GetGeneratedTemplate service method.

Return Value


The response from the GetGeneratedTemplate service method, as returned by CloudFormation.

Exceptions

ExceptionCondition
GeneratedTemplateNotFoundException The generated template was not found.

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 Framework:
Supported in: 4.5, 4.0, 3.5

See Also