All Products
Search
Document Center

Cloud Config:UpdateAggregateConfigRule

Last Updated:Sep 02, 2026

Modifies the description, input parameters, risk level, and other settings of a rule in a specified account group.

Operation description

This topic provides an example on how to change the risk level of the rule cr-4e3d626622af0080**** in the account group ca-a4e5626622af0079**** to 3 (low risk).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

config:UpdateAggregateConfigRule

update

*AggregateConfigRule

acs:config:*:{#accountId}:aggregateconfigrule/{#ConfigRuleId}

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-4e3d626622af0080****

Description

string

No

The description of the rule.

A maximum of six tag groups can be defined. If a resource has all specified tags, the resource is considered "compliant"

InputParameters

object

No

The input parameters of the rule.

{"tag1Key":"ECS","tag1Value":"test"}

MaximumExecutionFrequency

string

No

The execution frequency of the rule. Valid values:

  • One_Hour: 1 hour.

  • Three_Hours: 3 hours.

  • Six_Hours: 6 hours.

  • Twelve_Hours: 12 hours.

  • TwentyFour_Hours: 24 hours.

Note

This parameter is required when ConfigRuleTriggerTypes is set to ScheduledNotification.

Valid values:

  • Twelve_Hours :

    12 hours.

  • Three_Hours :

    3 hours.

  • Six_Hours :

    6 hours.

  • One_Hour :

    1 hour.

  • TwentyFour_Hours :

    24 hours.

One_Hour

ResourceTypesScope

array

No

The resource types to be evaluated by the rule. Separate multiple resource types with commas (,).

ACS::ECS::Instance

string

No

The resource types to be evaluated by the rule. Separate multiple resource types with commas (,).

ACS::ECS::Instance

RiskLevel

integer

No

The risk level of the rule. Valid values:

  • 1: High risk.

  • 2: Medium risk.

  • 3: Low risk.

Valid values:

  • 1 :

    High risk.

  • 2 :

    Medium risk.

  • 3 :

    Low risk.

3

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken value 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 region IDs. Separate multiple region IDs with commas (,).

Note

This parameter applies only to rule templates.

cn-hangzhou

ExcludeRegionIdsScope

string

No

The rule does not apply to resources in the specified region IDs. Resources in the specified regions are not evaluated. Separate multiple region IDs with commas (,).

cn-shanghai

ExcludeResourceIdsScope

string

No

The rule does not apply to the specified resource IDs. The specified resources are not evaluated. Separate multiple resource IDs with commas (,).

Note

This parameter applies only to rule templates.

lb-t4nbowvtbkss7t326****

ResourceIdsScope

string

No

The rule applies only to the specified resource IDs. Separate multiple resource IDs with commas (,).

lb-5cmbowstbkss9ta03****

ConfigRuleTriggerTypes

string

No

The trigger type of the rule. Valid values:

  • ConfigurationItemChangeNotification: triggered upon configuration changes.

  • ScheduledNotification: triggered as scheduled.

Note

Only custom rules support modification of this parameter.

ConfigurationItemChangeNotification

AggregatorId

string

Yes

The account group ID.

For information about how to obtain an account group ID, see ListAggregators.

ca-a4e5626622af0079****

ResourceGroupIdsScope

string

No

The rule applies only to resources in the specified resource group IDs. Separate multiple resource group IDs with commas (,).

Note

This parameter applies only to rule templates.

rg-aekzc7r7rhx****

ExcludeResourceGroupIdsScope

string

No

The rule does not apply to resources in the specified resource group IDs. Resources in the specified resource groups are not evaluated. Separate multiple resource group IDs with commas (,).

rg-bnczc6r7rml****

TagKeyScope deprecated

string

No

Deprecated. Use the TagsScope parameter instead.

The rule applies only to resources that have the specified tag.

Note

This parameter applies only to rule templates. TagKeyScope and TagValueScope must be set at the same time.

ECS

TagValueScope deprecated

string

No

Deprecated. Use the TagsScope parameter instead.

The rule applies only to resources that have the specified tag.

Note

This parameter applies only to rule templates. TagKeyScope and TagValueScope must be set at the same time.

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 rule name.

For information about how to obtain a rule name, see ListAggregateConfigRules.

All specified tags exist

TagKeyLogicScope

string

No

The logical relationship when the TagsScope parameter has multiple values. For example, if TagsScope is set to "TagsScope.1.TagKey":"a","TagsScope.1.TagValue":"a","TagsScope.2.TagKey":"b","TagsScope.2.TagValue":"b" and this parameter is set to AND, the rule applies only to resources that have both the a:a and b:b tags. If this parameter is not specified, the default logic OR is used.

This parameter can also be used with the deprecated TagKeyScope parameter (not recommended). For example, if TagKeyScope is set to ECS,OSS and this parameter is set to AND, the rule applies only to resources that have both the ECS and OSS tags.

Valid values:

  • AND: logical AND.

  • OR: logical OR.

Valid values:

  • OR :

    OR

  • AND :

    AND

AND

FolderIdsScope

string

No

The rule applies only to resources of member accounts in the specified resource directory folder IDs.

Note
  • This parameter takes effect only for rules in a global account group.

  • This parameter applies only to rule templates.

fd-ZtHsRH****

ExcludeFolderIdsScope

string

No

The rule does not apply to resources of member accounts in the specified resource directory folder IDs. Resources of member accounts in the specified folders are not evaluated. Separate multiple resource directory folder IDs with commas (,).

Note
  • This parameter takes effect only for rules in a global account group.

  • This parameter applies only to rule templates.

fd-pWmkqZ****

ExcludeAccountIdsScope

string

No

The rule does not apply to resources in the specified member accounts. Resources in the specified member accounts are not evaluated. Separate multiple member account IDs with commas (,).

Note

This parameter applies only to rule templates.

120886317861****

AccountIdsScope

string

No

The rule applies only to resources in the specified member accounts. Separate multiple member account IDs with commas (,).

Note

This parameter applies only to rule templates.

115748125982****

Conditions

string

No

The conditions of the custom condition rule, in JSON format.

{"ComplianceConditions":"{\"operator\":\"and\",\"children\":[{\"operator\":\"StringEquals\",\"featurePath\":\"$.Status\",\"desired\":\"1\",\"featureSource\":\"CONFIGURATION\"}]}"}

ResourceNameScope

string

No

The rule applies only to resources with the specified resource name.

i-xxx

Tag deprecated

array<object>

No

The tags of the resource. This parameter is deprecated. Ignore this parameter because values passed in do not take effect.

A maximum of 20 tags can be attached.

object

No

The tags of the resource.

A maximum of 20 tags can be attached.

Key

string

No

The tag key of the resource.

A maximum of 20 tag keys can be specified.

key-1

Value

string

No

The tag value of the resource.

A maximum of 20 tag values can be specified.

value-1

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

The response parameters.

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.