查詢指定合規包中規則維度合規統計。
介面說明
本文將提供一個樣本,查詢合規包cp-541e626622af0087****中規則的合規結果。返回結果顯示規則總數為 1 個,不合規規則數為 0 個。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
config:GetConfigRuleComplianceByPack |
get |
*CompliancePack
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| CompliancePackId |
string |
是 |
合規包 ID。 關於如何擷取合規包 ID,請參見 ListCompliancePacks 。 |
cp-541e626622af0087**** |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
無 |
||
| RequestId |
string |
請求 ID。 |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
| ConfigRuleComplianceResult |
object |
合規包中規則的合規結果。 |
|
| CompliancePackId |
string |
合規包 ID。 |
cp-541e626622af0087**** |
| InsufficientDataCount |
integer |
合規包內的規則進行評估資源時,評估結果包含“無資料”的規則總數。 |
1 |
| ConfigRuleCompliances |
array<object> |
合規包中的規則及合規結果清單。 |
|
|
object |
無 |
||
| ComplianceType |
string |
規則合規評估結果。取值:
|
COMPLIANT |
| ConfigRuleName |
string |
合規包中的規則名稱。 |
The bandwidth of the Elastic IP instance meets the minimum requirements. |
| ConfigRuleId |
string |
合規包中的規則 ID。 |
cr-fdc8626622af00f9**** |
| TotalCount |
integer |
合規包中的規則總數。 |
1 |
| NonCompliantCount |
integer |
不合規規則數。 |
0 |
| NotApplicableCount |
integer |
合規包內的規則進行評估資源時,評估結果包含“不適用”的規則總數。 |
1 |
| IgnoredCount |
integer |
合規包內的規則進行評估資源時,評估結果包含“已忽略”的規則總數。 |
1 |
| CompliantCount |
integer |
合規包內的規則進行評估資源時,評估結果全部為合規的規則總數。 |
0 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
"ConfigRuleComplianceResult": {
"CompliancePackId": "cp-541e626622af0087****",
"InsufficientDataCount": 1,
"ConfigRuleCompliances": [
{
"ComplianceType": "COMPLIANT",
"ConfigRuleName": "The bandwidth of the Elastic IP instance meets the minimum requirements.",
"ConfigRuleId": "cr-fdc8626622af00f9****"
}
],
"TotalCount": 1,
"NonCompliantCount": 0,
"NotApplicableCount": 1,
"IgnoredCount": 1,
"CompliantCount": 0
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Invalid.CompliancePackId.Value | The specified CompliancePackId does not exist. | 合規包ID不存在。 |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服務不可用。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。