All Products
Search
Document Center

Cloud Config:DeactiveConfigRules

Last Updated:Jul 02, 2024

Disables a rule. After a rule is disabled, the resource in the rule is no longer evaluated. The compliance evaluation results before the rule is disabled are still displayed.

Operation description

Prerequisites

The status of the rule is ACTIVE.

Description

This topic provides an example on how to disable the cr-19a56457e0d90058**** rule.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigRuleIdsstringYes

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 .

cr-19a56457e0d90058****

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

54FA74D9-45D4-4CA5-9BE1-97F6EA19AF5B
OperateRuleResultobject

The results of the operations that are performed to disable the specified rules.

OperateRuleItemListarray<object>

The operations that are performed to disable the rule.

object
ErrorCodestring

The error code.

  • If the rule is disabled, no error code is returned.
  • If the rule fails to be disabled, an error code is returned. For more information about error codes, see Error codes.
ConfigRuleCanNotDelete
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
false
ConfigRuleIdstring

The rule ID.

cr-19a56457e0d90058****

Examples

Sample success responses

JSONformat

{
  "RequestId": "54FA74D9-45D4-4CA5-9BE1-97F6EA19AF5B",
  "OperateRuleResult": {
    "OperateRuleItemList": [
      {
        "ErrorCode": "ConfigRuleCanNotDelete",
        "Success": false,
        "ConfigRuleId": "cr-19a56457e0d90058****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
400Invalid.ConfigRuleIds.SizeExceedThe maximum number of ConfigRuleIds cannot exceed 20.The maximum number of ConfigRuleIds cannot exceed 20.
400ConfigRuleStatusNotActiveThe status of the config rule is not active.The status of the config rule is not active.
404AccountNotExistedYour account does not exist.The specified account does not exist.
503ServiceUnavailableThe request has failed due to a temporary failure of the server.The request has failed due to a temporary failure of the server.

For a list of error codes, visit the Service error codes.