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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:UpdateAggregateCompliancePack |
update |
*AggregateCompliancePack
|
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:
Valid values:
|
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 |
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 |
bandwidth |
| ParameterValue |
string |
No |
The value of the rule parameter. The |
20 |
| ConfigRuleId |
string |
No |
The rule ID. Cloud Config adds the existing rule to the current compliance package. Specify either |
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 |
| 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.