Skip to main content

stack_instance_resource_drifts

Creates, updates, deletes, gets or lists a stack_instance_resource_drifts resource.

Overview

Namestack_instance_resource_drifts
TypeResource
Idaws.cloudformation.stack_instance_resource_drifts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
logical_resource_idstringThe logical name of the resource specified in the template.
physical_resource_idstringThe name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.
physical_resource_id_contextstringContext information that enables CloudFormation to uniquely identify a resource. CloudFormation uses context key-value pairs in cases where a resource's logical and physical IDs aren't enough to uniquely identify that resource. Each context key-value pair specifies a unique resource that contains the targeted resource.
property_differencesstringStatus of the actual configuration of the resource compared to its expected configuration. These will be present only for resources whose StackInstanceResourceDriftStatus is MODIFIED.
resource_typestringType of resource. For more information, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.
stack_idstringThe ID of the stack instance.
stack_resource_drift_statusstringThe drift status of the resource in a stack instance. DELETED: The resource differs from its expected template configuration in that the resource has been deleted. MODIFIED: One or more resource properties differ from their expected template values. IN_SYNC: The resource's actual configuration matches its expected template configuration. NOT_CHECKED: CloudFormation doesn't currently return this value.
timestampstringTime at which the stack instance drift detection operation was initiated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_stack_instance_resource_driftsselectStackSetName, StackInstanceAccount, StackInstanceRegion, OperationId, regionNextToken, MaxResults, StackInstanceResourceDriftStatuses, CallAsReturns drift information for resources in a stack instance. ListStackInstanceResourceDrifts returns drift information for the most recent drift detection operation. If an operation is in progress, it may only return partial results.

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.

NameDatatypeDescription
OperationIdstringThe unique ID of the drift operation.
StackInstanceAccountstringThe name of the Amazon Web Services account that you want to list resource drifts for.
StackInstanceRegionstringThe name of the Region where you want to list resource drifts.
StackSetNamestringThe name or unique ID of the StackSet that you want to list drifted resources for.
regionstringAWS region (default: us-east-1)
CallAsstring[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.
MaxResultsintegerThe 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.
NextTokenstringThe token for the next set of items to return. (You received this token from a previous call.)
StackInstanceResourceDriftStatusesarrayThe resource drift status of the stack instance. DELETED: The resource differs from its expected template configuration in that the resource has been deleted. MODIFIED: One or more resource properties differ from their expected template values. IN_SYNC: The resource's actual configuration matches its expected template configuration. NOT_CHECKED: CloudFormation doesn't currently return this value.

SELECT examples

Returns drift information for resources in a stack instance. ListStackInstanceResourceDrifts returns drift information for the most recent drift detection operation. If an operation is in progress, it may only return partial results.

SELECT
logical_resource_id,
physical_resource_id,
physical_resource_id_context,
property_differences,
resource_type,
stack_id,
stack_resource_drift_status,
timestamp
FROM aws.cloudformation.stack_instance_resource_drifts
WHERE StackSetName = '{{ StackSetName }}' -- required
AND StackInstanceAccount = '{{ StackInstanceAccount }}' -- required
AND StackInstanceRegion = '{{ StackInstanceRegion }}' -- required
AND OperationId = '{{ OperationId }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND StackInstanceResourceDriftStatuses = '{{ StackInstanceResourceDriftStatuses }}'
AND CallAs = '{{ CallAs }}'
;