All Products
Search
Document Center

Cloud Config:UpdateAggregateCompliancePack

Last Updated:Sep 02, 2026

Modifies the information of a compliance package in a specified account group.

Operation description

This topic provides an example on how to change the parameter value of the rule template eip-bandwidth-limit to 20 in the compliance package cp-fdc8626622af00f9**** of the account group ca-f632626622af0079****.

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:UpdateAggregateCompliancePack

update

*AggregateCompliancePack

acs:config:*:{#accountId}:aggregatecompliancepack/{#AggregatorCompliancePackId}

None None

Request parameters

Parameter

Type

Required

Description

Example

CompliancePackId

string

Yes

The compliance package ID.

For information about how to obtain the compliance package ID, see ListAggregateCompliancePacks.

cp-fdc8626622af00f9****

Description

string

No

The description of the compliance package.

Based on the China Classified Protection of Cybersecurity Level 3 standard, this template provides recommendations for continuous compliance detection, helping you self-check and fix issues in advance to quickly pass formal assessments

RiskLevel

integer

No

The risk level of the compliance package. Valid values:

  • 1: High risk.

  • 2: Medium risk.

  • 3: Low risk.

Valid values:

  • 1 :

    High risk.

  • 2 :

    Medium risk.

  • 3 :

    Low risk.

1

ConfigRules

array<object>

No

The list of rules in the compliance package.

When you modify a compliance package, if the rule list is empty, the existing rule list remains unchanged. If the rule list is not empty, the new rules replace the existing rules in the rule list.

array<object>

No

The rule information.

ManagedRuleIdentifier

string

No

The identifier of the rule template. Cloud Config automatically creates a rule based on the rule template identifier and adds the rule to the current compliance package.

Specify either ManagedRuleIdentifier or ConfigRuleId. If both parameters are set, ConfigRuleId takes precedence. For information about how to obtain the managed rule identifier, see ListCompliancePackTemplates.

eip-bandwidth-limit

ConfigRuleParameters

array<object>

No

The rule parameter information.

object

No

The rule parameter information.

ParameterName

string

No

The name of the rule parameter.

The ParameterName and ParameterValue parameters must be set together or left unset together. If the rule template has parameters without default values, you must set this parameter. For information about how to obtain the parameter name of a rule template, see ListCompliancePackTemplates.

bandwidth

ParameterValue

string

No

The value of the rule parameter.

The ParameterName and ParameterValue parameters must be set together or left unset together. If the rule template has parameters without default values, you must set this parameter. For information about how to obtain the parameter value of a rule template, see ListCompliancePackTemplates.

20

ConfigRuleId

string

No

The rule ID. Cloud Config adds the existing rule to the current compliance package.

Specify either ManagedRuleIdentifier or ConfigRuleId. If both parameters are specified, ConfigRuleId takes precedence. For information about how to obtain the rule ID, see ListAggregateConfigRules.

cr-e918626622af000f****

ConfigRuleName

string

No

The name of the rule.

Detect idle elastic IP addresses

Description

string

No

The description of the rule.

An elastic IP address that is associated with an ECS instance or a NAT gateway and is not idle is considered "compliant"

RiskLevel

integer

No

The risk level of the rule. Valid values:

  • 1: High risk.

  • 2: Medium risk.

  • 3: Low risk.

1

ClientToken

string

No

Ensures the idempotence of the request. Generate a parameter value from your client to ensure that the value is unique across different requests. ClientToken supports only ASCII characters and cannot exceed 64 characters in length.

1594295238-f9361358-5843-4294-8d30-b5183fac****

AggregatorId

string

Yes

The account group ID.

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

ca-f632626622af0079****

CompliancePackName

string

No

The name of the compliance package.

For information about how to obtain the compliance package name, see ListAggregateCompliancePacks.

Classified Protection Level 3 Pre-check Compliance Package

RegionIdsScope

string

No

The compliance package takes effect only on resources in the specified region IDs. Separate multiple region IDs with commas (,).

cn-hangzhou

ExcludeRegionIdsScope

string

No

The rule does not take effect on resources in the specified regions. Resources in those regions are not evaluated. Separate multiple region IDs with commas (,).

cn-shanghai

ExcludeResourceIdsScope

string

No

The compliance package does not take effect on the specified resource IDs. Resources with those IDs are not evaluated. Separate multiple resource IDs with commas (,).

eip-8vbf3x310fn56ijfd****

ResourceIdsScope

string

No

The rule takes effect only on the specified resource IDs. Separate multiple resource IDs with commas (,).

lb-5cmbowstbkss9ta03****

ResourceGroupIdsScope

string

No

The compliance package takes effect only on resources in the specified resource group IDs. Separate multiple resource group IDs with commas (,).

rg-aekzc7r7rhx****

ExcludeResourceGroupIdsScope

string

No

The rule does not take effect on resources in the specified resource group IDs. Resources in those resource groups are not evaluated. Separate multiple resource group IDs with commas (,).

rg-bnczc6r7rml****

TagKeyScope

string

No

The compliance package takes effect only on resources that are bound with the specified tag key.

ECS

TagValueScope

string

No

The compliance package takes effect only on resources that are bound with the specified tag key-value pair.

Note

TagValueScope must be used together with TagKeyScope.

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

The excluded tag scope.

TagKey

string

No

The tag key.

key-2

TagValue

string

No

The tag value.

value-2

Tag deprecated

array<object>

No

The tags of the resource. This parameter is deprecated. Ignore this parameter because any value passed in does not take effect.

A maximum of 20 tags can be bound.

object

No

The tags of the resource.

A maximum of 20 tags can be bound.

Key

string

No

The tag key of the resource.

A maximum of 20 tag keys can be bound.

key-1

Value

string

No

The tag value of the resource.

A maximum of 20 tag values can be bound.

value-1

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

Response elements

Element

Type

Description

Example

object

The response parameters.

CompliancePackId

string

The compliance package ID.

ca-f632626622af0079****

RequestId

string

The request ID.

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

Examples

Success response

JSON format

{
  "CompliancePackId": "ca-f632626622af0079****",
  "RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751"
}

Error codes

HTTP status code

Error code

Error message

Description

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.
400 Invalid.CompliancePackId.Value The specified CompliancePackId does not exist. The specified compliance pack ID does not exist.
400 CompliancePackExceedMaxCount The maximum number of compliance pack is exceeded.
400 Invalid.ConfigRules.Empty You must specify ConfigRules.
400 Invalid.ConfigRules.Value The specified ConfigRules is invalid. The specified ConfigRules is invalid.
400 ConfigRuleExceedMaxRuleCount The maximum number of config rules is exceeded.
400 CompliancePackAlreadyPending The compliance pack has a pending operation and cannot be updated. The compliance pack has a pending operation and cannot be updated.
400 CompliancePackExists The compliance pack already exists. The compliance pack name already exists.
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.