Disables one or more rules.
In this example, the cr-19a56457e0d90058****
rule is used.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeactiveConfigRules |
The operation that you want to perform. Set the value to DeactiveConfigRules. |
ConfigRuleIds | String | Yes | cr-19a56457e0d90058**** |
The ID of the rule. Separate multiple rule IDs with commas (,). For more information about how to obtain the ID of a rule, see ListConfigRules. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 54FA74D9-45D4-4CA5-9BE1-97F6EA19AF5B |
The ID of the request. |
OperateRuleResult | Object |
The results of the operations to disable the specified rules. |
|
OperateRuleItemList | Array of OperateRuleItem |
The result of the operation to disable the rule. |
|
ErrorCode | String | ConfigRuleCanNotDelete |
The error code.
|
Success | Boolean | false |
Indicates whether the operation is successful. Valid values:
|
ConfigRuleId | String | cr-19a56457e0d90058**** |
The ID of the rule. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeactiveConfigRules
&ConfigRuleIds=cr-19a56457e0d90058****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeactiveConfigRulesResponse>
<RequestId>54FA74D9-45D4-4CA5-9BE1-97F6EA19AF5B</RequestId>
<OperateRuleResult>
<OperateRuleItemList>
<ConfigRuleId>cr-19a56457e0d90058****</ConfigRuleId>
<ErrorCode></ErrorCode>
<Success>true</Success>
</OperateRuleItemList>
</OperateRuleResult>
</DeactiveConfigRulesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54FA74D9-45D4-4CA5-9BE1-97F6EA19AF5B",
"OperateRuleResult" : {
"OperateRuleItemList" : [ {
"ConfigRuleId" : "cr-19a56457e0d90058****",
"ErrorCode" : "",
"Success" : true
} ]
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
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 the number of specified rule IDs exceeds 20. |
400 | ConfigRuleStatusNotActive | The status of the config rule is not active. | The error message returned because the specified rule is not in the Active state. |
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. |
For a list of error codes, visit the API Error Center.