Menu
AWS CloudFormation
API Reference (API Version 2010-05-15)

GetTemplateSummary

Returns information about a new or existing template. The GetTemplateSummary action is useful for viewing parameter information, such as default parameter values and parameter types, before you create or update a stack.

You can use the GetTemplateSummary action when you submit a template, or you can get template information for a running or deleted stack.

For deleted stacks, GetTemplateSummary returns the template information for up to 90 days after the stack has been deleted. If the template does not exist, a ValidationError is returned.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

StackName

The name or the stack ID that is associated with the stack, which are not always interchangeable. For running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify the unique stack ID.

Conditional: You must specify only one of the following parameters: StackName, TemplateBody, or TemplateURL.

Type: String

Length Constraints: Minimum length of 1.

Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)

Required: No

TemplateBody

Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information about templates, see Template Anatomy in the AWS CloudFormation User Guide.

Conditional: You must specify only one of the following parameters: StackName, TemplateBody, or TemplateURL.

Type: String

Length Constraints: Minimum length of 1.

Required: No

TemplateURL

Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more information about templates, see Template Anatomy in the AWS CloudFormation User Guide.

Conditional: You must specify only one of the following parameters: StackName, TemplateBody, or TemplateURL.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

Response Elements

The following elements are returned by the service.

Capabilities.member.N

The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.

For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates.

Type: array of Strings

Valid Values: CAPABILITY_IAM | CAPABILITY_NAMED_IAM

CapabilitiesReason

The list of resources that generated the values in the Capabilities response element.

Type: String

DeclaredTransforms.member.N

A list of the transforms that are declared in the template.

Type: array of Strings

Description

The value that is defined in the Description property of the template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Metadata

The value that is defined for the Metadata property of the template.

Type: String

Parameters.member.N

A list of parameter declarations that describe various properties for each parameter.

Type: array of ParameterDeclaration objects

ResourceTypes.member.N

A list of all the template resource types that are defined in the template, such as AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance.

Type: array of Strings

Length Constraints: Minimum length of 1. Maximum length of 256.

Version

The AWS template format version, which identifies the capabilities of the template.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

Example

GetTemplateSummary

Sample Request

Copy
https://cloudformation.us-east-1.amazonaws.com/ ?Action=GetTemplateSummary &TemplateURL=https%3A%2F%2Fs3-us-east-1.amazonaws.com%2Fsamplebucketname%2Fsampletemplate.template &Version=2010-05-15 &SignatureVersion=2 &Timestamp=2010-07-27T22%3A26%3A28.000Z &AWSAccessKeyId=[AWS Access KeyID] &Signature=[Signature]

Sample Response

Copy
<GetTemplateSummaryResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/"> <GetTemplateSummaryResult> <Description>A sample template description.</Description> <Parameters> <member> <NoEcho>false</NoEcho> <ParameterKey>KeyName</ParameterKey> <Description>Name of an existing EC2 KeyPair to enable SSH access to the instance</Description> <ParameterType>AWS::EC2::KeyPair::KeyName</ParameterType> </member> </Parameters> <Metadata>{"Instances":{"SampleDescription":"Information about the instances"}}</Metadata> <Version>2010-09-09</Version> </GetTemplateSummaryResult> <ResponseMetadata> <RequestId>b9b4b068-3a41-11e5-94eb-example</RequestId> </ResponseMetadata> </GetTemplateSummaryResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: