Enables multiple rules at a time so that these rules enter the Active state.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ActiveConfigRules |
The operation that you want to perform. Set the value to ActiveConfigRules. |
ConfigRuleIds | String | Yes | cr-2da35180a8d1008e****,cr-2da35180a8d1008e**** |
The IDs of the rules. Separate multiple rule IDs with commas (,). You can specify a maximum of 20 rule IDs at a time. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
OperateRuleResult | Struct |
The result information about the operation. |
|
OperateRuleItemList | Array of OperateRuleItem |
The result information about each rule. |
|
ConfigRuleId | String | cr-2da35180a8d1008e**** |
The ID of the rule. |
ErrorCode | String | ConfigRuleStatusNotInActive |
The error code.
|
Success | Boolean | false |
Indicates whether the rule is enabled. Valid values:
|
RequestId | String | 49C1A88F-D163-46DF-84A6-F300229F37AE |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ActiveConfigRules
&ConfigRuleIds=cr-2da35180a8d1008e****,cr-2da35180a8d1008e****
&<Common request parameters>
Sample success responses
XML
format
<ActiveConfigRulesResponse>
<OperateRuleResult>
<OperateRuleItemList>
<ConfigRuleId>cr-2da35180a8d1008e****</ConfigRuleId>
<ErrorCode>ConfigRuleStatusNotInActive</ErrorCode>
<Success>false</Success>
</OperateRuleItemList>
<OperateRuleItemList>
<ConfigRuleId>cr-2da351800131233a****</ConfigRuleId>
<ErrorCode></ErrorCode>
<Success>true</Success>
</OperateRuleItemList>
<RequestId>49C1A88F-D163-46DF-84A6-F300229F37AE</RequestId>
</OperateRuleResult>
</ActiveConfigRulesResponse>
JSON
format
{
"OperateRuleResult": {
"OperateRuleItemList": [
{
"ConfigRuleId": "cr-2da35180a8d1008e****",
"ErrorCode": "ConfigRuleStatusNotInActive",
"Success": false
},
{
"ConfigRuleId": "cr-2da351800131233a****",
"ErrorCode": "",
"Success": true
}
],
"RequestId": "49C1A88F-D163-46DF-84A6-F300229F37AE"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | AccountNotExisted | Your account does not exist. | The error message returned because your account does not exist. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The error message returned because the service is unavailable. |
400 | NoPermission | You are not authorized to perform this operation. | The error message returned because you are not authorized to perform the specified operation. |
400 | Invalid.ConfigRuleIds.SizeExceed | The maximum number of ConfigRuleIds cannot exceed 20. | The error message returned because you cannot enable more than 20 rules at a time. |
400 | ConfigRuleStatusNotInActive | The status of the config rule is not inactive. | The error message returned because the specified rule is not in the Inactive state. |
For a list of error codes, visit the API Error Center.