调用GetAggregateConfigRule接口查询指定账号组内指定规则详情。
本文将提供一个示例,查询账号组ca-7f00626622af0041****
内规则cr-7f7d626622af0041****
的详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetAggregateConfigRule |
要执行的操作,取值:GetAggregateConfigRule。 |
ConfigRuleId | String | 是 | cr-7f7d626622af0041**** |
规则ID。 关于如何获取规则ID,请参见ListAggregateConfigRules。 |
AggregatorId | String | 是 | ca-7f00626622af0041**** |
账号组ID。 关于如何获取账号组ID,请参见ListAggregators。 |
关于公共请求参数的详情,请参见公共参数。
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 811234F4-C3AB-4D15-B90B-F55016D1B5AA |
请求ID。 |
ConfigRule | Object |
规则列表。 |
|
RiskLevel | Integer | 1 |
规则风险等级。取值:
|
InputParameters | Map |
规则参数信息。 |
|
Source | Object |
规则来源信息。 |
|
SourceDetails | Array of SourceDetails |
规则来源详情。 |
|
MessageType | String | ConfigurationItemChangeNotification |
规则触发机制。取值:
|
EventSource | String | aliyun.config |
事件来源。 说明 目前仅支持配置审计事件:aliyun.config。
|
MaximumExecutionFrequency | String | One_Hour |
规则执行周期。取值:
|
Owner | String | ALIYUN |
规则来源的归属。取值:
|
Identifier | String | acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config |
规则标识。
|
ConfigRuleState | String | ACTIVE |
规则运行状态。取值:
|
MaximumExecutionFrequency | String | One_Hour |
规则执行周期。
|
ManagedRule | Object |
托管规则详情。 |
|
SourceDetails | Array of SourceDetails |
托管规则来源详情。 |
|
MessageType | String | ConfigurationItemChangeNotification |
规则触发机制。取值:
|
EventSource | String | aliyun.config |
事件来源。 说明 目前仅支持配置审计事件:aliyun.config。
|
MaximumExecutionFrequency | String | One_Hour |
规则执行周期。
|
Description | String | ECS磁盘未因欠费或安全等原因而被锁定,视为“合规”。 |
托管规则描述。 |
Labels | Array of String | ["RAM","USer"] |
托管规则标签。 |
Identifier | String | ram-user-mfa-check |
托管规则标识。 |
OptionalInputParameterDetails | Map |
托管规则可选参数详情。 |
|
ManagedRuleName | String | RAM用户开启MFA |
托管规则名称。 |
CompulsoryInputParameterDetails | Map |
托管规则必选参数详情。 |
|
ConfigRuleArn | String | acs:config::100931896542****:rule/cr-7f7d626622af0041**** |
托管规则ARN。 |
Description | String | RAM用户开启MFA,视为“合规”。 |
托管规则描述。 |
CreateBy | Object |
规则创建者信息。 |
|
CompliancePackId | String | cp-541e626622af008**** |
合规包ID。 |
AggregatorName | String | Test_Group |
账号组名称。 |
CompliancePackName | String | OSS合规基线 |
合规包名称。 |
CreatorName | String | Alice |
规则创建者名称。 |
CreatorType | String | AGGREGATOR |
规则创建者类型。仅支持 |
CreatorId | String | 100931896542**** |
规则创建者的账号ID。 |
AggregatorId | String | ca-04b3fd170e340007**** |
账号组ID。 |
ConfigRuleName | String | RAM用户开启MFA |
规则名称。 |
ConfigRuleEvaluationStatus | Object |
规则执行状态。 |
|
LastErrorCode | String | TimeOut |
规则最近一次执行的错误码。 |
LastSuccessfulEvaluationTimestamp | Long | 1624932227486 |
规则最近一次调用成功的结束时间戳。单位:毫秒。 |
FirstActivatedTimestamp | Long | 1624932221993 |
规则首次激活时间戳。 |
FirstEvaluationStarted | Boolean | true |
规则是否已执行评估。取值:
|
LastSuccessfulInvocationTimestamp | Long | 1624932227476 |
规则最近一次调用成功的开始时间戳。单位:毫秒。 |
LastErrorMessage | String | time out |
规则最近一次执行的错误信息。 |
LastFailedEvaluationTimestamp | Long | 1614687022000 |
规则最近一次调用失败的结束时间戳。单位:毫秒。 |
LastFailedInvocationTimestamp | Long | 1614687022000 |
规则最近一次调用失败的开始时间戳。单位:毫秒。 |
ConfigRuleId | String | cr-7f7d626622af0041**** |
规则ID。 |
ModifiedTimestamp | Long | 1614687022000 |
规则最近一次更新的时间戳。单位:毫秒。 |
CreateTimestamp | Long | 1604684022000 |
创建规则的时间戳。单位:毫秒。 |
ResourceTypesScope | String | ACS::RAM::User |
规则评估的资源类型。 |
RegionIdsScope | String | global |
规则只评估所属地域ID的资源。 |
ExcludeResourceIdsScope | String | 23642660635687**** |
规则评估排除的资源ID。 |
ResourceGroupIdsScope | String | rg-aekzdibsjjc**** |
规则只评估所属资源组ID的资源。 |
TagKeyScope | String | RAM |
规则只评估所属标签键的资源。 |
TagValueScope | String | MFA |
规则只评估所属标签值的资源。 |
ConfigRuleTriggerTypes | String | ConfigurationItemChangeNotification |
规则触发机制。取值:
|
TagKeyLogicScope | String | AND |
参数
|
FolderIdsScope | String | fd-ZtHsRH**** |
规则仅对指定资源目录ID中成员账号内的资源生效。 说明
|
ExcludeFolderIdsScope | String | fd-pWmkqZ**** |
规则对指定资源目录ID中成员账号内的资源无效,即不对该资源目录ID中成员账号内的资源执行评估。 说明
|
ExcludeAccountIdsScope | String | 120886317861**** |
规则对指定成员账号内的资源无效,即不对该账号内的资源执行评估。 说明 仅适用于托管规则。
|
Compliance | Object |
规则合规统计结果。 |
|
ComplianceType | String | NON_COMPLIANT |
合规统计结果。取值:
|
Count | Integer | 3 |
合规统计结果对应的评估资源数量。 |
AccountId | Long | 120886317861**** |
规则归属阿里云账号ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=GetAggregateConfigRule
&ConfigRuleId=cr-7f7d626622af0041****
&AggregatorId=ca-7f00626622af0041****
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetAggregateConfigRuleResponse>
<RequestId>811234F4-C3AB-4D15-B90B-F55016D1B5AA</RequestId>
<ConfigRule>
<RiskLevel>1</RiskLevel>
<Source>
<SourceDetails>
<MessageType>ConfigurationItemChangeNotification</MessageType>
<EventSource>aliyun.config</EventSource>
<MaximumExecutionFrequency>One_Hour</MaximumExecutionFrequency>
</SourceDetails>
<Owner>ALIYUN</Owner>
<Identifier>acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config</Identifier>
</Source>
<ConfigRuleState>ACTIVE</ConfigRuleState>
<MaximumExecutionFrequency>One_Hour</MaximumExecutionFrequency>
<ManagedRule>
<SourceDetails>
<MessageType>ConfigurationItemChangeNotification</MessageType>
<EventSource>aliyun.config</EventSource>
<MaximumExecutionFrequency>One_Hour</MaximumExecutionFrequency>
</SourceDetails>
<Description>ECS磁盘未因欠费或安全等原因而被锁定,视为“合规”。</Description>
<Labels>["RAM","USer"]</Labels>
<Identifier>ram-user-mfa-check</Identifier>
<ManagedRuleName>RAM用户开启MFA</ManagedRuleName>
</ManagedRule>
<ConfigRuleArn>acs:config::100931896542****:rule/cr-7f7d626622af0041****</ConfigRuleArn>
<Description>RAM用户开启MFA,视为“合规”。</Description>
<CreateBy>
<CompliancePackId>cp-541e626622af008****</CompliancePackId>
<AggregatorName>Test_Group</AggregatorName>
<CompliancePackName>OSS合规基线</CompliancePackName>
<CreatorName>Alice</CreatorName>
<CreatorType>AGGREGATOR</CreatorType>
<CreatorId>100931896542****</CreatorId>
<AggregatorId>ca-04b3fd170e340007****</AggregatorId>
</CreateBy>
<ConfigRuleName>RAM用户开启MFA</ConfigRuleName>
<ConfigRuleEvaluationStatus>
<LastErrorCode>TimeOut</LastErrorCode>
<LastSuccessfulEvaluationTimestamp>1624932227486</LastSuccessfulEvaluationTimestamp>
<FirstActivatedTimestamp>1624932221993</FirstActivatedTimestamp>
<FirstEvaluationStarted>true</FirstEvaluationStarted>
<LastSuccessfulInvocationTimestamp>1624932227476</LastSuccessfulInvocationTimestamp>
<LastErrorMessage>time out</LastErrorMessage>
<LastFailedEvaluationTimestamp>1614687022000</LastFailedEvaluationTimestamp>
<LastFailedInvocationTimestamp>1614687022000</LastFailedInvocationTimestamp>
</ConfigRuleEvaluationStatus>
<ConfigRuleId>cr-7f7d626622af0041****</ConfigRuleId>
<ModifiedTimestamp>1614687022000</ModifiedTimestamp>
<CreateTimestamp>1604684022000</CreateTimestamp>
<ResourceTypesScope>ACS::RAM::User</ResourceTypesScope>
<RegionIdsScope>global</RegionIdsScope>
<ExcludeResourceIdsScope>23642660635687****</ExcludeResourceIdsScope>
<ResourceGroupIdsScope>rg-aekzdibsjjc****</ResourceGroupIdsScope>
<TagKeyScope>RAM</TagKeyScope>
<TagValueScope>MFA</TagValueScope>
<ConfigRuleTriggerTypes>ConfigurationItemChangeNotification</ConfigRuleTriggerTypes>
<TagKeyLogicScope>AND</TagKeyLogicScope>
<FolderIdsScope>fd-ZtHsRH****</FolderIdsScope>
<ExcludeFolderIdsScope>fd-pWmkqZ****</ExcludeFolderIdsScope>
<ExcludeAccountIdsScope>120886317861****</ExcludeAccountIdsScope>
<Compliance>
<ComplianceType>NON_COMPLIANT</ComplianceType>
<Count>3</Count>
</Compliance>
</ConfigRule>
</GetAggregateConfigRuleResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "811234F4-C3AB-4D15-B90B-F55016D1B5AA",
"ConfigRule" : {
"RiskLevel" : 1,
"Source" : {
"SourceDetails" : [ {
"MessageType" : "ConfigurationItemChangeNotification",
"EventSource" : "aliyun.config",
"MaximumExecutionFrequency" : "One_Hour"
} ],
"Owner" : "ALIYUN",
"Identifier" : "acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config"
},
"ConfigRuleState" : "ACTIVE",
"MaximumExecutionFrequency" : "One_Hour",
"ManagedRule" : {
"SourceDetails" : [ {
"MessageType" : "ConfigurationItemChangeNotification",
"EventSource" : "aliyun.config",
"MaximumExecutionFrequency" : "One_Hour"
} ],
"Description" : "ECS磁盘未因欠费或安全等原因而被锁定,视为“合规”。",
"Labels" : [ "[\"RAM\",\"USer\"]" ],
"Identifier" : "ram-user-mfa-check",
"ManagedRuleName" : "RAM用户开启MFA"
},
"ConfigRuleArn" : "acs:config::100931896542****:rule/cr-7f7d626622af0041****",
"Description" : "RAM用户开启MFA,视为“合规”。",
"CreateBy" : {
"CompliancePackId" : "cp-541e626622af008****",
"AggregatorName" : "Test_Group",
"CompliancePackName" : "OSS合规基线",
"CreatorName" : "Alice",
"CreatorType" : "AGGREGATOR",
"CreatorId" : "100931896542****",
"AggregatorId" : "ca-04b3fd170e340007****"
},
"ConfigRuleName" : "RAM用户开启MFA",
"ConfigRuleEvaluationStatus" : {
"LastErrorCode" : "TimeOut",
"LastSuccessfulEvaluationTimestamp" : 1624932227486,
"FirstActivatedTimestamp" : 1624932221993,
"FirstEvaluationStarted" : true,
"LastSuccessfulInvocationTimestamp" : 1624932227476,
"LastErrorMessage" : "time out",
"LastFailedEvaluationTimestamp" : 1614687022000,
"LastFailedInvocationTimestamp" : 1614687022000
},
"ConfigRuleId" : "cr-7f7d626622af0041****",
"ModifiedTimestamp" : 1614687022000,
"CreateTimestamp" : 1604684022000,
"ResourceTypesScope" : "ACS::RAM::User",
"RegionIdsScope" : "global",
"ExcludeResourceIdsScope" : "23642660635687****",
"ResourceGroupIdsScope" : "rg-aekzdibsjjc****",
"TagKeyScope" : "RAM",
"TagValueScope" : "MFA",
"ConfigRuleTriggerTypes" : "ConfigurationItemChangeNotification",
"TagKeyLogicScope" : "AND",
"FolderIdsScope" : "fd-ZtHsRH****",
"ExcludeFolderIdsScope" : "fd-pWmkqZ****",
"ExcludeAccountIdsScope" : "120886317861****",
"Compliance" : {
"ComplianceType" : "NON_COMPLIANT",
"Count" : 3
}
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ConfigRuleNotExists | The ConfigRule does not exist. | 此规则不存在。 |
400 | NoPermission | You are not authorized to perform this operation. | 您无权执行此操作。 |
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. | 服务不可用。 |
访问错误中心查看更多错误码。