查询指定账号组内指定合规包中规则的合规结果。
接口说明
本文将提供一个示例,查询账号组ca-04b3fd170e340007****内合规包cp-541e626622af0087****中规则的合规结果。返回结果显示规则总数1个,不合规规则数0个。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
config:GetAggregateConfigRuleComplianceByPack |
get |
*AggregateCompliancePack
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| CompliancePackId |
string |
是 |
合规包 ID。 关于如何获取合规包 ID,请参见 ListAggregateCompliancePacks 。 |
cp-541e626622af0087**** |
| AggregatorId |
string |
是 |
账号组 ID。 关于如何获取账号组 ID,请参见 ListAggregators 。 |
ca-04b3fd170e340007**** |
关于公共请求参数的详情,请参见公共参数。
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
无 |
||
| RequestId |
string |
请求 ID。 |
C6B0C0A8-3245-48F1-AEAB-BC1A446E99D0 |
| ConfigRuleComplianceResult |
object |
合规包中规则的合规结果。 |
|
| CompliancePackId |
string |
合规包 ID。 |
cp-541e626622af0087**** |
| NotApplicableCount |
integer |
合规包内的规则进行评估资源时,评估结果包含“不适用”的规则总数。 |
1 |
| ConfigRuleCompliances |
array<object> |
规则合规包列表。 |
|
|
object |
无 |
||
| ComplianceType |
string |
合规类型。取值:
|
COMPLIANT |
| ConfigRuleName |
string |
合规包中的规则名称。 |
The bandwidth of the Elastic IP instance meets the minimum requirements. |
| ConfigRuleId |
string |
合规包中的规则 ID。 |
cr-fdc8626622af00f9**** |
| TotalCount |
integer |
规则总数。 |
2 |
| NonCompliantCount |
integer |
不合规规则数。 |
1 |
| CompliantCount |
integer |
合规包内的规则进行评估资源时,评估结果全部为合规的规则总数。 |
0 |
| InsufficientDataCount |
integer |
合规包内的规则进行评估资源时,评估结果包含“无数据”的规则总数。 |
1 |
| IgnoredCount |
integer |
合规包内的规则进行评估资源时,评估结果包含“已忽略”的规则总数。 |
1 |
示例
正常返回示例
JSON格式
{
"RequestId": "C6B0C0A8-3245-48F1-AEAB-BC1A446E99D0",
"ConfigRuleComplianceResult": {
"CompliancePackId": "cp-541e626622af0087****",
"NotApplicableCount": 1,
"ConfigRuleCompliances": [
{
"ComplianceType": "COMPLIANT",
"ConfigRuleName": "The bandwidth of the Elastic IP instance meets the minimum requirements.",
"ConfigRuleId": "cr-fdc8626622af00f9****"
}
],
"TotalCount": 2,
"NonCompliantCount": 1,
"CompliantCount": 0,
"InsufficientDataCount": 1,
"IgnoredCount": 1
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Invalid.CompliancePackId.Value | The specified CompliancePackId does not exist. | 合规包ID不存在。 |
| 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. | 服务不可用。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。