從規則維度查詢規則對資源的評估結果。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
config:ListConfigRuleEvaluationResults |
list |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ComplianceType |
string |
否 |
合規評估結果。取值:
|
NON_COMPLIANT |
| NextToken |
string |
否 |
當請求的返回結果被截斷時,您可以使用 |
IWBjqMYSy0is7zSMGu16**** |
| MaxResults |
integer |
否 |
單次請求返回結果的最大條數。取值範圍:1~100。 |
10 |
| ConfigRuleId |
string |
否 |
規則 ID。 關於如何擷取規則 ID,請參見 ListConfigRules 。 |
cr-cac56457e0d900d3**** |
| CompliancePackId |
string |
否 |
合規包 ID。 關於如何擷取合規包 ID,請參見 ListCompliancePacks 。 |
cp-f1e3326622af00cb**** |
| Regions |
string |
否 |
評估資源所屬地區,多個地區之間用半形逗號(,)分隔。 |
cn-shanghai |
| ResourceTypes |
string |
否 |
評估資源的資源類型,多個資源類型之間用半形逗號(,)分隔。 |
ACS::ECS::Instance |
| ResourceGroupIds |
string |
否 |
評估資源所屬的資源群組 ID,多個資源群組 ID 之間用半形逗號(,)分隔。 |
rg-aek2indxn3g**** |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
2A4A33BD-8186-4D60-91B9-42174EED75B5 |
| EvaluationResults |
object |
規則評估結果。 |
|
| NextToken |
string |
查詢下一頁使用的 Token。 |
IWBjqMYSy0is7zSMGu16**** |
| MaxResults |
integer |
每頁的最大記錄數。 |
10 |
| EvaluationResultList |
array<object> |
規則評估結果清單。 |
|
|
array<object> |
無。 |
||
| RiskLevel |
integer |
規則風險等級。取值:
|
1 |
| ComplianceType |
string |
合規評估結果。取值:
|
NON_COMPLIANT |
| ResultRecordedTimestamp |
integer |
產生資源評估結果的時間戳記。單位:毫秒。 |
1622802307150 |
| Annotation |
string |
不合規資源的補充資訊。可能包含以下資訊:
|
{\"configuration\":\"\",\"desiredValue\":\"\",\"operator\":\"IsNotStringEmpty\",\"property\":\"$.KeyPairName\",\"reason\":\"No property contains.\"} |
| ConfigRuleInvokedTimestamp |
integer |
規則被觸發執行評估的時間戳記。單位:毫秒。 |
1622802307081 |
| InvokingEventMessageType |
string |
規則引發機制。取值:
|
ConfigurationItemChangeNotification |
| EvaluationResultIdentifier |
object |
規則評估結果標識符。 |
|
| OrderingTimestamp |
integer |
時間軸展示的時間戳記。單位:毫秒。 |
1622802307081 |
| EvaluationResultQualifier |
object |
規則評估結果中的資源資訊。 |
|
| ResourceOwnerId |
integer |
資源歸屬的阿里雲帳號 ID。 |
120886317861**** |
| ConfigRuleArn |
string |
規則 ARN。 |
acs:config::120886317861****:rule/cr-cac56457e0d900d3**** |
| ResourceType |
string |
資源類型。 |
ACS::ECS::Instance |
| ConfigRuleName |
string |
規則名稱。 |
ECS執行個體CPU核心數滿足最低要求 |
| ResourceGroupId |
string |
資源歸屬資源群組 ID |
rg-aek3tprgnnc**** |
| ConfigRuleId |
string |
規則 ID。 |
cr-cac56457e0d900d3**** |
| ResourceName |
string |
資源名稱。 |
iZuf6j91r34rnwawoox**** |
| RegionId |
string |
資源歸屬的地區 ID。 |
cn-hangzhou |
| CompliancePackId |
string |
規則所屬的合規包 ID。 |
cp-bcc33457e0d900d5**** |
| IgnoreDate |
string |
已忽略評估結果的自動回復日期。 說明
為空白表示不會自動回復,需要您手動恢複。 |
2022-06-01 |
| ResourceId |
string |
資源 ID。 |
i-hp3e4kvhzqn2s11t**** |
| RemediationEnabled |
boolean |
是否啟用修正設定。取值:
|
false |
| EvaluationId |
string |
評估結果的唯一 ID |
00000089-4e0d-58b5-a96a-8e54112110f3 |
| LastNonCompliantRecordTimestamp |
integer |
最近一次不合規的開始時間 |
1744696665000 |
| LastCompliantFixedTimestamp |
integer |
最近一次修複為合規狀態的時間,新資源或規則首次評估為合規時該值不會被記錄 |
1768788515723 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "2A4A33BD-8186-4D60-91B9-42174EED75B5",
"EvaluationResults": {
"NextToken": "IWBjqMYSy0is7zSMGu16****",
"MaxResults": 10,
"EvaluationResultList": [
{
"RiskLevel": 1,
"ComplianceType": "NON_COMPLIANT",
"ResultRecordedTimestamp": 1622802307150,
"Annotation": "{\\\"configuration\\\":\\\"\\\",\\\"desiredValue\\\":\\\"\\\",\\\"operator\\\":\\\"IsNotStringEmpty\\\",\\\"property\\\":\\\"$.KeyPairName\\\",\\\"reason\\\":\\\"No property contains.\\\"}",
"ConfigRuleInvokedTimestamp": 1622802307081,
"InvokingEventMessageType": "ConfigurationItemChangeNotification",
"EvaluationResultIdentifier": {
"OrderingTimestamp": 1622802307081,
"EvaluationResultQualifier": {
"ResourceOwnerId": 0,
"ConfigRuleArn": "acs:config::120886317861****:rule/cr-cac56457e0d900d3****",
"ResourceType": "ACS::ECS::Instance",
"ConfigRuleName": "ECS執行個體CPU核心數滿足最低要求",
"ResourceGroupId": "rg-aek3tprgnnc****",
"ConfigRuleId": "cr-cac56457e0d900d3****",
"ResourceName": "iZuf6j91r34rnwawoox****",
"RegionId": "cn-hangzhou",
"CompliancePackId": "cp-bcc33457e0d900d5****",
"IgnoreDate": "2022-06-01",
"ResourceId": "i-hp3e4kvhzqn2s11t****"
}
},
"RemediationEnabled": false,
"EvaluationId": "00000089-4e0d-58b5-a96a-8e54112110f3",
"LastNonCompliantRecordTimestamp": 1744696665000,
"LastCompliantFixedTimestamp": 1768788515723
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | 您無權執行此操作。 |
| 404 | CloudConfigServiceRoleNotExisted | The CloudConfigServiceRole does not exist. | |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服務不可用。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。