查詢指定帳號組內指定規則詳情。
介面說明
本文將提供一個樣本,查詢帳號組ca-7f00626622af0041****內規則cr-7f7d626622af0041****的詳情。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
config:GetAggregateConfigRule |
get |
*AggregateConfigRule
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ConfigRuleId |
string |
是 |
規則 ID。 關於如何擷取規則 ID,請參見 ListAggregateConfigRules 。 |
cr-7f7d626622af0041**** |
| AggregatorId |
string |
是 |
帳號組 ID。 關於如何擷取帳號組 ID,請參見 ListAggregators 。 |
ca-7f00626622af0041**** |
Tag
deprecated
|
array<object> |
否 |
標籤 該入參已棄用,請忽略,傳入不會生效。 |
|
|
object |
否 |
資源的標籤。該入參已棄用,請忽略,傳入不會生效。 最多支援綁定 20 個標籤。 |
||
| Key |
string |
否 |
資源的標籤鍵。 最多支援綁定 20 個標籤鍵。 |
key-1 |
| Value |
string |
否 |
資源的標籤值。 最多支援綁定 20 個標籤值。 |
value-1 |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
無。 |
||
| RequestId |
string |
請求 ID。 |
811234F4-C3AB-4D15-B90B-F55016D1B5AA |
| ConfigRule |
object |
規則列表。 |
|
| RiskLevel |
integer |
規則風險等級。取值:
|
1 |
| InputParameters |
object |
規則參數資訊。 |
{"tag1Key":"ECS","tag1Value":"test"} |
| Source |
object |
規則來源資訊。 |
|
| SourceDetails |
array<object> |
規則來源詳情。 |
|
|
object |
無。 |
||
| MessageType |
string |
規則引發機制。取值:
|
ConfigurationItemChangeNotification |
| EventSource |
string |
事件來源。 說明
目前僅支援配置審計事件:aliyun.config。 |
aliyun.config |
| MaximumExecutionFrequency |
string |
規則執行循環。取值:
|
One_Hour |
| Owner |
string |
規則來源的歸屬。取值:
|
ALIYUN |
| Identifier |
string |
規則標識。
|
acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config |
| ConfigRuleState |
string |
規則運行狀態。取值:
|
ACTIVE |
| MaximumExecutionFrequency |
string |
規則執行循環。
|
One_Hour |
| ManagedRule |
object |
規則模板詳情。 |
|
| SourceDetails |
array<object> |
規則模板來源詳情。 |
|
|
object |
無 |
||
| MessageType |
string |
規則引發機制。取值:
|
ConfigurationItemChangeNotification |
| EventSource |
string |
事件來源。 說明
目前僅支援配置審計事件:aliyun.config。 |
aliyun.config |
| MaximumExecutionFrequency |
string |
規則執行循環。
|
One_Hour |
| Description |
string |
規則模板描述。 |
ECS磁碟未因欠費或安全等原因而被鎖定,視為“合規”。 |
| Labels |
array |
規則模板標籤列表。 |
|
|
string |
規則模板標籤。 |
["RAM","USer"] |
|
| Identifier |
string |
規則模板標識。 |
ram-user-mfa-check |
| OptionalInputParameterDetails |
object |
規則模板選擇性參數詳情。 |
{} |
| ManagedRuleName |
string |
規則模板名稱。 |
RAM使用者開啟MFA |
| CompulsoryInputParameterDetails |
object |
規則模板必選參數詳情。 |
{} |
| ConfigRuleArn |
string |
規則模板 ARN。 |
acs:config::100931896542****:rule/cr-7f7d626622af0041**** |
| Description |
string |
規則模板描述。 |
RAM使用者開啟MFA,視為“合規”。 |
| CreateBy |
object |
規則建立者資訊。 |
|
| CompliancePackId |
string |
合規包 ID。 |
cp-541e626622af008**** |
| AggregatorName |
string |
帳號組名稱。 |
Test_Group |
| CompliancePackName |
string |
合規包名稱。 |
OSS合規基準 |
| CreatorName |
string |
規則建立者名稱。 |
Alice |
| CreatorType |
string |
規則建立者類型。僅支援 |
AGGREGATOR |
| CreatorId |
string |
規則建立者的帳號 ID。 |
100931896542**** |
| AggregatorId |
string |
帳號組 ID。 |
ca-04b3fd170e340007**** |
| ConfigRuleName |
string |
規則名稱。 |
RAM使用者開啟MFA |
| ConfigRuleEvaluationStatus |
object |
規則執行狀態。 |
|
| LastErrorCode |
string |
規則最近一次執行的錯誤碼。 |
TimeOut |
| LastSuccessfulEvaluationTimestamp |
integer |
規則最近一次調用成功的結束時間戳記。單位:毫秒。 |
1624932227486 |
| FirstActivatedTimestamp |
integer |
規則首次啟用時間戳記。 |
1624932221993 |
| FirstEvaluationStarted |
boolean |
規則是否已執行評估。取值:
|
true |
| LastSuccessfulInvocationTimestamp |
integer |
規則最近一次調用成功的開始時間戳。單位:毫秒。 |
1624932227476 |
| LastErrorMessage |
string |
規則最近一次執行的錯誤資訊。 |
time out |
| LastFailedEvaluationTimestamp |
integer |
規則最近一次調用失敗的結束時間戳記。單位:毫秒。 |
1614687022000 |
| LastFailedInvocationTimestamp |
integer |
規則最近一次調用失敗的開始時間戳。單位:毫秒。 |
1614687022000 |
| ConfigRuleId |
string |
規則 ID。 |
cr-7f7d626622af0041**** |
| ModifiedTimestamp |
integer |
規則最近一次更新的時間戳記。單位:毫秒。 |
1614687022000 |
| CreateTimestamp |
integer |
建立規則的時間戳記。單位:毫秒。 |
1604684022000 |
| ResourceTypesScope |
string |
規則評估的資源類型。 |
ACS::RAM::User |
| ExcludeRegionIdsScope |
string |
規則對指定地區內資源無效,即不對該地區內資源執行評估。多個地區 ID 之間用半形逗號(,)分隔。 |
cn-hangzhou |
| RegionIdsScope |
string |
規則只評估所屬地區 ID 的資源。 |
global |
| ExcludeResourceIdsScope |
string |
規則評估排除的資源 ID。 |
23642660635687**** |
| ResourceIdsScope |
string |
規則對指定資源 ID 生效。多個資源 ID 之間用半形逗號(,)分隔。 |
eip-8vbf3x310fn56ijfd**** |
| ResourceGroupIdsScope |
string |
規則只評估所屬資源群組 ID 的資源。 |
rg-aekzdibsjjc**** |
| ExcludeResourceGroupIdsScope |
string |
規則對指定資源群組 ID 中的資源無效,即不對該資源群組內的資源評估。多個資源群組 ID 之間用半形逗號(,)分隔。 |
rg-aekzdibsjjc**** |
TagKeyScope
deprecated
|
string |
已廢棄,請使用 規則只評估所屬標籤鍵的資源。 |
RAM |
TagValueScope
deprecated
|
string |
已廢棄,請使用 規則只評估所屬標籤值的資源。 |
MFA |
| TagsScope |
array<object> |
標籤範圍 |
|
|
object |
|||
| TagKey |
string |
標籤鍵。 |
key-1 |
| TagValue |
string |
標籤值。 |
value-1 |
| ExcludeTagsScope |
array<object> |
排除的標籤範圍 |
|
|
object |
|||
| TagKey |
string |
標籤鍵。 |
key-2 |
| TagValue |
string |
標籤值。 |
value-2 |
| ConfigRuleTriggerTypes |
string |
規則引發機制。取值:
|
ConfigurationItemChangeNotification |
| TagKeyLogicScope |
string |
使用參數 用於擷取使用已廢棄欄位 取值:
|
AND |
| FolderIdsScope |
string |
規則僅對指定資來源目錄 ID 中成員帳號內的資源生效。 |
fd-ZtHsRH**** |
| ExcludeFolderIdsScope |
string |
規則對指定資來源目錄 ID 中成員帳號內的資源無效,即不對該資來源目錄 ID 中成員帳號內的資源執行評估。 |
fd-pWmkqZ**** |
| ExcludeAccountIdsScope |
string |
規則對指定成員帳號內的資源無效,即不對該帳號內的資源執行評估。 |
120886317861**** |
| ResourceNameScope |
string |
規則僅對指定資源名稱的資源生效。 |
i-xxx |
| Compliance |
object |
規則合規統計結果。 |
|
| ComplianceType |
string |
合規統計結果。取值:
|
NON_COMPLIANT |
| Count |
integer |
合規統計結果對應的評估資源數量。 |
3 |
| AccountId |
integer |
規則歸屬阿里雲帳號 ID。 |
120886317861**** |
| ExtendContent |
string |
擴充內容,暫時僅用於配合 24 小時周期觸發設定觸發時間。 |
{"fixedHour":"12"} |
| Tags |
array<object> |
資源標籤。 |
|
|
object |
資源標籤。 |
||
| TagKey |
string |
標籤鍵。 |
key-1 |
| TagValue |
string |
標籤值。 |
value-1 |
| AccountIdsScope |
string |
規則僅對指定成員帳號內的資源生效。多個成員帳號 ID 之間用半形逗號(,)分隔。 |
120886317861**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "811234F4-C3AB-4D15-B90B-F55016D1B5AA",
"ConfigRule": {
"RiskLevel": 1,
"InputParameters": {
"tag1Key": "ECS",
"tag1Value": "test"
},
"Source": {
"SourceDetails": [
{
"MessageType": "ConfigurationItemChangeNotification",
"EventSource": "aliyun.config",
"MaximumExecutionFrequency": "One_Hour"
}
],
"Owner": "ALIYUN",
"Identifier": "acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config"
},
"ConfigRuleState": "ACTIVE",
"MaximumExecutionFrequency": "One_Hour",
"ManagedRule": {
"SourceDetails": [
{
"MessageType": "ConfigurationItemChangeNotification",
"EventSource": "aliyun.config",
"MaximumExecutionFrequency": "One_Hour"
}
],
"Description": "ECS磁碟未因欠費或安全等原因而被鎖定,視為“合規”。",
"Labels": [
"[\"RAM\",\"USer\"]"
],
"Identifier": "ram-user-mfa-check",
"OptionalInputParameterDetails": {},
"ManagedRuleName": "RAM使用者開啟MFA",
"CompulsoryInputParameterDetails": {}
},
"ConfigRuleArn": "acs:config::100931896542****:rule/cr-7f7d626622af0041****",
"Description": "RAM使用者開啟MFA,視為“合規”。",
"CreateBy": {
"CompliancePackId": "cp-541e626622af008****",
"AggregatorName": "Test_Group",
"CompliancePackName": "OSS合規基準",
"CreatorName": "Alice",
"CreatorType": "AGGREGATOR",
"CreatorId": "100931896542****",
"AggregatorId": "ca-04b3fd170e340007****"
},
"ConfigRuleName": "RAM使用者開啟MFA",
"ConfigRuleEvaluationStatus": {
"LastErrorCode": "TimeOut",
"LastSuccessfulEvaluationTimestamp": 1624932227486,
"FirstActivatedTimestamp": 1624932221993,
"FirstEvaluationStarted": true,
"LastSuccessfulInvocationTimestamp": 1624932227476,
"LastErrorMessage": "time out",
"LastFailedEvaluationTimestamp": 1614687022000,
"LastFailedInvocationTimestamp": 1614687022000
},
"ConfigRuleId": "cr-7f7d626622af0041****",
"ModifiedTimestamp": 1614687022000,
"CreateTimestamp": 1604684022000,
"ResourceTypesScope": "ACS::RAM::User",
"ExcludeRegionIdsScope": "cn-hangzhou",
"RegionIdsScope": "global",
"ExcludeResourceIdsScope": "23642660635687****",
"ResourceIdsScope": "eip-8vbf3x310fn56ijfd****\n",
"ResourceGroupIdsScope": "rg-aekzdibsjjc****",
"ExcludeResourceGroupIdsScope": "rg-aekzdibsjjc****",
"TagKeyScope": "RAM",
"TagValueScope": "MFA",
"TagsScope": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"ExcludeTagsScope": [
{
"TagKey": "key-2",
"TagValue": "value-2"
}
],
"ConfigRuleTriggerTypes": "ConfigurationItemChangeNotification",
"TagKeyLogicScope": "AND",
"FolderIdsScope": "fd-ZtHsRH****",
"ExcludeFolderIdsScope": "fd-pWmkqZ****",
"ExcludeAccountIdsScope": "120886317861****",
"ResourceNameScope": "i-xxx",
"Compliance": {
"ComplianceType": "NON_COMPLIANT",
"Count": 3
},
"AccountId": 0,
"ExtendContent": "{\"fixedHour\":\"12\"}",
"Tags": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"AccountIdsScope": "120886317861****\n"
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | ConfigRuleNotExists | The ConfigRule does not exist. | 此規則不存在。 |
| 400 | NoPermission | You are not authorized to perform this operation. | 您無權執行此操作。 |
| 400 | Invalid.AggregatorId.Value | The specified AggregatorId is invalid. | 帳號組ID不存在或無許可權使用該帳號組。 |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服務不可用。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。