You can call this operation to detect drift on a stack.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DetectStackDrift |
The operation that you want to perform. Set the value to DetectStackDrift. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list. |
StackId | String | Yes | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
The ID of the stack. |
LogicalResourceId.N | RepeatList | No | ScalingRule |
The logical ID of resource N, which is used to filter resources. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The value can be up to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_). For more information, see How to ensure idempotence. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DriftDetectionId | String | a7044f0d-6f2e-4128-a307-4524ef88**** |
The ID of the drift detection. |
RequestId | String | B288A0BE-D927-4888-B0F7-B35EF84B6E6 |
The ID of the request. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/? Action=DetectStackDrift
&RegionId=cn-hangzhou
&StackId=4a6c9851-3b0f-4f5f-b4ca-a14bf691****
&<Common request parameters>
Sample success responses
XML
format
<DetectStackDriftResponse>
<DriftDetectionId>a7044f0d-6f2e-4128-a307-4524ef88****</DriftDetectionId>
<RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6</RequestId>
</DetectStackDriftResponse>
JSON
format
{
"DriftDetectionId": "a7044f0d-6f2e-4128-a307-4524ef88****",
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6"
}
Error codes
For a list of error codes, visit the API Error Center.
HttpCode |
Error code |
Error message |
Description |
---|---|---|---|
404 |
StackNotFound |
The Stack ({name}) could not be found. |
The error message returned because the specified stack does not exist. name indicates the name or ID of the stack. |
404 |
ResourceNotFound |
The Resource ({name}) could not be found in Stack {stack}. |
The error message returned because the specified resource does not exist in the specified stack. name indicates the resource name, and stack indicates the stack name or ID. |
409 |
ActionInProgress |
Stack {name} already has an action ({action}) in progress. |
The error message returned because the specified stack has a change operation in progress. name indicates the name or ID of the stack, and action indicates the change operation. |