调用GetAggregateCompliancePack接口查询指定账号组内合规包详情。
本文将提供一个示例,查询账号组ca-f632626622af0079****
内合规包cp-fdc8626622af00f9****
的详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetAggregateCompliancePack | 要执行的操作,取值:GetAggregateCompliancePack。 |
CompliancePackId | String | 是 | cp-fdc8626622af00f9**** | 合规包ID。 关于如何获取合规包ID,请参见ListAggregateCompliancePacks。 |
AggregatorId | String | 是 | ca-f632626622af0079**** | 账号组ID。 关于如何获取账号组ID,请参见ListAggregators。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 6EC7AED1-172F-42AE-9C12-295BC2ADB751 | 请求ID。 |
CompliancePack | Object | 合规包详情。 |
|
Status | String | ACTIVE | 合规包状态。取值:
|
RiskLevel | Integer | 1 | 合规包风险等级。取值:
|
CompliancePackId | String | cp-fdc8626622af00f9**** | 合规包ID。 |
Description | String | 基于等保2.0三级标准,提供持续检测合规性的建议模板,帮助您提前自检并修复问题,以便快速通过正式检测。 | 合规包描述。 |
ConfigRules | Array of ConfigRules | 合规包中的规则列表。 |
|
ManagedRuleIdentifier | String | eip-bandwidth-limit | 托管规则标识。 |
ConfigRuleName | String | 弹性IP实例带宽满足最低要求 | 规则名称。 |
ConfigRuleId | String | cr-a260626622af0005**** | 规则ID。 |
ConfigRuleParameters | Array of ConfigRuleParameters | 规则参数信息。 |
|
Required | Boolean | true | 规则中参数是否必填。取值:
|
ParameterName | String | bandwidth | 规则参数名称。 |
ParameterValue | String | 10 | 规则参数值。 |
Description | String | 弹性IP实例可用带宽大于等于指定参数值,视为“合规”。默认值:10 MB。 | 规则描述。 |
RiskLevel | Integer | 1 | 规则风险等级。取值:
|
CompliancePackName | String | 等保三级预检合规包 | 合规包名称。 |
AccountId | Long | 100931896542**** | 合规包归属的企业管理账号ID。 |
AggregatorId | String | ca-f632626622af0079**** | 账号组ID。 |
CompliancePackTemplateId | String | ct-5f26ff4e06a300c4**** | 合规包模板ID。 |
CreateTimestamp | Long | 1624243657000 | 创建合规包的时间戳。单位:毫秒。 |
Scope | Object | 合规包评估范围。 |
|
RegionIdsScope | String | cn-hangzhou | 合规包仅对指定地域ID中的资源生效。 |
ExcludeResourceIdsScope | String | eip-8vbf3x310fn56ijfd**** | 合规包对指定资源ID无效,即不对该资源执行评估。 |
ResourceGroupIdsScope | String | rg-aekzc7r7rhx**** | 合规包仅对指定资源组ID中的资源生效。 |
TagKeyScope | String | ECS | 合规包仅对绑定指定标签键的资源生效。 |
TagValueScope | String | test | 合规包仅对绑定指定标签键值对的资源生效。 |
示例
请求示例
http(s)://[Endpoint]/?Action=GetAggregateCompliancePack
&CompliancePackId=cp-fdc8626622af00f9****
&AggregatorId=ca-f632626622af0079****
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetAggregateCompliancePackResponse>
<RequestId>6EC7AED1-172F-42AE-9C12-295BC2ADB751</RequestId>
<CompliancePack>
<Status>ACTIVE</Status>
<RiskLevel>1</RiskLevel>
<CompliancePackId>cp-fdc8626622af00f9****</CompliancePackId>
<Description>基于等保2.0三级标准,提供持续检测合规性的建议模板,帮助您提前自检并修复问题,以便快速通过正式检测。</Description>
<ConfigRules>
<ManagedRuleIdentifier>eip-bandwidth-limit</ManagedRuleIdentifier>
<ConfigRuleName>弹性IP实例带宽满足最低要求</ConfigRuleName>
<ConfigRuleId>cr-a260626622af0005****</ConfigRuleId>
<ConfigRuleParameters>
<Required>true</Required>
<ParameterName>bandwidth</ParameterName>
<ParameterValue>10</ParameterValue>
</ConfigRuleParameters>
<Description>弹性IP实例可用带宽大于等于指定参数值,视为“合规”。默认值:10 MB。</Description>
<RiskLevel>1</RiskLevel>
</ConfigRules>
<CompliancePackName>等保三级预检合规包</CompliancePackName>
<AggregatorId>ca-f632626622af0079****</AggregatorId>
<CompliancePackTemplateId>ct-5f26ff4e06a300c4****</CompliancePackTemplateId>
<CreateTimestamp>1624243657000</CreateTimestamp>
<Scope>
<RegionIdsScope>cn-hangzhou</RegionIdsScope>
<ExcludeResourceIdsScope>eip-8vbf3x310fn56ijfd****</ExcludeResourceIdsScope>
<ResourceGroupIdsScope>rg-aekzc7r7rhx****</ResourceGroupIdsScope>
<TagKeyScope>ECS</TagKeyScope>
<TagValueScope>test</TagValueScope>
</Scope>
</CompliancePack>
</GetAggregateCompliancePackResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/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
} ],
"CompliancePackName" : "等保三级预检合规包",
"AggregatorId" : "ca-f632626622af0079****",
"CompliancePackTemplateId" : "ct-5f26ff4e06a300c4****",
"CreateTimestamp" : 1624243657000,
"Scope" : {
"RegionIdsScope" : "cn-hangzhou",
"ExcludeResourceIdsScope" : "eip-8vbf3x310fn56ijfd****",
"ResourceGroupIdsScope" : "rg-aekzc7r7rhx****",
"TagKeyScope" : "ECS",
"TagValueScope" : "test"
}
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
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. | 服务不可用。 |
访问错误中心查看更多错误码。