CloudFormation / Paginator / ListStacks

ListStacks#

class CloudFormation.Paginator.ListStacks#
paginator = client.get_paginator('list_stacks')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from CloudFormation.Client.list_stacks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    StackStatusFilter=[
        'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_FAILED'|'ROLLBACK_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_FAILED'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_FAILED'|'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE'|'REVIEW_IN_PROGRESS'|'IMPORT_IN_PROGRESS'|'IMPORT_COMPLETE'|'IMPORT_ROLLBACK_IN_PROGRESS'|'IMPORT_ROLLBACK_FAILED'|'IMPORT_ROLLBACK_COMPLETE',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • StackStatusFilter (list) –

    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.

    • (string) –

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (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 NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'StackSummaries': [
        {
            'StackId': 'string',
            'StackName': 'string',
            'TemplateDescription': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1),
            'DeletionTime': datetime(2015, 1, 1),
            'StackStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_FAILED'|'ROLLBACK_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_FAILED'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_FAILED'|'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE'|'REVIEW_IN_PROGRESS'|'IMPORT_IN_PROGRESS'|'IMPORT_COMPLETE'|'IMPORT_ROLLBACK_IN_PROGRESS'|'IMPORT_ROLLBACK_FAILED'|'IMPORT_ROLLBACK_COMPLETE',
            'StackStatusReason': 'string',
            'ParentId': 'string',
            'RootId': 'string',
            'DriftInformation': {
                'StackDriftStatus': 'DRIFTED'|'IN_SYNC'|'UNKNOWN'|'NOT_CHECKED',
                'LastCheckTimestamp': datetime(2015, 1, 1)
            }
        },
    ],

}

Response Structure

  • (dict) –

    The output for ListStacks action.

    • StackSummaries (list) –

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

      • (dict) –

        The StackSummary Data Type

        • StackId (string) –

          Unique stack identifier.

        • StackName (string) –

          The name associated with the stack.

        • TemplateDescription (string) –

          The template description of the template used to create the stack.

        • CreationTime (datetime) –

          The time the stack was created.

        • LastUpdatedTime (datetime) –

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

        • DeletionTime (datetime) –

          The time the stack was deleted.

        • StackStatus (string) –

          The current status of the stack.

        • StackStatusReason (string) –

          Success/Failure message associated with the stack status.

        • ParentId (string) –

          For nested stacks–stacks created as resources for another stack–the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.

          For more information, see Embed stacks within other stacks using nested stacks in the CloudFormation User Guide.

        • RootId (string) –

          For nested stacks–stacks created as resources for another stack–the stack ID of the top-level stack to which the nested stack ultimately belongs.

          For more information, see Embed stacks within other stacks using nested stacks in the CloudFormation User Guide.

        • DriftInformation (dict) –

          Summarizes information about whether a stack’s actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detect unmanaged configuration changes to stacks and resources with drift detection.

          • StackDriftStatus (string) –

            Status of the stack’s actual configuration compared to its expected template configuration.

            • DRIFTED: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.

            • NOT_CHECKED: CloudFormation hasn’t checked if the stack differs from its expected template configuration.

            • IN_SYNC: The stack’s actual configuration matches its expected template configuration.

            • UNKNOWN: This value is reserved for future use.

          • LastCheckTimestamp (datetime) –

            Most recent time when a drift detection operation was initiated on the stack, or any of its individual resources that support drift detection.