Queries the details of a specified rule in a specified account group.
Operation description
This topic provides an example on how to query the details of the rule cr-7f7d626622af0041**** in the account group ca-7f00626622af0041****.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetAggregateConfigRule |
get |
*AggregateConfigRule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConfigRuleId |
string |
Yes |
The rule ID. For information about how to obtain a rule ID, see ListAggregateConfigRules. |
cr-7f7d626622af0041**** |
| AggregatorId |
string |
Yes |
The account group ID. For information about how to obtain an account group ID, see ListAggregators. |
ca-7f00626622af0041**** |
Tag
deprecated
|
array<object> |
No |
The tags. This parameter is deprecated and does not take effect. |
|
|
object |
No |
The tags of the resource. This parameter is deprecated and does not take effect. 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 |
For information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| RequestId |
string |
The request ID. |
811234F4-C3AB-4D15-B90B-F55016D1B5AA |
| ConfigRule |
object |
The rule list. |
|
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| InputParameters |
object |
The rule parameter information. |
{"tag1Key":"ECS","tag1Value":"test"} |
| Source |
object |
The rule source information. |
|
| SourceDetails |
array<object> |
The rule source details. |
|
|
object |
None. |
||
| MessageType |
string |
The trigger mechanism of the rule. Valid values:
|
ConfigurationItemChangeNotification |
| EventSource |
string |
The event source. Note
Currently, only Cloud Config events are supported: aliyun.config. |
aliyun.config |
| MaximumExecutionFrequency |
string |
The execution frequency of the rule. Valid values:
|
One_Hour |
| Owner |
string |
The owner of the rule source. Valid values:
|
ALIYUN |
| Identifier |
string |
The rule identifier.
|
acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config |
| ConfigRuleState |
string |
The running status of the rule. Valid values:
|
ACTIVE |
| MaximumExecutionFrequency |
string |
The execution frequency of the rule. Valid values:
|
One_Hour |
| ManagedRule |
object |
The rule template details. |
|
| SourceDetails |
array<object> |
The rule template source details. |
|
|
object |
The rule source details. |
||
| MessageType |
string |
The trigger mechanism of the rule. Valid values:
|
ConfigurationItemChangeNotification |
| EventSource |
string |
The event source. Note
Currently, only Cloud Config events are supported: aliyun.config. |
aliyun.config |
| MaximumExecutionFrequency |
string |
The execution frequency of the rule. Valid values:
|
One_Hour |
| Description |
string |
The description of the rule template. |
An ECS disk that is not locked due to overdue payments or security reasons is considered "compliant" |
| Labels |
array |
The tag list of the rule template. |
|
|
string |
The tag of the rule template. |
["RAM","USer"] |
|
| Identifier |
string |
The identifier of the rule template. |
ram-user-mfa-check |
| OptionalInputParameterDetails |
object |
The optional parameter details of the rule template. |
{} |
| ManagedRuleName |
string |
The name of the rule template. |
MFA enabled for RAM users |
| CompulsoryInputParameterDetails |
object |
The required parameter details of the rule template. |
{} |
| ConfigRuleArn |
string |
The ARN of the rule template. |
acs:config::100931896542****:rule/cr-7f7d626622af0041**** |
| Description |
string |
The description of the rule template. |
If MFA is enabled for RAM users, the resource is considered "compliant" |
| CreateBy |
object |
The information about the rule creator. |
|
| CompliancePackId |
string |
The compliance package ID. |
cp-541e626622af008**** |
| AggregatorName |
string |
The account group name. |
Test_Group |
| CompliancePackName |
string |
The compliance package name. |
OSS compliance baseline |
| CreatorName |
string |
The name of the rule creator. |
Alice |
| CreatorType |
string |
The type of the rule creator. Only |
AGGREGATOR |
| CreatorId |
string |
The account ID of the rule creator. |
100931896542**** |
| AggregatorId |
string |
The account group ID. |
ca-04b3fd170e340007**** |
| ConfigRuleName |
string |
The rule name. |
MFA enabled for RAM users |
| ConfigRuleEvaluationStatus |
object |
The execution status of the rule. |
|
| LastErrorCode |
string |
The error code from the most recent rule execution. |
TimeOut |
| LastSuccessfulEvaluationTimestamp |
integer |
The end timestamp of the most recent successful rule invocation. Unit: milliseconds. |
1624932227486 |
| FirstActivatedTimestamp |
integer |
The timestamp when the rule was first activated. This value is a UNIX timestamp in milliseconds. |
1624932221993 |
| FirstEvaluationStarted |
boolean |
Indicates whether the rule has been evaluated. Valid values:
|
true |
| LastSuccessfulInvocationTimestamp |
integer |
The start timestamp of the most recent successful rule invocation. Unit: milliseconds. |
1624932227476 |
| LastErrorMessage |
string |
The error message from the most recent rule execution. |
time out |
| LastFailedEvaluationTimestamp |
integer |
The end timestamp of the most recent failed rule invocation. Unit: milliseconds. |
1614687022000 |
| LastFailedInvocationTimestamp |
integer |
The start timestamp of the most recent failed rule invocation. Unit: milliseconds. |
1614687022000 |
| ConfigRuleId |
string |
The rule ID. |
cr-7f7d626622af0041**** |
| ModifiedTimestamp |
integer |
The timestamp when the rule was last updated. Unit: milliseconds. |
1614687022000 |
| CreateTimestamp |
integer |
The timestamp when the rule was created. Unit: milliseconds. |
1604684022000 |
| ResourceTypesScope |
string |
The resource types evaluated by the rule. |
ACS::RAM::User |
| ExcludeRegionIdsScope |
string |
The region IDs excluded from the rule evaluation. The rule does not evaluate resources in the specified regions. Separate multiple region IDs with commas (,). |
cn-hangzhou |
| RegionIdsScope |
string |
The region ID of the resources that the rule evaluates. |
global |
| ExcludeResourceIdsScope |
string |
The resource IDs excluded from the rule evaluation. |
23642660635687**** |
| ResourceIdsScope |
string |
The resource IDs to which the rule applies. Separate multiple resource IDs with commas (,). |
eip-8vbf3x310fn56ijfd**** |
| ResourceGroupIdsScope |
string |
The resource group ID of the resources that the rule evaluates. |
rg-aekzdibsjjc**** |
| ExcludeResourceGroupIdsScope |
string |
The resource group IDs excluded from the rule evaluation. The rule does not evaluate resources in the specified resource groups. Separate multiple resource group IDs with commas (,). |
rg-aekzdibsjjc**** |
TagKeyScope
deprecated
|
string |
[Deprecated] Use the The tag key of the resources that the rule evaluates. |
RAM |
TagValueScope
deprecated
|
string |
[Deprecated] Use the The tag value of the resources that the rule evaluates. |
MFA |
| 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 |
|||
| TagKey |
string |
The tag key. |
key-2 |
| TagValue |
string |
The tag value. |
value-2 |
| ConfigRuleTriggerTypes |
string |
The trigger mechanism of the rule. Valid values:
|
ConfigurationItemChangeNotification |
| TagKeyLogicScope |
string |
This field is not returned for rules created by using the This field is used to retrieve rules created by using the deprecated Valid values:
|
AND |
| FolderIdsScope |
string |
The resource directory folder IDs. The rule applies only to resources within the member accounts under the specified folders. |
fd-ZtHsRH**** |
| ExcludeFolderIdsScope |
string |
The resource directory folder IDs excluded from the rule evaluation. The rule does not evaluate resources within the member accounts under the specified folders. |
fd-pWmkqZ**** |
| ExcludeAccountIdsScope |
string |
The member accounts excluded from the rule evaluation. The rule does not execute evaluation on resources within the specified accounts. |
120886317861**** |
| ResourceNameScope |
string |
The resource name to which the rule applies. |
i-xxx |
| Compliance |
object |
The compliance statistics of the rule. |
|
| ComplianceType |
string |
The compliance result. Valid values:
|
NON_COMPLIANT |
| Count |
integer |
The resource count of evaluated resources that correspond to the compliance result. |
3 |
| AccountId |
integer |
The Alibaba Cloud account ID to which the rule belongs. |
120886317861**** |
| ExtendContent |
string |
The extended content. Currently, this parameter is used only to set the trigger time for the 24-hour periodic trigger. |
{"fixedHour":"12"} |
| Tags |
array<object> |
The resource tags. |
|
|
object |
The resource tags. |
||
| TagKey |
string |
The tag key. |
key-1 |
| TagValue |
string |
The tag value. |
value-1 |
| AccountIdsScope |
string |
The member account IDs to which the rule applies. The rule takes effect only on resources within the specified member accounts. Separate multiple member account IDs with commas (,). |
120886317861**** |
Examples
Success response
JSON format
{
"RequestId": "811234F4-C3AB-4D15-B90B-F55016D1B5AA",
"ConfigRule": {
"RiskLevel": 1,
"InputParameters": {
"tag1Key": "ECS",
"tag1Value": "test"
},
"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",
"OptionalInputParameterDetails": {},
"ManagedRuleName": "RAM用户开启MFA",
"CompulsoryInputParameterDetails": {}
},
"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",
"ExcludeRegionIdsScope": "cn-hangzhou",
"RegionIdsScope": "global",
"ExcludeResourceIdsScope": "23642660635687****",
"ResourceIdsScope": "eip-8vbf3x310fn56ijfd****\n",
"ResourceGroupIdsScope": "rg-aekzdibsjjc****",
"ExcludeResourceGroupIdsScope": "rg-aekzdibsjjc****",
"TagKeyScope": "RAM",
"TagValueScope": "MFA",
"TagsScope": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"ExcludeTagsScope": [
{
"TagKey": "key-2",
"TagValue": "value-2"
}
],
"ConfigRuleTriggerTypes": "ConfigurationItemChangeNotification",
"TagKeyLogicScope": "AND",
"FolderIdsScope": "fd-ZtHsRH****",
"ExcludeFolderIdsScope": "fd-pWmkqZ****",
"ExcludeAccountIdsScope": "120886317861****",
"ResourceNameScope": "i-xxx",
"Compliance": {
"ComplianceType": "NON_COMPLIANT",
"Count": 3
},
"AccountId": 0,
"ExtendContent": "{\"fixedHour\":\"12\"}",
"Tags": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"AccountIdsScope": "120886317861****\n"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ConfigRuleNotExists | The ConfigRule does not exist. | The rule does not exist. |
| 400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
| 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. |
| 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.