查詢指定帳號組內合規包詳情。
介面說明
本文將提供一個樣本,查詢帳號組ca-f632626622af0079****內合規包cp-fdc8626622af00f9****的詳情。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
config:GetAggregateCompliancePack |
get |
*AggregateCompliancePack
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| CompliancePackId |
string |
是 |
合規包 ID。 關於如何擷取合規包 ID,請參見 ListAggregateCompliancePacks 。 |
cp-fdc8626622af00f9**** |
| AggregatorId |
string |
是 |
帳號組 ID。 關於如何擷取帳號組 ID,請參見 ListAggregators 。 |
ca-f632626622af0079**** |
Tag
deprecated
|
array<object> |
否 |
資源的標籤。該入參已棄用,請忽略,傳入不會生效。 最多支援綁定 20 個標籤。 |
|
|
object |
否 |
資源的標籤。 最多支援綁定 20 個標籤。 |
||
| Key |
string |
否 |
資源的標籤鍵。 最多支援綁定 20 個標籤鍵。 |
key-1 |
| Value |
string |
否 |
資源的標籤值。 最多支援綁定 20 個標籤值。 |
value-1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
無 |
||
| RequestId |
string |
請求 ID。 |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
| CompliancePack |
object |
合規包詳情。 |
|
| Status |
string |
合規包狀態。取值:
|
ACTIVE |
| RiskLevel |
integer |
合規包風險等級。取值:
|
1 |
| CompliancePackId |
string |
合規包 ID。 |
cp-fdc8626622af00f9**** |
| Description |
string |
合規包描述。 |
基於等保2.0三級標準,提供持續檢測合規性的建議模板,協助您提前自檢並修複問題,以便快速通過正式檢測。 |
| ConfigRules |
array<object> |
合規包中的規則列表。 |
|
|
object |
無 |
||
| ManagedRuleIdentifier |
string |
規則模板標識。 |
eip-bandwidth-limit |
| ConfigRuleName |
string |
規則名稱。 |
彈性IP執行個體頻寬滿足最低要求 |
| ConfigRuleId |
string |
規則 ID。 |
cr-a260626622af0005**** |
| ConfigRuleParameters |
array<object> |
規則參數資訊。 |
|
|
object |
無 |
||
| Required |
boolean |
規則中參數是否必填。取值:
|
true |
| ParameterName |
string |
規則參數名稱。 |
bandwidth |
| ParameterValue |
string |
規則參數值。 |
10 |
| Description |
string |
規則描述。 |
彈性IP執行個體可用頻寬大於等於指定參數值,視為“合規”。預設值:10 MB。 |
| RiskLevel |
integer |
規則風險等級。取值:
|
1 |
| ResourceTypesScope |
string |
規則評估的資源類型。多個資源類型之間用半形逗號(,)分隔。 |
ACS::EIP::EipAddress |
| TemplateContent |
string |
當前合規包模板資訊,模板中規則列表不包含自訂函數規則。可基於模板資訊快速為其他帳號或帳號組建立同樣的合規包。 |
{ "configRuleTemplates": [ { "configRuleName": "自訂條件規則樣本", "scope": { "complianceResourceTypes": [ "ACS::ECS::Instance" ] }, "description": "", "source": { "owner": "CUSTOM_CONFIGURATION", "identifier": "acs-config-configuration", "sourceDetails": [ { "messageType": "ScheduledNotification", "maximumExecutionFrequency": "Twelve_Hours" }, { "messageType": "ConfigurationItemChangeNotification" } ], "conditions": "{\"ComplianceConditions\":\"{\\\"operator\\\":\\\"and\\\",\\\"children\\\":[{\\\"operator\\\":\\\"GreaterOrEquals\\\",\\\"featurePath\\\":\\\"$.Cpu\\\",\\\"featureSource\\\":\\\"CONFIGURATION\\\",\\\"desired\\\":\\\"2\\\"}]}\"}" }, "inputParameters": {} }, { "configRuleName": "OSS儲存空間Referer在指定的防盜鏈白名單中", "scope": { "complianceResourceTypes": [ "ACS::OSS::Bucket" ] }, "description": "OSS儲存空間開啟防盜鏈並且Referer在指定白名單中,視為“合規”。", "source": { "owner": "ALIYUN", "identifier": "oss-bucket-referer-limit", "sourceDetails": [ { "messageType": "ConfigurationItemChangeNotification" } ] }, "inputParameters": { "allowEmptyReferer": "true", "allowReferers": "http://www.aliyun.com" } } ] } |
| CompliancePackName |
string |
合規包名稱。 |
等保三級預檢合規包 |
| AccountId |
integer |
合規包歸屬的管理帳號 ID。 |
100931896542**** |
| AggregatorId |
string |
帳號組 ID。 |
ca-f632626622af0079**** |
| CompliancePackTemplateId |
string |
合規包模板 ID。 |
ct-5f26ff4e06a300c4**** |
| CreateTimestamp |
integer |
建立合規包的時間戳記。單位:毫秒。 |
1624243657000 |
| Scope |
object |
合規包評估範圍。 |
|
| ExcludeRegionIdsScope |
string |
排除的地區範圍,多個地區 ID 之間用半形逗號(,)分隔。 |
cn-hangzhou |
| ResourceIdsScope |
string |
規則對指定資源 ID 生效。多個資源 ID 之間用半形逗號(,)分隔。 |
eip-8vbf3x310fn56ijfd**** |
| ExcludeResourceGroupIdsScope |
string |
合規包僅對指定資源群組 ID 中的資源不生效。多個資源群組 ID 之間用半形逗號(,)分隔。 |
rg-aekzc7r7rhx**** |
| TagKeyScope |
string |
合規包僅對綁定指定標籤鍵的資源生效。 |
ECS |
| TagValueScope |
string |
合規包僅對綁定指定標籤索引值對的資源生效。 |
test |
| RegionIdsScope |
string |
合規包僅對指定地區 ID 中的資源生效。 |
cn-hangzhou |
| ExcludeResourceIdsScope |
string |
合規包對指定資源 ID 無效,即不對該資源執行評估。 |
eip-8vbf3x310fn56ijfd**** |
| ResourceGroupIdsScope |
string |
合規包僅對指定資源群組 ID 中的資源生效。 |
rg-aekzc7r7rhx**** |
| TagsScope |
array<object> |
標籤範圍 |
|
|
object |
|||
| TagKey |
string |
標籤鍵。 |
key-1 |
| TagValue |
string |
標籤值。 |
value-1 |
| ExcludeTagsScope |
array<object> |
排除的標籤範圍 |
|
|
object |
排除的標籤範圍 |
||
| TagKey |
string |
標籤鍵。 |
key-2 |
| TagValue |
string |
標籤值。 |
value-2 |
| Tags |
array<object> |
資源標籤。 |
|
|
object |
資源標籤。 |
||
| TagKey |
string |
標籤鍵。 |
key-1 |
| TagValue |
string |
標籤值。 |
value-1 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
"CompliancePack": {
"Status": "ACTIVE",
"RiskLevel": 1,
"CompliancePackId": "cp-fdc8626622af00f9****",
"Description": "基於等保2.0三級標準,提供持續檢測合規性的建議模板,協助您提前自檢並修複問題,以便快速通過正式檢測。",
"ConfigRules": [
{
"ManagedRuleIdentifier": "eip-bandwidth-limit",
"ConfigRuleName": "彈性IP執行個體頻寬滿足最低要求",
"ConfigRuleId": "cr-a260626622af0005****",
"ConfigRuleParameters": [
{
"Required": true,
"ParameterName": "bandwidth",
"ParameterValue": "10"
}
],
"Description": "彈性IP執行個體可用頻寬大於等於指定參數值,視為“合規”。預設值:10 MB。",
"RiskLevel": 1,
"ResourceTypesScope": "ACS::EIP::EipAddress"
}
],
"TemplateContent": "{\n \"configRuleTemplates\": [\n {\n \"configRuleName\": \"自訂條件規則樣本\",\n \"scope\": {\n \"complianceResourceTypes\": [\n \"ACS::ECS::Instance\"\n ]\n },\n \"description\": \"\",\n \"source\": {\n \"owner\": \"CUSTOM_CONFIGURATION\",\n \"identifier\": \"acs-config-configuration\",\n \"sourceDetails\": [\n {\n \"messageType\": \"ScheduledNotification\",\n \"maximumExecutionFrequency\": \"Twelve_Hours\"\n },\n {\n \"messageType\": \"ConfigurationItemChangeNotification\"\n }\n ],\n \"conditions\": \"{\\\"ComplianceConditions\\\":\\\"{\\\\\\\"operator\\\\\\\":\\\\\\\"and\\\\\\\",\\\\\\\"children\\\\\\\":[{\\\\\\\"operator\\\\\\\":\\\\\\\"GreaterOrEquals\\\\\\\",\\\\\\\"featurePath\\\\\\\":\\\\\\\"$.Cpu\\\\\\\",\\\\\\\"featureSource\\\\\\\":\\\\\\\"CONFIGURATION\\\\\\\",\\\\\\\"desired\\\\\\\":\\\\\\\"2\\\\\\\"}]}\\\"}\"\n },\n \"inputParameters\": {}\n },\n {\n \"configRuleName\": \"OSS儲存空間Referer在指定的防盜鏈白名單中\",\n \"scope\": {\n \"complianceResourceTypes\": [\n \"ACS::OSS::Bucket\"\n ]\n },\n \"description\": \"OSS儲存空間開啟防盜鏈並且Referer在指定白名單中,視為“合規”。\",\n \"source\": {\n \"owner\": \"ALIYUN\",\n \"identifier\": \"oss-bucket-referer-limit\",\n \"sourceDetails\": [\n {\n \"messageType\": \"ConfigurationItemChangeNotification\"\n }\n ]\n },\n \"inputParameters\": {\n \"allowEmptyReferer\": \"true\",\n \"allowReferers\": \"http://www.aliyun.com\"\n }\n }\n ]\n}",
"CompliancePackName": "等保三級預檢合規包",
"AccountId": 0,
"AggregatorId": "ca-f632626622af0079****",
"CompliancePackTemplateId": "ct-5f26ff4e06a300c4****",
"CreateTimestamp": 1624243657000,
"Scope": {
"ExcludeRegionIdsScope": "cn-hangzhou",
"ResourceIdsScope": "eip-8vbf3x310fn56ijfd****\n",
"ExcludeResourceGroupIdsScope": "rg-aekzc7r7rhx****",
"TagKeyScope": "ECS",
"TagValueScope": "test",
"RegionIdsScope": "cn-hangzhou",
"ExcludeResourceIdsScope": "eip-8vbf3x310fn56ijfd****",
"ResourceGroupIdsScope": "rg-aekzc7r7rhx****",
"TagsScope": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"ExcludeTagsScope": [
{
"TagKey": "key-2",
"TagValue": "value-2"
}
]
},
"Tags": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Invalid.AggregatorId.Value | The specified AggregatorId is invalid. | 帳號組ID不存在或無許可權使用該帳號組。 |
| 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. | 服務不可用。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。