AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Table Of Contents

Feedback

[ aws . cloudformation ]

describe-stacks

Description

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

Synopsis

  describe-stacks
[--stack-name <value>]
[--starting-token <value>]
[--max-items <value>]

Options

--stack-name (string)

The name or the unique identifier associated with the stack.

Default: There is no default value.

--starting-token (string)

A token to specify where to start paginating. This is the --next-token from a previously truncated response.

--max-items (integer)

The total number of items to return. If the total number of items available is more than the value specified in max-items then a --next-token will be provided in the output that you can use to resume pagination.

Examples

To describe AWS CloudFormation stacks

The following describe-stacks command shows summary information for the myteststack stack:

aws cloudformation describe-stacks --stack-name myteststack

Output:

{
    "Stacks":  [
        {
            "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896",
            "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.",
            "Tags": [],
            "Outputs": [
                {
                    "Description": "Name of S3 bucket to hold website content",
                    "OutputKey": "BucketName",
                    "OutputValue": "myteststack-s3bucket-jssofi1zie2w"
                }
            ],
            "StackStatusReason": null,
            "CreationTime": "2013-08-23T01:02:15.422Z",
            "Capabilities": [],
            "StackName": "myteststack",
            "StackStatus": "CREATE_COMPLETE",
            "DisableRollback": false
        }
    ]

For more information, see Stacks in the AWS CloudFormation User Guide.

Output

Stacks -> (list)

A list of stack structures.

(structure)

The Stack data type.

StackId -> (string)

Unique identifier of the stack.

StackName -> (string)

The name associated with the stack.

Description -> (string)

User defined description associated with the stack.

Parameters -> (list)

A list of Parameter structures.

(structure)

The Parameter data type.

ParameterKey -> (string)

The key associated with the parameter.

ParameterValue -> (string)

The value associated with the parameter.

CreationTime -> (timestamp)

Time at which the stack was created.

LastUpdatedTime -> (timestamp)

The time the stack was last updated. This field will only be returned if the stack has been updated at least once.

StackStatus -> (string)

Current status of the stack.

StackStatusReason -> (string)

Success/failure message associated with the stack status.

DisableRollback -> (boolean)

Boolean to enable or disable rollback on stack creation failures:

  • true : disable rollback
  • false : enable rollback

NotificationARNs -> (list)

SNS topic ARNs to which stack related events are published.

(string)

TimeoutInMinutes -> (integer)

The amount of time within which stack creation should complete.

Capabilities -> (list)

The capabilities allowed in the stack.

(string)

Outputs -> (list)

A list of output structures.

(structure)

The Output data type.

OutputKey -> (string)

The key associated with the output.

OutputValue -> (string)

The value associated with the output.

Description -> (string)

User defined description associated with the output.

Tags -> (list)

A list of Tag s that specify cost allocation information for the stack.

(structure)

The Tag type is used by create-stack in the Tags parameter. It allows you to specify a key/value pair that can be used to store information related to cost allocation for an AWS CloudFormation stack.

Key -> (string)

Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .

Value -> (string)

Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.

NextToken -> (string)

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