CloudFormation / Client / describe_stack_set_operation

describe_stack_set_operation#

CloudFormation.Client.describe_stack_set_operation(**kwargs)#

Returns the description of the specified StackSet operation.

See also: AWS API Documentation

Request Syntax

response = client.describe_stack_set_operation(
    StackSetName='string',
    OperationId='string',
    CallAs='SELF'|'DELEGATED_ADMIN'
)
Parameters:
  • StackSetName (string) –

    [REQUIRED]

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

  • OperationId (string) –

    [REQUIRED]

    The unique ID of the stack set operation.

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

Return type:

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,
            'ConcurrencyMode': 'STRICT_FAILURE_TOLERANCE'|'SOFT_FAILURE_TOLERANCE'
        },
        '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 where you want to perform the stack operation.

          Note

          RegionOrder isn’t followed if AutoDeployment is enabled.

          • (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 can depend on the value of FailureToleranceCount depending on your ConcurrencyMode. MaxConcurrentCount is at most one more than the FailureToleranceCount if you’re using STRICT_FAILURE_TOLERANCE.

          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.

        • ConcurrencyMode (string) –

          Specifies how the concurrency level behaves during the operation execution.

          • STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior. If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

          • SOFT_FAILURE_TOLERANCE: This option decouples FailureToleranceCount from the actual concurrency. This allows stack set operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage, regardless of the number of failures.

      • 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 Detect stack set drift 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.

Exceptions