AWS CloudFormation

2022/10/28 - AWS CloudFormation - 5 updated api methods

Changes  This release adds more fields to improves visibility of AWS CloudFormation StackSets information in following APIs: ListStackInstances, DescribeStackInstance, ListStackSetOperationResults, ListStackSetOperations, DescribeStackSetOperation.

DescribeStackInstance (updated) Link ¶
Changes (response)
{'StackInstance': {'LastOperationId': 'string'}}

Returns the stack instance that's associated with the specified stack set, Amazon Web Services account, and Region.

For a list of stack instances that are associated with a specific stack set, use ListStackInstances.

See also: AWS API Documentation

Request Syntax

client.describe_stack_instance(
    StackSetName='string',
    StackInstanceAccount='string',
    StackInstanceRegion='string',
    CallAs='SELF'|'DELEGATED_ADMIN'
)
type StackSetName:

string

param StackSetName:

[REQUIRED]

The name or the unique stack ID of the stack set that you want to get stack instance information for.

type StackInstanceAccount:

string

param StackInstanceAccount:

[REQUIRED]

The ID of an Amazon Web Services account that's associated with this stack instance.

type StackInstanceRegion:

string

param StackInstanceRegion:

[REQUIRED]

The name of a Region that's associated with this stack instance.

type CallAs:

string

param CallAs:

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

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    • StackInstance (dict) --

      The stack instance that matches the specified request parameters.

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

      • ParameterOverrides (list) --

        A list of parameters from the stack set template whose values have been overridden in this stack instance.

        • (dict) --

          The Parameter data type.

          • ParameterKey (string) --

            The key associated with the parameter. If you don't specify a key and value for a particular parameter, CloudFormation uses the default value that's specified in your template.

          • ParameterValue (string) --

            The input value associated with the parameter.

          • UsePreviousValue (boolean) --

            During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true, do not specify a parameter value.

          • ResolvedValue (string) --

            Read-only. The value that corresponds to a SSM parameter key. This field is returned only for SSM parameter types in the template.

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

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

      • StatusReason (string) --

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

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

DescribeStackSetOperation (updated) Link ¶
Changes (response)
{'StackSetOperation': {'StatusDetails': {'FailedStackInstancesCount': 'integer'}}}

Returns the description of the specified stack set operation.

See also: AWS API Documentation

Request Syntax

client.describe_stack_set_operation(
    StackSetName='string',
    OperationId='string',
    CallAs='SELF'|'DELEGATED_ADMIN'
)
type StackSetName:

string

param StackSetName:

[REQUIRED]

The name or the unique stack ID of the stack set for the stack operation.

type OperationId:

string

param OperationId:

[REQUIRED]

The unique ID of the stack set operation.

type CallAs:

string

param CallAs:

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

rtype:

dict

returns:

Response Syntax

{
    'StackSetOperation': {
        'OperationId': 'string',
        'StackSetId': 'string',
        'Action': 'CREATE'|'UPDATE'|'DELETE'|'DETECT_DRIFT',
        'Status': 'RUNNING'|'SUCCEEDED'|'FAILED'|'STOPPING'|'STOPPED'|'QUEUED',
        'OperationPreferences': {
            'RegionConcurrencyType': 'SEQUENTIAL'|'PARALLEL',
            'RegionOrder': [
                'string',
            ],
            'FailureToleranceCount': 123,
            'FailureTolerancePercentage': 123,
            'MaxConcurrentCount': 123,
            'MaxConcurrentPercentage': 123
        },
        'RetainStacks': True|False,
        'AdministrationRoleARN': 'string',
        'ExecutionRoleName': 'string',
        'CreationTimestamp': datetime(2015, 1, 1),
        'EndTimestamp': datetime(2015, 1, 1),
        'DeploymentTargets': {
            'Accounts': [
                'string',
            ],
            'AccountsUrl': 'string',
            'OrganizationalUnitIds': [
                'string',
            ],
            'AccountFilterType': 'NONE'|'INTERSECTION'|'DIFFERENCE'|'UNION'
        },
        'StackSetDriftDetectionDetails': {
            'DriftStatus': 'DRIFTED'|'IN_SYNC'|'NOT_CHECKED',
            'DriftDetectionStatus': 'COMPLETED'|'FAILED'|'PARTIAL_SUCCESS'|'IN_PROGRESS'|'STOPPED',
            'LastDriftCheckTimestamp': datetime(2015, 1, 1),
            'TotalStackInstancesCount': 123,
            'DriftedStackInstancesCount': 123,
            'InSyncStackInstancesCount': 123,
            'InProgressStackInstancesCount': 123,
            'FailedStackInstancesCount': 123
        },
        'StatusReason': 'string',
        'StatusDetails': {
            'FailedStackInstancesCount': 123
        }
    }
}

