Creates or modifies a rule for the current account.
This API has been deprecated. We recommend migrating to Config(2020-09-07) - CreateConfigRule for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConfigRuleId |
string |
No |
The rule ID. |
cr-2a914fcf617e00c9**** |
| ConfigRuleName |
string |
Yes |
The name of the rule. |
|
| Description |
string |
No |
The description of the rule. |
|
| InputParameters |
string |
No |
The input parameters of the rule. |
{"cpuCount": "2"} |
| SourceOwner |
string |
Yes |
The owner of the rule. Valid values:
|
ALIYUN |
| SourceIdentifier |
string |
Yes |
The identifier of the rule.
|
rds-cpu-min-count-limit |
| SourceDetailMessageType |
string |
Yes |
The trigger type of the rule. Valid values:
|
ConfigurationItemChangeNotification |
| SourceMaximumExecutionFrequency |
string |
No |
The frequency at which the rule is executed. Valid values:
|
Twelve_Hours |
| ScopeComplianceResourceId |
string |
No |
The ID of the resource to be evaluated.
|
vpc-6weoy5flv41pj4wvr**** |
| ScopeComplianceResourceTypes |
string |
Yes |
The types of the resources to be evaluated. |
["ACS::RDS::DBInstance"] |
| RiskLevel |
integer |
Yes |
The risk level. Valid values:
|
1 |
| ClientToken |
string |
No |
A client token. It is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The ClientToken parameter can contain only ASCII characters and cannot exceed 64 characters in length. |
1594295238-f9361358-5843-4294-8d30-b5183fac**** |
| MultiAccount |
boolean |
No |
This parameter is scheduled to be deprecated at 00:00:00 on June 30, 2021. The API of the alternative feature, account group, is released at 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to the API of the account group feature after 00:00:00 on May 30, 2021. For more information about account groups, see Account group. |
false |
| MemberId |
integer |
No |
This parameter is scheduled to be deprecated at 00:00:00 on June 30, 2021. The API of the alternative feature, account group, is released at 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to the API of the account group feature after 00:00:00 on May 30, 2021. For more information about account groups, see Account group. |
123456789 |
Response elements
|
Parameter |
Type |
Description |
Example |
|
object |
N/A. |
||
| ConfigRuleId |
string |
The rule ID. |
cr-76ac4fcfb57e00c9**** |
| RequestId |
string |
The request ID. |
A7A0FFF8-0B44-40C6-8BBF-3A185EFDF3F7 |
Examples
Success response
JSON format
{
"ConfigRuleId": "cr-76ac4fcfb57e00c9****",
"RequestId": "A7A0FFF8-0B44-40C6-8BBF-3A185EFDF3F7"
}
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. | |
| 400 | ConfigRuleExists | The ConfigRule already exists. | |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. |
See for a complete list.
Release notes
See Release Notes for a complete list.