describe_stacks¶
Operation¶
describe_stacks
async
¶
describe_stacks(input: DescribeStacksInput, plugins: list[Plugin] | None = None) -> DescribeStacksOutput
Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created. For more information about a stack's event history, see Understand CloudFormation stack creation events in the CloudFormation User Guide.
Note
If the stack doesn't exist, a ValidationError is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
DescribeStacksInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
DescribeStacksOutput
|
An instance of |
Input¶
DescribeStacksInput
dataclass
¶
Bases: _SerdeShape
The input for DescribeStacks action.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
The token for the next set of items to return. (You received this token from a previous call.)
stack_name
class-attribute
instance-attribute
¶
stack_name: str | None = ...
Note
If you don't pass a parameter to StackName, the API returns a
response that describes all resources in the account, which can impact
performance. This requires ListStacks and DescribeStacks
permissions.
Consider using the ListStacks API if you're not passing a parameter to
StackName.
The IAM policy below can be added to IAM policies when you want to limit resource-level permissions and avoid returning a response when no parameter is sent in the request:
{ "Version": "2012-10-17", "Statement": [{ "Effect": "Deny", "Action": "cloudformation:DescribeStacks", "NotResource": "arn:aws:cloudformation:::stack//" }] }
The name or the unique stack ID that's 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.
Output¶
DescribeStacksOutput
dataclass
¶
Bases: _SerdeShape
The output for a DescribeStacks action.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
If the output exceeds 1 MB in size, a string that identifies the next page of stacks. If no additional page exists, this value is null.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.