查询指定账号组内合规包详情。
接口说明
本文将提供一个示例,查询账号组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. | 服务不可用。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。