Modifies the description, input parameters, and risk level of a rule in a specified account group.
Operation description
This topic provides an example of how to change the risk level of the rule cr-4e3d626622af0080**** in the account group ca-a4e5626622af0079**** to 3 (low risk).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:UpdateAggregateConfigRule |
update |
*AggregateConfigRule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConfigRuleId |
string |
Yes |
The rule ID. For more information, see ListAggregateConfigRules. |
cr-4e3d626622af0080**** |
| Description |
string |
No |
The description of the rule. |
最多可以定义6组标签。如果资源同时具有指定的所有标签,则视为“合规”。 |
| InputParameters |
object |
No |
The input parameters of the rule. |
{"tag1Key":"ECS","tag1Value":"test"} |
| MaximumExecutionFrequency |
string |
No |
The frequency at which the rule is run. Valid values:
Note
This parameter is required if you set |
One_Hour |
| ResourceTypesScope |
array |
No |
The resource types that the rule evaluates. Separate multiple resource types with a comma (,). |
ACS::ECS::Instance |
|
string |
No |
The resource types that the rule evaluates. Separate multiple resource types with a comma (,). |
ACS::ECS::Instance |
|
| RiskLevel |
integer |
No |
The risk level of the rule. Valid values:
|
3 |
| ClientToken |
string |
No |
A client token to ensure the idempotence of the request. You must use a unique token for each request. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
1594295238-f9361358-5843-4294-8d30-b5183fac**** |
| RegionIdsScope |
string |
No |
The rule applies only to resources in the specified regions. Separate multiple region IDs with a comma (,). Note
This parameter applies only to rule templates. |
cn-hangzhou |
| ExcludeRegionIdsScope |
string |
No |
The regions to exclude. The rule does not apply to resources in these regions. Separate multiple region IDs with a comma (,). |
cn-shanghai |
| ExcludeResourceIdsScope |
string |
No |
The resources to exclude. The rule does not apply to these resources. Separate multiple resource IDs with a comma (,). Note
This parameter applies only to rule templates. |
lb-t4nbowvtbkss7t326**** |
| ResourceIdsScope |
string |
No |
The rule applies only to the specified resources. Separate multiple resource IDs with a comma (,). |
lb-5cmbowstbkss9ta03**** |
| ConfigRuleTriggerTypes |
string |
No |
The trigger type of the rule. Valid values:
Note
You can modify this parameter only for custom rules. |
ConfigurationItemChangeNotification |
| AggregatorId |
string |
Yes |
The ID of the account group. For more information, see ListAggregators. |
ca-a4e5626622af0079**** |
| ResourceGroupIdsScope |
string |
No |
The rule applies only to resources in the specified resource groups. Separate multiple resource group IDs with a comma (,). Note
This parameter applies only to rule templates. |
rg-aekzc7r7rhx**** |
| ExcludeResourceGroupIdsScope |
string |
No |
The resource groups to exclude. The rule does not apply to resources in these resource groups. Separate multiple resource group IDs with a comma (,). |
rg-bnczc6r7rml**** |
TagKeyScope
deprecated
|
string |
No |
This parameter is deprecated. Use the The rule applies only to resources that have the specified tag. Note
This parameter applies only to rule templates. You must specify both |
ECS |
TagValueScope
deprecated
|
string |
No |
This parameter is deprecated. Use the The rule applies only to resources that have the specified tag. Note
This parameter applies only to rule templates. You must specify both |
test |
| TagsScope |
array<object> |
No |
The tag scope. |
|
|
object |
No |
|||
| TagKey |
string |
No |
The tag key. |
key-1 |
| TagValue |
string |
No |
The tag value. |
value-1 |
| ExcludeTagsScope |
array<object> |
No |
The excluded tag scope. |
|
|
object |
No |
|||
| TagKey |
string |
No |
The tag key. |
key-2 |
| TagValue |
string |
No |
The tag value. |
value-2 |
| ConfigRuleName |
string |
No |
The name of the rule. For more information, see ListAggregateConfigRules. |
存在所有指定标签 |
| TagKeyLogicScope |
string |
No |
The logical relationship for multiple tags in the This parameter also works with the deprecated Valid values:
Valid values:
|
AND |
| FolderIdsScope |
string |
No |
The rule applies only to resources of member accounts in the specified folders. Note
|
fd-ZtHsRH**** |
| ExcludeFolderIdsScope |
string |
No |
The folders to exclude. The rule does not apply to resources of member accounts in these folders. Separate multiple folder IDs with a comma (,). Note
|
fd-pWmkqZ**** |
| ExcludeAccountIdsScope |
string |
No |
The member accounts to exclude. The rule does not apply to resources of these member accounts. Separate multiple member account IDs with a comma (,). Note
This parameter applies only to rule templates. |
120886317861**** |
| AccountIdsScope |
string |
No |
The rule applies only to resources of the specified member accounts. Separate multiple member account IDs with a comma (,). Note
This parameter applies only to rule templates. |
115748125982**** |
Tag
deprecated
|
array<object> |
No |
The tags of the resource. This parameter is deprecated and no longer has any effect. Ignore this parameter. You can add up to 20 tags. |
|
|
object |
No |
The tags of the resource. You can add up to 20 tags. |
||
| Key |
string |
No |
The tag key of the resource. You can add up to 20 tag keys. |
key-1 |
| Value |
string |
No |
The tag value of the resource. You can add up to 20 tag values. |
value-1 |
| ResourceNameScope |
string |
No |
The rule applies only to resources that have the specified name. |
i-xxx |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None |
||
| ConfigRuleId |
string |
The rule ID. |
cr-4e3d626622af0080**** |
| RequestId |
string |
The request ID. |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
Examples
Success response
JSON format
{
"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. | |
| 400 | ConfigRuleNotExists | The ConfigRule does not exist. | The rule does not exist. |
| 400 | ConfigRuleExists | The ConfigRule already exists. | |
| 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. |
| 403 | AggregatorMemberNoPermission | The aggregator member is not authorized to perform the operation. | The aggregator member is not authorized to perform the operation. |
| 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.