View a markdown version of this page

ListStackResources - AWS CloudFormation

ListStackResources

Returns descriptions of all resources of the specified stack.

For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.

Request Parameters

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

NextToken

The token for the next set of items to return. (You received this token from a previous call.)

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 aren't 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.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

NextToken

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

Type: String

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

StackResourceSummaries.member.N

A list of StackResourceSummary structures.

Type: Array of StackResourceSummary objects

Errors

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

Examples

ListStackResources

This example illustrates one usage of ListStackResources.

Sample Request

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

Sample Response

CREATE_COMPLETE DBSecurityGroup 2011-06-21T20:15:58Z gmarcteststack-dbsecuritygroup-1s5m0ez5lkk6w AWS::RDS::DBSecurityGroup CREATE_COMPLETE SampleDB 2011-06-21T20:25:57Z MyStack-sampledb-ycwhk1v830lx AWS::RDS::DBInstance CREATE_COMPLETE SampleApplication 2011-06-21T20:26:12Z MyStack-SampleApplication-1MKNASYR3RBQL AWS::ElasticBeanstalk::Application CREATE_COMPLETE SampleEnvironment 2011-06-21T20:28:48Z myst-Samp-1AGU6ERZX6M3Q AWS::ElasticBeanstalk::Environment CREATE_COMPLETE AlarmTopic 2011-06-21T20:29:06Z arn:aws:sns:us-east-1:803981987763:MyStack-Al armTopic-SW4IQELG7RPJ AWS::SNS::Topic CREATE_COMPLETE CPUAlarmHigh 2011-06-21T20:29:23Z MyStack-CPUAlarmHigh-POBWQPDJA81F AWS::CloudWatch::Alarm 2d06e36c-ac1d-11e0-a958-example

See Also

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