Modifies a rule in an account group.
The sample request in this topic shows you how to change the risk level specified
for the cr-4e3d626622af0080****
managed rule to 3
, which indicates low risk level, in the ca-a4e5626622af0079****
account group.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateAggregateConfigRule |
The operation that you want to perform. Set the value to UpdateAggregateConfigRule. |
ConfigRuleId | String | Yes | cr-4e3d626622af0080**** |
The ID of the rule. For more information about how to query the ID of a rule, see ListAggregateConfigRules. |
Description | String | No | If the resource has all the specified tags, the configuration is considered compliant. You can define up to six groups of tags. |
The description of the rule. |
InputParameters | Map | No | null |
The input parameters of the rule. |
MaximumExecutionFrequency | String | No | One_Hour |
The intervals at which the rule is triggered. Valid values:
Note This parameter is required if the
ConfigRuleTriggerTypes parameter is set to ScheduledNotification .
|
ResourceTypesScope | Array of String | No | ACS::ECS::Instance |
The type of the resource to be evaluated by the rule. Separate multiple resource types with commas (,). |
RiskLevel | Integer | No | 3 |
The risk level of the resources that are not compliant with the rule. Valid values:
|
ClientToken | String | No | 1594295238-f9361358-5843-4294-8d30-b5183fac**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
RegionIdsScope | String | No | cn-hangzhou |
The ID of the region to which the rule applies. Separate multiple region IDs with commas (,). Note This parameter applies only to a managed rule.
|
ExcludeResourceIdsScope | String | No | lb-t4nbowvtbkss7t326**** |
The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,). Note This parameter applies only to a managed rule.
|
ConfigRuleTriggerTypes | String | No | ConfigurationItemChangeNotification |
The trigger type of the rule. Valid values:
Note This parameter applies only to a custom rule.
|
AggregatorId | String | Yes | ca-a4e5626622af0079**** |
The ID of the account group. For more information about how to query the ID of an account group, see ListAggregators. |
ResourceGroupIdsScope | String | No | rg-aekzc7r7rhx**** |
The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,). Note This parameter applies only to a managed rule.
|
TagKeyScope | String | No | ECS |
The tag key used to filter resources. The rule applies only to the resources with the specified tag key. Note This parameter applies only to a managed rule. You must set the
TagKeyScope and TagValueScope parameters at the same time.
|
TagValueScope | String | No | test |
The tag value used to filter resources. The rule applies only to the resources with the specified tag value. Note This parameter applies only to a managed rule. You must set the
TagKeyScope and TagValueScope parameters at the same time.
|
ConfigRuleName | String | No | required-tags |
The name of the rule. For more information about how to query the name of a rule, see ListAggregateConfigRules. |
TagKeyLogicScope | String | No | AND |
The logical relationship among the tag keys if you specify multiple tag keys by using
the
|
FolderIdsScope | String | No | fd-ZtHsRH**** |
The ID of the resource directory to which the rule applies, which means that the resources within member accounts in the resource directory are evaluated based on the rule. Note
|
ExcludeFolderIdsScope | String | No | fd-pWmkqZ**** |
The ID of the resource directory to which the rule does not apply, which means that the resources within member accounts in the resource directory are not evaluated based on the rule. Separate multiple resource directory IDs with commas (,). Note
|
ExcludeAccountIdsScope | String | No | 120886317861**** |
The ID of the member account to which the rule does not apply, which means that the resources within the member account are not evaluated based on the rule. Separate multiple member account IDs with commas (,). Note This parameter applies only to a managed rule.
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ConfigRuleId | String | cr-4e3d626622af0080**** |
The ID of the rule. |
RequestId | String | 6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateAggregateConfigRule
&ConfigRuleId=cr-4e3d626622af0080****
&RiskLevel=3
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateAggregateConfigRuleResponse>
<ConfigRuleId>cr-4e3d626622af0080****</ConfigRuleId>
<RequestId>5895065A-196C-4254-8AD8-14EFC31EEF50</RequestId>
</UpdateAggregateConfigRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"ConfigRuleId" : "cr-4e3d626622af0080****",
"RequestId" : "6EC7AED1-172F-42AE-9C12-295BC2ADB751"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ExceedMaxRuleCount | The maximum number of rules is exceeded. | The error message returned because the number of existing rules reaches the upper limit. |
400 | ConfigRuleNotExists | The ConfigRule does not exist. | The error message returned because the specified rule does not exist. |
400 | ConfigRuleExists | The ConfigRule already exists. | The error message returned because the specified rule name already exists. |
400 | Invalid.AggregatorId.Value | The specified AggregatorId is invalid. | The error message returned because the specified account group ID does not exist or you are not authorized to use the account group. |
403 | AggregatorMemberNoPermission | The aggregator member is not authorized to perform the operation. | The error message returned because you are using a member account and you are not authorized to perform the specified operation. |
404 | AccountNotExisted | Your account does not exist. | The error message returned because the specified account does not exist. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The error message returned because the service is unavailable. |
For a list of error codes, visit the API Error Center.