Queries the details of a compliance package in a specified account group.
Operation description
This topic provides an example on how to query the details of the compliance package cp-fdc8626622af00f9**** in the account group ca-f632626622af0079****.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetAggregateCompliancePack |
get |
*AggregateCompliancePack
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CompliancePackId |
string |
Yes |
The compliance package ID. For information about how to obtain the compliance package ID, see ListAggregateCompliancePacks. |
cp-fdc8626622af00f9**** |
| AggregatorId |
string |
Yes |
The account group ID. For information about how to obtain the account group ID, see ListAggregators. |
ca-f632626622af0079**** |
Tag
deprecated
|
array<object> |
No |
The tags of the resource. This parameter is deprecated. Do not use it. Values passed in will not take effect. A maximum of 20 tags can be added. |
|
|
object |
No |
The tags of the resource. A maximum of 20 tags can be added. |
||
| Key |
string |
No |
The tag key of the resource. A maximum of 20 tag keys can be added. |
key-1 |
| Value |
string |
No |
The tag value of the resource. A maximum of 20 tag values can be added. |
value-1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
| CompliancePack |
object |
The details of the compliance package. |
|
| Status |
string |
The status of the compliance package. Valid values:
|
ACTIVE |
| RiskLevel |
integer |
The risk level of the compliance package. Valid values:
|
1 |
| CompliancePackId |
string |
The compliance package ID. |
cp-fdc8626622af00f9**** |
| Description |
string |
The description of the compliance package. |
Based on the China Classified Protection of Cybersecurity Level 3 standard, this template provides continuous compliance detection recommendations to help you perform self-checks and fix issues in advance so that you can quickly pass formal inspections |
| ConfigRules |
array<object> |
The list of rules in the compliance package. |
|
|
array<object> |
The rule information. |
||
| ManagedRuleIdentifier |
string |
The managed rule identifier. |
eip-bandwidth-limit |
| ConfigRuleName |
string |
The rule name. |
The bandwidth of an EIP meets the minimum requirement |
| ConfigRuleId |
string |
The rule ID. |
cr-a260626622af0005**** |
| ConfigRuleParameters |
array<object> |
The rule parameter information. |
|
|
object |
The rule parameter information. |
||
| Required |
boolean |
Indicates whether the parameter is required in the rule. Valid values:
|
true |
| ParameterName |
string |
The name of the rule parameter. |
bandwidth |
| ParameterValue |
string |
The value of the rule parameter. |
10 |
| Description |
string |
The description of the rule. |
An EIP is considered compliant if its available bandwidth is greater than or equal to the specified parameter value. Default value: 10 MB |
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| ResourceTypesScope |
string |
The resource types evaluated by the rule. Multiple resource types are separated by commas (,). |
ACS::EIP::EipAddress |
| TemplateContent |
string |
The template information of the current compliance package. The rule list in the template does not include custom function rules. You can use this template information to quickly create the same compliance package for other accounts or account groups. |
{ "configRuleTemplates": [ { "configRuleName": "Custom condition rule example", "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": "The Referer of an OSS bucket is in the specified hotlink protection whitelist", "scope": { "complianceResourceTypes": [ "ACS::OSS::Bucket" ] }, "description": "An OSS bucket is considered compliant if hotlink protection is enabled and the Referer is in the specified whitelist.", "source": { "owner": "ALIYUN", "identifier": "oss-bucket-referer-limit", "sourceDetails": [ { "messageType": "ConfigurationItemChangeNotification" } ] }, "inputParameters": { "allowEmptyReferer": "true", "allowReferers": "http://www.aliyun.com" } } ] } |
| CompliancePackName |
string |
The name of the compliance package. |
Classified Protection Level 3 pre-check compliance package |
| AccountId |
integer |
The ID of the management account to which the compliance package belongs. |
100931896542**** |
| AggregatorId |
string |
The account group ID. |
ca-f632626622af0079**** |
| CompliancePackTemplateId |
string |
The compliance package template ID. |
ct-5f26ff4e06a300c4**** |
| CreateTimestamp |
integer |
The timestamp when the compliance package was created. Unit: milliseconds. |
1624243657000 |
| Scope |
object |
The evaluation scope of the compliance package. |
|
| ExcludeRegionIdsScope |
string |
The excluded regions. Multiple region IDs are separated by commas (,). |
cn-hangzhou |
| ResourceIdsScope |
string |
The rule takes effect on the specified resource IDs. Multiple resource IDs are separated by commas (,). |
eip-8vbf3x310fn56ijfd**** |
| ExcludeResourceGroupIdsScope |
string |
The compliance package does not take effect on resources in the specified resource group IDs. Multiple resource group IDs are separated by commas (,). |
rg-aekzc7r7rhx**** |
| TagKeyScope |
string |
The compliance package takes effect only on resources that are bound with the specified tag key. |
ECS |
| TagValueScope |
string |
The compliance package takes effect only on resources that are bound with the specified tag key-value pair. |
test |
| RegionIdsScope |
string |
The compliance package takes effect only on resources in the specified region IDs. |
cn-hangzhou |
| ExcludeResourceIdsScope |
string |
The compliance package does not take effect on the specified resource IDs. The specified resources are not evaluated. |
eip-8vbf3x310fn56ijfd**** |
| ResourceGroupIdsScope |
string |
The compliance package takes effect only on resources in the specified resource group IDs. |
rg-aekzc7r7rhx**** |
| TagsScope |
array<object> |
The tag scope. |
|
|
object |
|||
| TagKey |
string |
The tag key. |
key-1 |
| TagValue |
string |
The tag value. |
value-1 |
| ExcludeTagsScope |
array<object> |
The excluded tag scope. |
|
|
object |
The excluded tag scope. |
||
| TagKey |
string |
The tag key. |
key-2 |
| TagValue |
string |
The tag value. |
value-2 |
| Tags |
array<object> |
The resource tags. |
|
|
object |
The resource tags. |
||
| TagKey |
string |
The tag key. |
key-1 |
| TagValue |
string |
The tag value. |
value-1 |
Examples
Success response
JSON format
{
"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"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.AggregatorId.Value | The specified AggregatorId is invalid. | The specified aggregator ID does not exist or you are not authorized to use the aggregator. |
| 400 | Invalid.CompliancePackId.Value | The specified CompliancePackId does not exist. | The specified compliance pack ID does not exist. |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.