Response Structure

  • (dict) --

    • StackSetOperation (dict) --

      The specified stack set operation.

      • OperationId (string) --

        The unique ID of a stack set operation.

      • StackSetId (string) --

        The ID of the stack set.

      • Action (string) --

        The type of stack set operation: CREATE, UPDATE, or DELETE. Create and delete operations affect only the specified stack set instances that are associated with the specified stack set. Update operations affect both the stack set itself, in addition to all associated stack set instances.

      • Status (string) --

        The status of the operation.

        • FAILED: The operation exceeded the specified failure tolerance. The failure tolerance value that you've set for an operation is applied for each Region during stack create and update operations. If the number of failed stacks within a Region exceeds the failure tolerance, the status of the operation in the Region is set to FAILED. This in turn sets the status of the operation as a whole to FAILED, and CloudFormation cancels the operation in any remaining Regions.

        • QUEUED: [Service-managed permissions] For automatic deployments that require a sequence of operations, the operation is queued to be performed. For more information, see the stack set operation status codes in the CloudFormation User Guide.

        • RUNNING: The operation is currently being performed.

        • STOPPED: The user has canceled the operation.

        • STOPPING: The operation is in the process of stopping, at user request.

        • SUCCEEDED: The operation completed creating or updating all the specified stacks without exceeding the failure tolerance for the operation.

      • OperationPreferences (dict) --

        The preferences for how CloudFormation performs this stack set operation.

        • RegionConcurrencyType (string) --

          The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.

        • RegionOrder (list) --

          The order of the Regions in where you want to perform the stack operation.

          • (string) --

        • FailureToleranceCount (integer) --

          The number of accounts, per Region, for which this operation can fail before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions.

          Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage (but not both).

          By default, 0 is specified.

        • FailureTolerancePercentage (integer) --

          The percentage of accounts, per Region, for which this stack operation can fail before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions.

          When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number.

          Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage, but not both.

          By default, 0 is specified.

        • MaxConcurrentCount (integer) --

          The maximum number of accounts in which to perform this operation at one time. This is dependent on the value of FailureToleranceCount. MaxConcurrentCount is at most one more than the FailureToleranceCount.

          Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.

          Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, but not both.

          By default, 1 is specified.

        • MaxConcurrentPercentage (integer) --

          The maximum percentage of accounts in which to perform this operation at one time.

          When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead.

          Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.

          Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, but not both.

          By default, 1 is specified.

      • RetainStacks (boolean) --

        For stack set operations of action type DELETE, specifies whether to remove the stack instances from the specified stack set, but doesn't delete the stacks. You can't re-associate a retained stack, or add an existing, saved stack to a new stack set.

      • AdministrationRoleARN (string) --

        The Amazon Resource Name (ARN) of the IAM role used to perform this stack set operation.

        Use customized administrator roles to control which users or groups can manage specific stack sets within the same administrator account. For more information, see Define Permissions for Multiple Administrators in the CloudFormation User Guide.

      • ExecutionRoleName (string) --

        The name of the IAM execution role used to create or update the stack set.

        Use customized execution roles to control which stack resources users and groups can include in their stack sets.

      • CreationTimestamp (datetime) --

        The time at which the operation was initiated. Note that the creation times for the stack set operation might differ from the creation time of the individual stacks themselves. This is because CloudFormation needs to perform preparatory work for the operation, such as dispatching the work to the requested Regions, before actually creating the first stacks.

      • EndTimestamp (datetime) --

        The time at which the stack set operation ended, across all accounts and Regions specified. Note that this doesn't necessarily mean that the stack set operation was successful, or even attempted, in each account or Region.

      • DeploymentTargets (dict) --

        [Service-managed permissions] The Organizations accounts affected by the stack operation.

        • Accounts (list) --

          The names of one or more Amazon Web Services accounts for which you want to deploy stack set updates.

          • (string) --

        • AccountsUrl (string) --

          Returns the value of the AccountsUrl property.

        • OrganizationalUnitIds (list) --

          The organization root ID or organizational unit (OU) IDs to which StackSets deploys.

          • (string) --

        • AccountFilterType (string) --

          Limit deployment targets to individual accounts or include additional accounts with provided OUs.

          The following is a list of possible values for the AccountFilterType operation.

          • INTERSECTION: StackSets deploys to the accounts specified in Accounts parameter.

          • DIFFERENCE: StackSets excludes the accounts specified in Accounts parameter. This enables user to avoid certain accounts within an OU such as suspended accounts.

          • UNION: StackSets includes additional accounts deployment targets. This is the default value if AccountFilterType is not provided. This enables user to update an entire OU and individual accounts from a different OU in one request, which used to be two separate requests.

          • NONE: Deploys to all the accounts in specified organizational units (OU).

      • StackSetDriftDetectionDetails (dict) --

        Detailed information about the drift status of the stack set. This includes information about drift operations currently being performed on the stack set.

        This information will only be present for stack set operations whose Action type is DETECT_DRIFT.

        For more information, see Detecting Unmanaged Changes in Stack Sets in the CloudFormation User Guide.

        • DriftStatus (string) --

          Status of the stack set's actual configuration compared to its expected template and parameter configuration. A stack set is considered to have drifted if one or more of its stack instances have drifted from their expected template and parameter configuration.

          • DRIFTED: One or more of the stack instances belonging to the stack set stack differs from the expected template and parameter configuration. 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 the stack set for drift.

          • IN_SYNC: All of the stack instances belonging to the stack set stack match from the expected template and parameter configuration.

        • DriftDetectionStatus (string) --

          The status of the stack set drift detection operation.

          • COMPLETED: The drift detection operation completed without failing on any stack instances.

          • FAILED: The drift detection operation exceeded the specified failure tolerance.

          • PARTIAL_SUCCESS: The drift detection operation completed without exceeding the failure tolerance for the operation.

          • IN_PROGRESS: The drift detection operation is currently being performed.

          • STOPPED: The user has canceled the drift detection operation.

        • LastDriftCheckTimestamp (datetime) --

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

        • TotalStackInstancesCount (integer) --

          The total number of stack instances belonging to this stack set.

          The total number of stack instances is equal to the total of:

          • Stack instances that match the stack set configuration.

          • Stack instances that have drifted from the stack set configuration.

          • Stack instances where the drift detection operation has failed.

          • Stack instances currently being checked for drift.

        • DriftedStackInstancesCount (integer) --

          The number of stack instances that have drifted from the expected template and parameter configuration of the stack set. A stack instance is considered to have drifted if one or more of the resources in the associated stack don't match their expected configuration.

        • InSyncStackInstancesCount (integer) --

          The number of stack instances which match the expected template and parameter configuration of the stack set.

        • InProgressStackInstancesCount (integer) --

          The number of stack instances that are currently being checked for drift.

        • FailedStackInstancesCount (integer) --

          The number of stack instances for which the drift detection operation failed.

      • StatusReason (string) --

        The status of the operation in details.

      • StatusDetails (dict) --

        Detailed information about the StackSet operation.

        • FailedStackInstancesCount (integer) --

          The number of stack instances for which the StackSet operation failed.

