选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

DetectStackSetDrift - AWS CloudFormation
此页面尚未翻译为您的语言。 请求翻译

DetectStackSetDrift

Detect drift on a stack set. When CloudFormation performs drift detection on a stack set, it performs drift detection on the stack associated with each stack instance in the stack set. For more information, see Performing drift detection on CloudFormation StackSets.

DetectStackSetDrift returns the OperationId of the stack set drift detection operation. Use this operation id with DescribeStackSetOperation to monitor the progress of the drift detection operation. The drift detection operation may take some time, depending on the number of stack instances included in the stack set, in addition to the number of resources included in each stack.

Once the operation has completed, use the following actions to return drift information:

  • Use DescribeStackSet to return detailed information about the stack set, including detailed information about the last completed drift operation performed on the stack set. (Information about drift operations that are in progress isn't included.)

  • Use ListStackInstances to return a list of stack instances belonging to the stack set, including the drift status and last drift time checked of each instance.

  • Use DescribeStackInstance to return detailed information about a specific stack instance, including its drift status and last drift time checked.

You can only run a single drift detection operation on a given stack set at one time.

To stop a drift detection stack set operation, use StopStackSetOperation.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

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 AWS account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the AWS CloudFormation User Guide.

Type: String

Valid Values: SELF | DELEGATED_ADMIN

Required: No

OperationId

The ID of the stack set operation.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9][-a-zA-Z0-9]*

Required: No

OperationPreferences

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.

Type: StackSetOperationPreferences object

Required: No

StackSetName

The name of the stack set on which to perform the drift detection operation.

Type: String

Pattern: [a-zA-Z][-a-zA-Z0-9]*(?::[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})?

Required: Yes

Response Elements

The following element is returned by the service.

OperationId

The ID of the drift detection stack set operation.

You can use this operation ID with DescribeStackSetOperation to monitor the progress of the drift detection operation.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9][-a-zA-Z0-9]*

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidOperation

The specified operation isn't valid.

HTTP Status Code: 400

OperationInProgress

Another operation is currently in progress for this stack set. Only one operation can be performed for a stack set at a given time.

HTTP Status Code: 409

StackSetNotFound

The specified stack set doesn't exist.

HTTP Status Code: 404

Examples

DetectStackSetDrift

This example illustrates one usage of DetectStackSetDrift.

Sample Request

https://cloudformation.us-east-1.amazonaws.com/ ?Action=DetectStackSetDrift &Version=2010-05-15 &StackSetName=stack-set-example &OperationId=9cc082fa-df4c-45cd-b9a8-7e56example &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=[Access key ID and scope] &X-Amz-Date=20191203T195756Z &X-Amz-SignedHeaders=content-type;host &X-Amz-Signature=[Signature]

Sample Response

<DetectStackSetDriftResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/"> <DetectStackSetDriftResult> <OperationId>9cc082fa-df4c-45cd-b9a8-7e56example</OperationId> </DetectStackSetDriftResult> <ResponseMetadata> <RequestId>38309f0a-d5f5-4330-b6ca-8eb1example</RequestId> </ResponseMetadata> </DetectStackSetDriftResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。