Queries the drift detection status of a stack.
In this topic, the status of a drift detection operation whose ID is a7044f0d-6f2e-4128-a307-4524ef88****
is queried. The operation is performed in the China (Hangzhou) region.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetStackDriftDetectionStatus |
The operation that you want to perform. Set the value to GetStackDriftDetectionStatus. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the stack to be detected for drift. You can call the DescribeRegions operation to query the most recent region list. |
DriftDetectionId | String | Yes | a7044f0d-6f2e-4128-a307-4524ef88**** |
The ID of the drift detection operation. You can call the ListStackResourceDrifts operation to obtain the ID of the drift detection operation. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | B288A0BE-D927-4888-B0F7-B35EF84B6E6F |
The ID of the request. |
DriftDetectionTime | String | 2020-02-27T07:47:47 |
The time when the stack drift detection operation was initiated. |
DriftDetectionStatusReason | String | Detect stack drift successfully |
The reason why the stack drift detection operation has its current status. |
DriftedStackResourceCount | Integer | 1 |
The total number of stack resources that have drifted. |
StackDriftStatus | String | DRIFTED |
The drift status of the stack. Valid values:
|
DriftDetectionStatus | String | DETECTION_COMPLETE |
The drift detection status. Valid values:
|
StackId | String | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
The ID of the stack. |
DriftDetectionId | String | a7044f0d-6f2e-4128-a307-4524ef88**** |
The ID of the drift detection operation. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/?Action=GetStackDriftDetectionStatus
&DriftDetectionId=a7044f0d-6f2e-4128-a307-4524ef88****
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetStackDriftDetectionStatusResponse>
<DriftDetectionId>a7044f0d-6f2e-4128-a307-4524ef88****</DriftDetectionId>
<DriftDetectionStatus>DETECTION_COMPLETE</DriftDetectionStatus>
<DriftDetectionStatusReason>Detect stack drift successfully</DriftDetectionStatusReason>
<DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
<DriftedStackResourceCount>1</DriftedStackResourceCount>
<StackDriftStatus>DRIFTED</StackDriftStatus>
<StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691****</StackId>
</GetStackDriftDetectionStatusResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"DriftDetectionId" : "a7044f0d-6f2e-4128-a307-4524ef88****",
"DriftDetectionStatus" : "DETECTION_COMPLETE",
"DriftDetectionStatusReason" : "Detect stack drift successfully",
"DriftDetectionTime" : "2020-02-27T07:47:47",
"DriftedStackResourceCount" : 1,
"StackDriftStatus" : "DRIFTED",
"StackId" : "4a6c9851-3b0f-4f5f-b4ca-a14bf691****"
}
Error codes
For a list of error codes, visit the API Error Center.
HTTP status code |
Error code |
Error message |
Description |
---|---|---|---|
404 |
StackDriftDetectionNotFound |
The stack drift detection ({ID}) could not be found. |
The error message returned because the drift detection does not exist. ID indicates the ID of the drift detection operation. |