ListStackInstances (updated) Link ¶
Changes (request, response)
Request
{'Filters': {'Name': {'LAST_OPERATION_ID'}}}
Response
{'Summaries': {'LastOperationId': 'string'}}

Returns summary information about stack instances that are associated with the specified stack set. You can filter for stack instances that are associated with a specific Amazon Web Services account name or Region, or that have a specific status.

See also: AWS API Documentation

Request Syntax

client.list_stack_instances(
    StackSetName='string',
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'DETAILED_STATUS'|'LAST_OPERATION_ID',
            'Values': 'string'
        },
    ],
    StackInstanceAccount='string',
    StackInstanceRegion='string',
    CallAs='SELF'|'DELEGATED_ADMIN'
)
type StackSetName:

string

param StackSetName:

[REQUIRED]

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

type NextToken:

string

param NextToken:

If the previous request didn't return all the remaining results, the response's NextToken parameter value is set to a token. To retrieve the next set of results, call ListStackInstances again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

type MaxResults:

integer

param MaxResults:

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

type Filters:

list

param Filters:

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.

type StackInstanceAccount:

string

param StackInstanceAccount:

The name of the Amazon Web Services account that you want to list stack instances for.

type StackInstanceRegion:

string

param StackInstanceRegion:

The name of the Region where you want to list stack instances.

type CallAs:

string

param CallAs:

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

rtype:

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'
        },
    ],
    'NextToken': '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.

    • NextToken (string) --

      If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackInstances again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null.

