AWS CloudFormation
API Reference (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

ListStackResources

Description

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 common parameters that all actions use, see Common Parameters.

NextToken

String that identifies the start of the next list of stack resource summaries, if there is one.

Default: There is no default value.

Type: String

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

Required: No

StackName

The name or the unique identifier 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: Yes

Response Elements

The following elements are returned in a structure named ListStackResourcesResult.

NextToken

String that identifies the start of the next list of events, if there is one.

Type: String

StackResourceSummaries

A list of StackResourceSummary structures.

Type: StackResourceSummary list

Examples

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

<ListStackResourcesResponse>
  <ListStackResourcesResult>
    <StackResourceSummaries>
      <member>
        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
        <LogicalResourceId>DBSecurityGroup</LogicalResourceId>
        <LastUpdatedTimestamp>2011-06-21T20:15:58Z</LastUpdatedTimestamp>
        <PhysicalResourceId>gmarcteststack-dbsecuritygroup-1s5m0ez5lkk6w</Physic
alResourceId>
        <ResourceType>AWS::RDS::DBSecurityGroup</ResourceType>
      </member>
      <member>
        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
        <LogicalResourceId>SampleDB</LogicalResourceId>
        <LastUpdatedTimestamp>2011-06-21T20:25:57Z</LastUpdatedTimestamp>
        <PhysicalResourceId>MyStack-sampledb-ycwhk1v830lx</PhysicalResour
ceId>
        <ResourceType>AWS::RDS::DBInstance</ResourceType>
      </member>
      <member>
        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
        <LogicalResourceId>SampleApplication</LogicalResourceId>
        <LastUpdatedTimestamp>2011-06-21T20:26:12Z</LastUpdatedTimestamp>
        <PhysicalResourceId>MyStack-SampleApplication-1MKNASYR3RBQL</Phys
icalResourceId>
        <ResourceType>AWS::ElasticBeanstalk::Application</ResourceType>
      </member>
      <member>
        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
        <LogicalResourceId>SampleEnvironment</LogicalResourceId>
        <LastUpdatedTimestamp>2011-06-21T20:28:48Z</LastUpdatedTimestamp>
        <PhysicalResourceId>myst-Samp-1AGU6ERZX6M3Q</PhysicalResourceId>
        <ResourceType>AWS::ElasticBeanstalk::Environment</ResourceType>
      </member>
      <member>
        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
        <LogicalResourceId>AlarmTopic</LogicalResourceId>
        <LastUpdatedTimestamp>2011-06-21T20:29:06Z</LastUpdatedTimestamp>
        <PhysicalResourceId>arn:aws:sns:us-east-1:803981987763:MyStack-Al
armTopic-SW4IQELG7RPJ</PhysicalResourceId>
        <ResourceType>AWS::SNS::Topic</ResourceType>
      </member>
      <member>
        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
        <LogicalResourceId>CPUAlarmHigh</LogicalResourceId>
        <LastUpdatedTimestamp>2011-06-21T20:29:23Z</LastUpdatedTimestamp>
        <PhysicalResourceId>MyStack-CPUAlarmHigh-POBWQPDJA81F</PhysicalRe
sourceId>
        <ResourceType>AWS::CloudWatch::Alarm</ResourceType>
      </member>
    </StackResourceSummaries>
  </ListStackResourcesResult>
  <ResponseMetadata>
    <RequestId>2d06e36c-ac1d-11e0-a958-f9382b6eb86b</RequestId>
  </ResponseMetadata>
</ListStackResourcesResponse>