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

DescribeStacks

Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created.

Note

If the stack does not exist, an AmazonCloudFormationException is returned.

Request Parameters

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

NextToken

A string that identifies the next page of stacks that you want to retrieve.

Type: String

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

Required: No

StackName

The name or the unique stack ID that is associated with the stack, which are not always interchangeable:

  • Running stacks: You can specify either the stack's name or its unique stack ID.

  • Deleted stacks: You must specify the unique stack ID.

Default: There is no default value.

Type: String

Required: No

Response Elements

The following elements are returned by the service.

NextToken

If the output exceeds 1 MB in size, a string that identifies the next page of stacks. If no additional page exists, this value is null.

Type: String

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

Stacks.member.N

A list of stack structures.

Type: Array of Stack objects

Errors

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

Example

DescribeStacks

Sample Request

https://cloudformation.us-east-1.amazonaws.com/ ?Action=DescribeStacks &StackName=MyStack &Version=2010-05-15 &SignatureVersion=2 &Timestamp=2010-07-27T22%3A26%3A28.000Z &AWSAccessKeyId=[AWS Access KeyID] &Signature=[Signature]

Sample Response

<DescribeStacksResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/"> <DescribeStacksResult> <Stacks> <member> <StackName>MyStack</StackName> <StackId>arn:aws:cloudformation:us-east-1:123456789:stack/MyStack/aaf549a0-a413-11df-adb3-5081b3858e83</StackId> <CreationTime>2010-07-27T22:28:28Z</CreationTime> <StackStatus>CREATE_COMPLETE</StackStatus> <DisableRollback>false</DisableRollback> <Outputs> <member> <OutputKey>StartPage</OutputKey> <OutputValue>http://my-load-balancer.amazonaws.com:80/index.html</OutputValue> </member> </Outputs> </member> </Stacks> </DescribeStacksResult> <ResponseMetadata> <RequestId>b9b4b068-3a41-11e5-94eb-example</RequestId> </ResponseMetadata> </DescribeStacksResponse>

See Also

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