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

cfn-list-stacks

Description

List one or more running or deleted stacks filtered by status.

Note

The cfn-list-stacks command returns information about deleted stacks for 90 days after they have been deleted.

Syntax

cfn-list-stacks stack-status common-options

Options

stack-status

Filters for the ending status on the deleted stacks you want to list. If you do not specify this value, AWS CloudFormation only returns information stacks that ended with the DELETE_COMPLETE status. You can specify multiple status values for --stack-status if you separate them by a comma.

Required: No. The default value is DELETE_COMPLETE.

Type: String.

Valid Values: CREATE_COMPLETE | CREATE_FAILED | CREATE_IN_PROGRESS | DELETE_COMPLETE | DELETE_FAILED | DELETE_IN_PROGRESS | ROLLBACK_COMPLETE | ROLLBACK_FAILED | ROLLBACK_IN_PROGRESS | UPDATE_COMPLETE | UPDATE_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_FAILED | UPDATE_IN_PROGRESS | UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_ROLLBACK_IN_PROGRESS

Output

The command returns a table that contains the following information:

  • STACK_ID

    Unique identifier for the stack.

  • NAME

    The stack name.

  • CREATED_TIME

    Time when the stack was created.

  • STATUS

    The status of the stack when it was deleted.

    One of CREATE_IN_PROGRESS | CREATE_COMPLETE | CREATE_FAILED | DELETE_IN_PROGRESS | DELETE_COMPLETE | DELETE_FAILED | ROLLBACK_IN_PROGRESS | ROLLBACK_COMPLETE | ROLLBACK_FAILED.

  • TEMPLATE_DESCRIPTION

    Description of the template used to create the stack.

AWS CloudFormation displays errors on stderr.

Examples

Example Request

This example returns information about stacks that have the CREATE_COMPLETE status, and stacks which were deleted (within the past 90 days) with the status DELETE_COMPLETE.

PROMPT> cfn-list-stacks --stack-status CREATE_COMPLETE,DELETE_COMPLETE
STACK  STACK_ID
NAME           CREATION_TIME         STATUS     TEMPLATE_DESCRIPTION
STACK  arn:aws:cloudformation:us-east-1:123456789012:stack/mut2/83327aa0-863
mut2           2011-05-24T19:53:36Z  CREATE_COMPLETE   TestTemplate556
STACK  arn:aws:cloudformation:us-east-1:897345613465:stack/mut4/45627ax0-980
mut2           2011-05-24T19:53:36Z  DELETE_COMPLETE   TestTemplate559