ListStackSetOperationResults (updated) Link ¶
Changes (request)
{'Filters': [{'Name': 'OPERATION_RESULT_STATUS', 'Values': 'string'}]}

Returns summary information about the results of a stack set operation.

See also: AWS API Documentation

Request Syntax

client.list_stack_set_operation_results(
    StackSetName='string',
    OperationId='string',
    NextToken='string',
    MaxResults=123,
    CallAs='SELF'|'DELEGATED_ADMIN',
    Filters=[
        {
            'Name': 'OPERATION_RESULT_STATUS',
            'Values': 'string'
        },
    ]
)
type StackSetName:

string

param StackSetName:

[REQUIRED]

The name or unique ID of the stack set that you want to get operation results for.

type OperationId:

string

param OperationId:

[REQUIRED]

The ID of the stack set operation.

type NextToken:

string

param NextToken:

If the previous request didn't return all the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call ListStackSetOperationResults again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

type MaxResults:

integer

param MaxResults:

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

type CallAs:

string

param CallAs:

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

type Filters:

list

param Filters:

The filter to apply to operation results.

  • (dict) --

    The status that operation results are filtered by.

    • Name (string) --

      The type of filter to apply.

    • Values (string) --

      The value to filter by.

rtype:

dict

returns:

Response Syntax

