Skip to content

list_stack_instance_resource_drifts async

list_stack_instance_resource_drifts(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    stack_set_name: Optional[StackSetNameOrId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    stack_instance_resource_drift_statuses: Optional[
        StackResourceDriftStatusFilters
    ] = None,
    stack_instance_account: Optional[Account] = None,
    stack_instance_region: Optional[Region] = None,
    operation_id: Optional[ClientRequestToken] = None,
    call_as: Optional[CallAs] = None,
) -> ListStackInstanceResourceDriftsOutput

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.

Parameters:

  • stack_set_name (Optional[StackSetNameOrId], default: None ) –

    The name or unique ID of the StackSet that you want to list drifted resources for.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of items to return. (You received this token from a previous call.)

  • max_results (Optional[MaxResults], default: None ) –

    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.

  • stack_instance_resource_drift_statuses (Optional[StackResourceDriftStatusFilters], default: None ) –

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

  • stack_instance_account (Optional[Account], default: None ) –

    The name of the Amazon Web Services account that you want to list resource drifts for.

  • stack_instance_region (Optional[Region], default: None ) –

    The name of the Region where you want to list resource drifts.

  • operation_id (Optional[ClientRequestToken], default: None ) –

    The unique ID of the drift operation.

  • call_as (Optional[CallAs], default: None ) –

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

Raises:

Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def list_stack_instance_resource_drifts(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    stack_set_name: Optional[
        "capo_cloudformation.types.stack_set_name_or_id.StackSetNameOrId"
    ] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_cloudformation.types.max_results.MaxResults"
    ] = None,
    stack_instance_resource_drift_statuses: Optional[
        "capo_cloudformation.types.stack_resource_drift_status_filters.StackResourceDriftStatusFilters"
    ] = None,
    stack_instance_account: Optional[
        "capo_cloudformation.types.account.Account"
    ] = None,
    stack_instance_region: Optional[
        "capo_cloudformation.types.region.Region"
    ] = None,
    operation_id: Optional[
        "capo_cloudformation.types.client_request_token.ClientRequestToken"
    ] = None,
    call_as: Optional["capo_cloudformation.types.call_as.CallAs"] = None,
) -> "capo_cloudformation.types.list_stack_instance_resource_drifts_output.ListStackInstanceResourceDriftsOutput":
    """<p>Returns drift information for resources in a stack instance.</p> <note> <p> <code>ListStackInstanceResourceDrifts</code> returns drift information for the most recent drift detection operation. If an operation is in progress, it may only return partial results.</p> </note>

    Args:
        stack_set_name: <p>The name or unique ID of the StackSet that you want to list drifted resources for.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        max_results: <p>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 <code>NextToken</code> value that you can assign to the <code>NextToken</code> request parameter to get the next set of results.</p>
        stack_instance_resource_drift_statuses: <p>The resource drift status of the stack instance. </p> <ul> <li> <p> <code>DELETED</code>: The resource differs from its expected template configuration in that the resource has been deleted.</p> </li> <li> <p> <code>MODIFIED</code>: One or more resource properties differ from their expected template values.</p> </li> <li> <p> <code>IN_SYNC</code>: The resource's actual configuration matches its expected template configuration.</p> </li> <li> <p> <code>NOT_CHECKED</code>: CloudFormation doesn't currently return this value.</p> </li> </ul>
        stack_instance_account: <p>The name of the Amazon Web Services account that you want to list resource drifts for.</p>
        stack_instance_region: <p>The name of the Region where you want to list resource drifts.</p>
        operation_id: <p>The unique ID of the drift operation.</p>
        call_as: <p>[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.</p> <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for StackSets with self-managed permissions.</p> <ul> <li> <p>If you are signed in to the management account, specify <code>SELF</code>.</p> </li> <li> <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p> <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p> </li> </ul>

    Raises:
        capo_cloudformation.errors.operation_not_found_exception.OperationNotFoundException: <p>The specified ID refers to an operation that doesn't exist.</p>
        capo_cloudformation.errors.stack_instance_not_found_exception.StackInstanceNotFoundException: <p>The specified stack instance doesn't exist.</p>
        capo_cloudformation.errors.stack_set_not_found_exception.StackSetNotFoundException: <p>The specified StackSet doesn't exist.</p>
        capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.list_stack_instance_resource_drifts_input.ListStackInstanceResourceDriftsInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.list_stack_instance_resource_drifts_output.ListStackInstanceResourceDriftsOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.list_stack_instance_resource_drifts

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.list_stack_instance_resource_drifts.async_list_stack_instance_resource_drifts(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListStackInstanceResourceDrifts")
    )
    input_: capo_cloudformation.types.list_stack_instance_resource_drifts_input.ListStackInstanceResourceDriftsInput = {}
    if stack_set_name is not None:
        input_["stack_set_name"] = stack_set_name
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if stack_instance_resource_drift_statuses is not None:
        input_["stack_instance_resource_drift_statuses"] = (
            stack_instance_resource_drift_statuses
        )
    if stack_instance_account is not None:
        input_["stack_instance_account"] = stack_instance_account
    if stack_instance_region is not None:
        input_["stack_instance_region"] = stack_instance_region
    if operation_id is not None:
        input_["operation_id"] = operation_id
    if call_as is not None:
        input_["call_as"] = call_as

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output