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...

ListStacks

Description

Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have 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 stacks, if there is one.

Default: There is no default value.

Type: String

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

Required: No

StackStatusFilter.member.N

Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

Type: String list

Required: No

Response Elements

The following elements are returned in a structure named ListStacksResult.

NextToken

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

Type: String

StackSummaries

A list of StackSummary structures containing information about the specified stacks.

Type: StackSummary list

Examples

Sample Request

https://cloudformation.us-east-1.amazonaws.com/
 ?Action=ListStacks
 &StackStatusFilter.member.1=CREATE_IN_PROGRESS
 &StackStatusFilter.member.2=DELETE_COMPLETE
 &Version=2010-05-15
 &SignatureVersion=2
 &SignatureMethod=HmacSHA256
 &Timestamp=2010-07-27T22%3A26%3A28.000Z
 &AWSAccessKeyId=[AWS Access KeyID]
 &Signature=[Signature]

Sample Response

<ListStacksResponse>
 <ListStacksResult>
  <StackSummaries>
    <member>
        <StackId>
            arn:aws:cloudformation:us-east-1:1234567:stack/TestCreate1/aaaaa
        </StackId>
        <StackStatus>CREATE_IN_PROGRESS</StackStatus>
        <StackName>vpc1</StackName>
        <CreationTime>2011-05-23T15:47:44Z</CreationTime>
        <TemplateDescription>
            Creates one EC2 instance and a load balancer.
        </TemplateDescription>
    </member>
    <member>
        <StackId>
            arn:aws:cloudformation:us-east-1:1234567:stack/TestDelete2/bbbbb
        </StackId>
        <StackStatus>DELETE_COMPLETE</StackStatus>
        <DeletionTime>2011-03-10T16:20:51Z</DeletionTime>
        <StackName>WP1</StackName>
        <CreationTime>2011-03-05T19:57:58Z</CreationTime>
        <TemplateDescription>
            A simple basic Cloudformation Template.
        </TemplateDescription>
    </member>
  </StackSummaries>
 </ListStacksResult>
</ListStacksResponse>