對資源進行偏差檢測,以便確定資源是否已偏離其預期的模板配置。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ros:DetectStackResourceDrift |
delete |
*stack
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| StackId |
string |
是 |
資源棧 ID。 |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| ClientToken |
string |
否 |
保證請求的等冪性。 該值由用戶端產生,並且必須是全域唯一的。 |
123e4567-e89b-12d3-a456-42665544**** |
| RegionId |
string |
是 |
資源棧所屬的地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。 |
cn-hangzhou |
| LogicalResourceId |
string |
是 |
資源名稱。 |
ScalingRuleName |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| LogicalResourceId |
string |
資源邏輯 ID,即模板中資源的名稱。 |
ScalingRule |
| ResourceDriftStatus |
string |
資源偏差狀態。取值:
|
MODIFIED |
| PropertyDifferences |
array<object> |
資源屬性偏差。 |
|
|
object |
|||
| ActualValue |
string |
資源屬性的實際取值。 |
test1 |
| DifferenceType |
string |
資源屬性的偏差類型。取值:
|
NOT_EQUAL |
| PropertyPath |
string |
資源屬性的路徑。 |
/ScalingRuleName |
| ExpectedValue |
string |
資源屬性模板定義值。 |
test2 |
| RequestId |
string |
請求 ID。 |
B288A0BE-D927-4888-B0F7-B35EF84B6E6F |
| PhysicalResourceId |
string |
資源物理 ID,即實際資源 ID。 |
asr-2ze4zzc3kf9yz1kd**** |
| ExpectedProperties |
string |
模板中定義的資源屬性,以 JSON 格式表示。 |
{"ScalingRuleName": "test2"} |
| DriftDetectionTime |
string |
資源偏差檢測時間。 |
2020-02-27T07:47:47 |
| ResourceType |
string |
資源類型。 |
ALIYUN::ESS::ScalingRule |
| ActualProperties |
string |
實際的資源屬性,以 JSON 格式表示。 |
{"ScalingRuleName": "test1"} |
| StackId |
string |
資源棧 ID。 |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
樣本
正常返回樣本
JSON格式
{
"LogicalResourceId": "ScalingRule",
"ResourceDriftStatus": "MODIFIED",
"PropertyDifferences": [
{
"ActualValue": "test1",
"DifferenceType": "NOT_EQUAL",
"PropertyPath": "/ScalingRuleName",
"ExpectedValue": "test2"
}
],
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
"PhysicalResourceId": "asr-2ze4zzc3kf9yz1kd****",
"ExpectedProperties": "{\"ScalingRuleName\": \"test2\"}",
"DriftDetectionTime": "2020-02-27T07:47:47",
"ResourceType": "ALIYUN::ESS::ScalingRule",
"ActualProperties": "{\"ScalingRuleName\": \"test1\"}",
"StackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf691****"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。