CloudFormation / Paginator / ListStackInstances

ListStackInstances#

class CloudFormation.Paginator.ListStackInstances#
paginator = client.get_paginator('list_stack_instances')
paginate(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    StackSetName='string',
    Filters=[
        {
            'Name': 'DETAILED_STATUS'|'LAST_OPERATION_ID',
            'Values': 'string'
        },
    ],
    StackInstanceAccount='string',
    StackInstanceRegion='string',
    CallAs='SELF'|'DELEGATED_ADMIN',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • StackSetName (string) –

    [REQUIRED]

    The name or unique ID of the stack set that you want to list stack instances for.

  • Filters (list) –

    The filter to apply to stack instances

    • (dict) –

      The filter to apply to stack instances

      • Name (string) –

        The type of filter to apply.

      • Values (string) –

        The status to filter by.

  • StackInstanceAccount (string) – The name of the Amazon Web Services account that you want to list stack instances for.

  • StackInstanceRegion (string) – The name of the Region where you want to list stack instances.

  • CallAs (string) –

    [Service-managed permissions] Specifies whether you are acting as an account administrator in the organization’s management account or as a delegated administrator in a member account.

    By default, SELF is specified. Use SELF for stack sets with self-managed permissions.

    • If you are signed in to the management account, specify SELF.

    • If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN. Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

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

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

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

Return type:

dict

Returns:

Response Syntax

{
    'Summaries': [
        {
            'StackSetId': 'string',
            'Region': 'string',
            'Account': 'string',
            'StackId': 'string',
            'Status': 'CURRENT'|'OUTDATED'|'INOPERABLE',
            'StatusReason': 'string',
            'StackInstanceStatus': {
                'DetailedStatus': 'PENDING'|'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELLED'|'INOPERABLE'
            },
            'OrganizationalUnitId': 'string',
            'DriftStatus': 'DRIFTED'|'IN_SYNC'|'UNKNOWN'|'NOT_CHECKED',
            'LastDriftCheckTimestamp': datetime(2015, 1, 1),
            'LastOperationId': 'string'
        },
    ],

}

Response Structure

  • (dict) –

    • Summaries (list) –

      A list of StackInstanceSummary structures that contain information about the specified stack instances.

      • (dict) –

        The structure that contains summary information about a stack instance.

        • StackSetId (string) –

          The name or unique ID of the stack set that the stack instance is associated with.

        • Region (string) –

          The name of the Amazon Web Services Region that the stack instance is associated with.

        • Account (string) –

          [Self-managed permissions] The name of the Amazon Web Services account that the stack instance is associated with.

        • StackId (string) –

          The ID of the stack instance.

        • Status (string) –

          The status of the stack instance, in terms of its synchronization with its associated stack set.

          • INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

          • OUTDATED: The stack isn’t currently up to date with the stack set because:

            • The associated stack failed during a CreateStackSet or UpdateStackSet operation.

            • The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was stopped before the stack was created or updated.

          • CURRENT: The stack is currently up to date with the stack set.

        • StatusReason (string) –

          The explanation for the specific status code assigned to this stack instance.

        • StackInstanceStatus (dict) –

          The detailed status of the stack instance.

          • DetailedStatus (string) –

            • CANCELLED: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.

            • FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

            • INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

            • PENDING: The operation in the specified account and Region has yet to start.

            • RUNNING: The operation in the specified account and Region is currently in progress.

            • SUCCEEDED: The operation in the specified account and Region completed successfully.

        • OrganizationalUnitId (string) –

          [Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for DeploymentTargets.

        • DriftStatus (string) –

          Status of the stack instance’s actual configuration compared to the expected template and parameter configuration of the stack set to which it belongs.

          • DRIFTED: The stack differs from the expected template and parameter configuration of the stack set to which it belongs. A stack instance is considered to have drifted if one or more of the resources in the associated stack have drifted.

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

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

          • UNKNOWN: This value is reserved for future use.

        • LastDriftCheckTimestamp (datetime) –

          Most recent time when CloudFormation performed a drift detection operation on the stack instance. This value will be NULL for any stack instance on which drift detection hasn’t yet been performed.

        • LastOperationId (string) –

          The last unique ID of a StackSet operation performed on a stack instance.