All Products
Search
Document Center

Cloud Config:ActiveConfigRules

Last Updated:Jul 02, 2024

Enables a rule in Cloud Config. After a rule is enabled, Cloud Config automatically evaluates the compliance of a resource based on the trigger mechanism of the rule.

Operation description

Prerequisites

The rule is in the INACTIVE state.

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 rule ID. Separate multiple rule IDs with commas (,).

cr-2da35180a8d1008e****,cr-2da35180a8d1008e****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

61C1A88F-D163-40DF-84A6-F200229F37B2
OperateRuleResultobject

The returned results.

OperateRuleItemListarray<object>

The returned results.

object
ErrorCodestring

The error code.

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

Indicates whether the rule is enabled. Valid values:

  • true
  • false
true
ConfigRuleIdstring

The rule ID.

cr-2da35180a8d1008e****

Examples

Sample success responses

JSONformat

{
  "RequestId": "61C1A88F-D163-40DF-84A6-F200229F37B2",
  "OperateRuleResult": {
    "OperateRuleItemList": [
      {
        "ErrorCode": "ConfigRuleStatusNotInActive",
        "Success": true,
        "ConfigRuleId": "cr-2da35180a8d1008e****"
      }
    ]
  }
}

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.
400ConfigRuleStatusNotInActiveThe status of the config rule is not inactive.The status of the config rule is not inactive.
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.

Change history

Change timeSummary of changesOperation
No change history