All Products
Search
Document Center

Cloud Config:ActiveConfigRules

Last Updated:Jan 06, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
config:ActiveConfigRulesupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigRuleIdsstringNo

The rule ID. Separate multiple rule IDs with commas (,).

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

The ID of the compliance package.

cp-fe416457e0d90022****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The returned results.

OperateRuleItemListarray<object>

The returned results.

OperateRuleItemobject
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