Queries the drift detection status of a stack.
Operation description
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
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ros:GetStackDriftDetectionStatus | get |
|
| none |
Request syntax
POST /V2/GetStackDriftDetectionStatus
GET /V2/GetStackDriftDetectionStatus
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the stack to be detected for drift. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
DriftDetectionId | string | Yes | The ID of the drift detection operation. You can call the ListStackResourceDrifts operation to obtain the ID of the drift detection operation. | a7044f0d-6f2e-4128-a307-4524ef88**** |
For more information about common request parameters, see Common parameters.
Response parameters
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. |
Examples
Sample success responses
JSON
format
{
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
"DriftDetectionTime": "2020-02-27T07:47:47",
"DriftDetectionStatusReason": "Detect stack drift successfully",
"DriftedStackResourceCount": 1,
"StackDriftStatus": "DRIFTED",
"DriftDetectionStatus": "DETECTION_COMPLETE",
"StackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
"DriftDetectionId": "a7044f0d-6f2e-4128-a307-4524ef88****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|