{
    'Summaries': [
        {
            'Account': 'string',
            'Region': 'string',
            'Status': 'PENDING'|'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELLED',
            'StatusReason': 'string',
            'AccountGateResult': {
                'Status': 'SUCCEEDED'|'FAILED'|'SKIPPED',
                'StatusReason': 'string'
            },
            'OrganizationalUnitId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Summaries (list) --

      A list of StackSetOperationResultSummary structures that contain information about the specified operation results, for accounts and Amazon Web Services Regions that are included in the operation.

      • (dict) --

        The structure that contains information about a specified operation's results for a given account in a given Region.

        • Account (string) --

          [Self-managed permissions] The name of the Amazon Web Services account for this operation result.

        • Region (string) --

          The name of the Amazon Web Services Region for this operation result.

        • Status (string) --

          The result status of the stack set operation for the given account in the given Region.

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

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

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

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

        • StatusReason (string) --

          The reason for the assigned result status.

        • AccountGateResult (dict) --

          The results of the account gate function CloudFormation invokes, if present, before proceeding with stack set operations in an account.

          • Status (string) --

            The status of the account gate function.

            • SUCCEEDED: The account gate function has determined that the account and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.

            • FAILED: The account gate function has determined that the account and Region doesn't meet the requirements for a stack set operation to occur. CloudFormation cancels the stack set operation in that account and Region, and sets the stack set operation result status for that account and Region to FAILED.

            • SKIPPED: CloudFormation has skipped calling the account gate function for this account and Region, for one of the following reasons:

              • An account gate function hasn't been specified for the account and Region. CloudFormation proceeds with the stack set operation in this account and Region.

              • The AWSCloudFormationStackSetExecutionRole of the stack set administration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and Region.

              • Either no action is necessary, or no action is possible, on the stack. CloudFormation skips the stack set operation in this account and Region.

          • StatusReason (string) --

            The reason for the account gate status assigned to this account and Region for the stack set operation.

        • OrganizationalUnitId (string) --

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

    • NextToken (string) --

      If the request doesn't return all results, NextToken is set to a token. To retrieve the next set of results, call ListOperationResults again and assign that token to the request object's NextToken parameter. If there are no remaining results, NextToken is set to null.

ListStackSetOperations (updated) Link ¶
Changes (response)
{'Summaries': {'OperationPreferences': {'FailureToleranceCount': 'integer',
                                        'FailureTolerancePercentage': 'integer',
                                        'MaxConcurrentCount': 'integer',
                                        'MaxConcurrentPercentage': 'integer',
                                        'RegionConcurrencyType': 'SEQUENTIAL | '
                                                                 'PARALLEL',
                                        'RegionOrder': ['string']},
               'StatusDetails': {'FailedStackInstancesCount': 'integer'}}}

Returns summary information about operations performed on a stack set.

See also: AWS API Documentation

Request Syntax

client.list_stack_set_operations(
    StackSetName='string',
    NextToken='string',
    MaxResults=123,
    CallAs='SELF'|'DELEGATED_ADMIN'
)
type StackSetName:

string

param StackSetName:

[REQUIRED]

The name or unique ID of the stack set that you want to get operation summaries for.

type NextToken:

string

param NextToken:

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call ListStackSetOperations again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

type MaxResults:

integer

param MaxResults:

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

type CallAs:

string

param CallAs:

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

rtype:

dict

returns:

Response Syntax

{
    'Summaries': [
        {
            'OperationId': 'string',
            'Action': 'CREATE'|'UPDATE'|'DELETE'|'DETECT_DRIFT',
            'Status': 'RUNNING'|'SUCCEEDED'|'FAILED'|'STOPPING'|'STOPPED'|'QUEUED',
            'CreationTimestamp': datetime(2015, 1, 1),
            'EndTimestamp': datetime(2015, 1, 1),
            'StatusReason': 'string',
            'StatusDetails': {
                'FailedStackInstancesCount': 123
            },
            'OperationPreferences': {
                'RegionConcurrencyType': 'SEQUENTIAL'|'PARALLEL',
                'RegionOrder': [
                    'string',
                ],
                'FailureToleranceCount': 123,
                'FailureTolerancePercentage': 123,
                'MaxConcurrentCount': 123,
                'MaxConcurrentPercentage': 123
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Summaries (list) --

      A list of StackSetOperationSummary structures that contain summary information about operations for the specified stack set.

      • (dict) --

        The structures that contain summary information about the specified operation.

        • OperationId (string) --

          The unique ID of the stack set operation.

        • Action (string) --

          The type of operation: CREATE, UPDATE, or DELETE. Create and delete operations affect only the specified stack instances that are associated with the specified stack set. Update operations affect both the stack set itself and all associated stack set instances.

        • Status (string) --

          The overall status of the operation.

          • FAILED: The operation exceeded the specified failure tolerance. The failure tolerance value that you've set for an operation is applied for each Region during stack create and update operations. If the number of failed stacks within a Region exceeds the failure tolerance, the status of the operation in the Region is set to FAILED. This in turn sets the status of the operation as a whole to FAILED, and CloudFormation cancels the operation in any remaining Regions.

          • QUEUED: [Service-managed permissions] For automatic deployments that require a sequence of operations, the operation is queued to be performed. For more information, see the stack set operation status codes in the CloudFormation User Guide.

          • RUNNING: The operation is currently being performed.

          • STOPPED: The user has canceled the operation.

          • STOPPING: The operation is in the process of stopping, at user request.

          • SUCCEEDED: The operation completed creating or updating all the specified stacks without exceeding the failure tolerance for the operation.

        • CreationTimestamp (datetime) --

          The time at which the operation was initiated. Note that the creation times for the stack set operation might differ from the creation time of the individual stacks themselves. This is because CloudFormation needs to perform preparatory work for the operation, such as dispatching the work to the requested Regions, before actually creating the first stacks.

        • EndTimestamp (datetime) --

          The time at which the stack set operation ended, across all accounts and Regions specified. Note that this doesn't necessarily mean that the stack set operation was successful, or even attempted, in each account or Region.

        • StatusReason (string) --

          The status of the operation in details.

        • StatusDetails (dict) --

          Detailed information about the stack set operation.

          • FailedStackInstancesCount (integer) --

            The number of stack instances for which the StackSet operation failed.

        • OperationPreferences (dict) --

          The user-specified preferences for how CloudFormation performs a stack set operation.

          For more information about maximum concurrent accounts and failure tolerance, see Stack set operation options.

          • RegionConcurrencyType (string) --

            The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.

          • RegionOrder (list) --

            The order of the Regions in where you want to perform the stack operation.

            • (string) --

          • FailureToleranceCount (integer) --

            The number of accounts, per Region, for which this operation can fail before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions.

            Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage (but not both).

            By default, 0 is specified.

          • FailureTolerancePercentage (integer) --

            The percentage of accounts, per Region, for which this stack operation can fail before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions.

            When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number.

            Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage, but not both.

            By default, 0 is specified.

          • MaxConcurrentCount (integer) --

            The maximum number of accounts in which to perform this operation at one time. This is dependent on the value of FailureToleranceCount. MaxConcurrentCount is at most one more than the FailureToleranceCount.

            Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.

            Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, but not both.

            By default, 1 is specified.

          • MaxConcurrentPercentage (integer) --

            The maximum percentage of accounts in which to perform this operation at one time.

            When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead.

            Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.

            Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, but not both.

            By default, 1 is specified.

    • NextToken (string) --

      If the request doesn't return all results, NextToken is set to a token. To retrieve the next set of results, call ListOperationResults again and assign that token to the request object's NextToken parameter. If there are no remaining results, NextToken is set to null.