All Products
Search
Document Center

Cloud Config:UpdateAggregateConfigRule

Last Updated:May 23, 2023

Modifies a rule in an account group.

Operation Description

Modifies a rule in an account group.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
config:UpdateAggregateConfigRuleWrite
  • Config
    acs:config:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigRuleIdstringYes

The operation that you want to perform. Set the value to UpdateAggregateConfigRule.

cr-4e3d626622af0080****
DescriptionstringNo

The ID of the rule.

For more information about how to query the ID of a rule, see ListAggregateConfigRules.

InputParametersobjectNo

The description of the rule.

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

The input parameters of the rule.

Enumeration Value:
  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours
One_Hour
ResourceTypesScopearrayNo

The intervals at which the rule is triggered. Valid values:

  • One_Hour: 1 hour
  • Three_Hours: 3 hours
  • Six_Hours: 6 hours
  • Twelve_Hours: 12 hours
  • TwentyFour_Hours: 24 hours
NoteThis parameter is required if the ConfigRuleTriggerTypes parameter is set to ScheduledNotification.
stringNo
ACS::ECS::Instance
RiskLevelintegerNo

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

Enumeration Value:
  • 1
  • 2
  • 3
3
ClientTokenstringNo

The risk level of the resources that are not compliant with the rule. Valid values:

  • 1: high risk level
  • 2: medium risk level
  • 3: low risk level
1594295238-f9361358-5843-4294-8d30-b5183fac****
RegionIdsScopestringNo

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.

cn-hangzhou
ExcludeResourceIdsScopestringNo

The ID of the region to which the rule applies. Separate multiple region IDs with commas (,).

NoteThis parameter applies only to a managed rule.
lb-t4nbowvtbkss7t326****
ConfigRuleTriggerTypesstringNo

The ID of the resource to be excluded from the compliance evaluations performed by the rule. Separate multiple resource IDs with commas (,).

NoteThis parameter applies only to a managed rule.
ConfigurationItemChangeNotification
AggregatorIdstringYes

The trigger type of the rule. Valid values:

  • ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
  • ScheduledNotification: The rule is periodically triggered.
NoteThis parameter applies only to a custom rule.
ca-a4e5626622af0079****
ResourceGroupIdsScopestringNo

The ID of the account group.

For more information about how to query the ID of an account group, see ListAggregators.

rg-aekzc7r7rhx****
TagKeyScopestringNo

The ID of the resource group to which the rule applies. Separate multiple resource group IDs with commas (,).

NoteThis parameter applies only to a managed rule.
ECS
TagValueScopestringNo

The tag key used to filter resources. The rule applies only to the resources with the specified tag key.

NoteThis parameter applies only to a managed rule. You must set the TagKeyScope and TagValueScope parameters at the same time.
test
ConfigRuleNamestringNo

The tag value used to filter resources. The rule applies only to the resources with the specified tag value.

NoteThis parameter applies only to a managed rule. You must set the TagKeyScope and TagValueScope parameters at the same time.
TagKeyLogicScopestringNo

The name of the rule.

For more information about how to query the name of a rule, see ListAggregateConfigRules.

Enumeration Value:
  • OR
  • AND
AND
FolderIdsScopestringNo

The logical relationship among the tag keys if you specify multiple tag keys by using the TagKeyScope parameter. For example, if you set the TagKeyScope parameter to ECS,OSS and set the TagKeyLogicScope parameter to AND, the rule applies to resources with both the ECS and OSS tag keys. Valid values:

  • AND: the logical relationship of AND
  • OR: the logical relationship of OR
fd-ZtHsRH****
ExcludeFolderIdsScopestringNo

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
  • This parameter applies only to a rule of a global account group.
  • This parameter applies only to a managed rule.
fd-pWmkqZ****
ExcludeAccountIdsScopestringNo

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
  • This parameter applies only to a rule of a global account group.
  • This parameter applies only to a managed rule.
120886317861****

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.

Response parameters

ParameterTypeDescriptionExample
object
ConfigRuleIdstring

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 (,).

NoteThis parameter applies only to a managed rule.
cr-4e3d626622af0080****
RequestIdstring

The ID of the rule.

6EC7AED1-172F-42AE-9C12-295BC2ADB751

Examples

Sample success responses

JSONformat

{
  "ConfigRuleId": "cr-4e3d626622af0080****",
  "RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751"
}

Error codes

HTTP status codeError codeError messageDescription
400ExceedMaxRuleCountThe maximum number of rules is exceeded.The maximum number of rules is exceeded.
400ConfigRuleNotExistsThe ConfigRule does not exist.The rule does not exist.
400ConfigRuleExistsThe ConfigRule already exists.The config rule already exists.
400Invalid.AggregatorId.ValueThe specified AggregatorId is invalid.The specified aggregator ID does not exist or you are not authorized to use the aggregator.
403AggregatorMemberNoPermissionThe aggregator member is not authorized to perform the operation.The aggregator member is not authorized to perform the operation.
404AccountNotExistedYour account does not exist.The specified account does not exist.
503ServiceUnavailableThe request has failed due to a temporary failure of the server.The request has failed due to a temporary failure of the server.

For a list of error codes, visit the Service error codes.