stack_set_operations
Creates, updates, deletes, gets or lists a stack_set_operations resource.
Overview
| Name | stack_set_operations |
| Type | Resource |
| Id | aws.cloudformation.stack_set_operations |
Fields
The following fields are returned by SELECT queries:
- describe_stack_set_operation
- list_stack_set_operations
| Name | Datatype | Description |
|---|---|---|
action | string | The type of StackSet operation: CREATE, UPDATE, or DELETE. Create and delete operations affect only the specified stack instances that are associated with the specified StackSet. Update operations affect both the StackSet itself, in addition to all associated stack instances. |
administration_role_arn | string | The Amazon Resource Name (ARN) of the IAM role used to perform this StackSet operation. Use customized administrator roles to control which users or groups can manage specific StackSets within the same administrator account. For more information, see Grant self-managed permissions in the CloudFormation User Guide. |
creation_timestamp | string | 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. |
deployment_targets | string | The Organizations accounts affected by the stack operation. Valid only if the StackSet uses service-managed permissions. |
end_timestamp | string | The time at which the StackSet operation ended, across all accounts and Regions specified. Note that this doesn't necessarily mean that the StackSet operation was successful, or even attempted, in each account or Region. |
execution_role_name | string | The name of the IAM execution role used to create or update the StackSet. Use customized execution roles to control which stack resources users and groups can include in their StackSets. |
operation_id | string | The unique ID of a StackSet operation. |
operation_preferences | string | The preferences for how CloudFormation performs this StackSet operation. |
retain_stacks | boolean | For StackSet operations of action type DELETE, specifies whether to remove the stack instances from the specified StackSet, but doesn't delete the stacks. You can't re-associate a retained stack, or add an existing, saved stack to a new StackSet. |
stack_set_drift_detection_details | string | Detailed information about the drift status of the StackSet. This includes information about drift operations currently being performed on the StackSet. This information will only be present for StackSet operations whose Action type is DETECT_DRIFT. For more information, see Performing drift detection on CloudFormation StackSets in the CloudFormation User Guide. |
stack_set_id | string | The ID of the StackSet. |
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 StackSets 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. |
status_details | string | Detailed information about the StackSet operation. |
status_reason | string | The status of the operation in details. |
| Name | Datatype | Description |
|---|---|---|
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 StackSet. Update operations affect both the StackSet itself and all associated StackSet instances. |
creation_timestamp | string | The time at which the operation was initiated. Note that the creation times for the StackSet 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. |
end_timestamp | string | The time at which the StackSet operation ended, across all accounts and Regions specified. Note that this doesn't necessarily mean that the StackSet operation was successful, or even attempted, in each account or Region. |
operation_id | string | The unique ID of the StackSet operation. |
operation_preferences | string | The user-specified preferences for how CloudFormation performs a StackSet operation. For more information about maximum concurrent accounts and failure tolerance, see StackSet operation options. |
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 StackSet 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. |
status_details | string | Detailed information about the StackSet operation. |
status_reason | string | The status of the operation in details. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stack_set_operation | select | StackSetName, OperationId, region | CallAs | Returns the description of the specified StackSet operation. This API provides strongly consistent reads meaning it will always return the most up-to-date data. |
list_stack_set_operations | select | StackSetName, region | NextToken, MaxResults, CallAs | Returns summary information about operations performed on a StackSet. This API provides eventually consistent reads meaning it may take some time but will eventually return the most up-to-date data. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
OperationId | string | The unique ID of the StackSet operation. |
StackSetName | string | The name or unique ID of the StackSet that you want to get operation summaries for. |
region | string | AWS region (default: us-east-1) |
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 StackSets 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. |
MaxResults | integer | 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. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
SELECT examples
- describe_stack_set_operation
- list_stack_set_operations
Returns the description of the specified StackSet operation. This API provides strongly consistent reads meaning it will always return the most up-to-date data.
SELECT
action,
administration_role_arn,
creation_timestamp,
deployment_targets,
end_timestamp,
execution_role_name,
operation_id,
operation_preferences,
retain_stacks,
stack_set_drift_detection_details,
stack_set_id,
status,
status_details,
status_reason
FROM aws.cloudformation.stack_set_operations
WHERE StackSetName = '{{ StackSetName }}' -- required
AND OperationId = '{{ OperationId }}' -- required
AND region = '{{ region }}' -- required
AND CallAs = '{{ CallAs }}'
;
Returns summary information about operations performed on a StackSet. This API provides eventually consistent reads meaning it may take some time but will eventually return the most up-to-date data.
SELECT
action,
creation_timestamp,
end_timestamp,
operation_id,
operation_preferences,
status,
status_details,
status_reason
FROM aws.cloudformation.stack_set_operations
WHERE StackSetName = '{{ StackSetName }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND CallAs = '{{ CallAs }}'
;