All Products
Search
Document Center

Cloud Config:DescribeConfigRule

Last Updated:Jul 02, 2025

Queries the details of a rule.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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:DescribeConfigRuleget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigRuleIdstringYes

The ID of the rule. You can call the ListConfigRules operation to obtain the rule ID.

cr-7bc06457e0d90041****
MultiAccountbooleanNo

This parameter is unavailable since 00:00:00 on June 30, 2021. Account group-related operations are provided as an alternative after 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to account group-related operations after 00:00:00 on May 30, 2021. For information about account groups, see Overview .

false
MemberIdlongNo

This parameter is unavailable since 00:00:00 on June 30, 2021. Account group-related operations are provided as an alternative after 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to account group-related operations after 00:00:00 on May 30, 2021. For information about account groups, see Overview .

123456789

Response parameters

ParameterTypeDescriptionExample
object
ConfigRuleobject

The details of the rule.

ConfigRuleArnstring

The Alibaba Cloud Resource Name (ARN) of the rule.

acs:config::120886317861****:rule/cr-7bc06457e0d90041****
ConfigRuleEvaluationStatusobject

The information about compliance evaluations performed by the rule.

FirstActivatedTimestamplong

The timestamp when the rule was first triggered.

1618901952341
FirstEvaluationStartedboolean

Indicates whether resources were evaluated based on the rule. Valid values:

  • true
  • false
true
LastErrorCodestring

The error code returned for the last failed compliance evaluation.

FunctionNotFound
LastErrorMessagestring

The error message returned for the last failed compliance evaluation.

function 'funtionName' does not exist in service 'serviceName'
LastFailedEvaluationTimestamplong

The timestamp when the last failed compliance evaluation of the rule ended.

1602819143913
LastFailedInvocationTimestamplong

The timestamp when the last failed compliance evaluation of the rule started.

1602819143910
LastSuccessfulEvaluationTimestamplong

The timestamp when the last successful compliance evaluation of the rule ended.

1618901957876
LastSuccessfulInvocationTimestamplong

The timestamp when the last successful compliance evaluation of the rule started.

1618901957395
ConfigRuleIdstring

The ID of the rule.

cr-7bc06457e0d90041****
ConfigRuleNamestring

The name of the evaluation rule.

governance-guardrail-rds-public-access-check
ConfigRuleStatestring

The status of the rule. Valid values:

  • ACTIVE: The rule is enabled.
  • EVALUATING: The rule was triggered and is being used to monitor resource configurations.
  • INACTIVE: The rule was disabled.
ACTIVE
CreateTimestamplong

The timestamp when the rule was created.

1602818964884
Descriptionstring

The description of the system defense rule.

The number of CPU cores of the RDS instance is greater than or equal to the set threshold, which is considered as compliance.
InputParametersobject

The input parameters of the rule.

{"cpuCount": "2" }
ManagedRuleobject

The details of the managed rule.

CompulsoryInputParameterDetailsobject

The settings of the required input parameters for the managed rule.

{"cpuCount": {"defaultValue": "2","type": "integer"}
Descriptionstring

The description of the managed rule.

The number of CPU cores of the RDS instance is greater than or equal to the set threshold, which is considered as compliance.
Identifierstring

The identifier of the managed rule.

rds-cpu-min-count-limit
Labelsarray

The labels.

Labelsstring

The tags of the managed rule.

["RDS","CPU"]
ManagedRuleNamestring

The name of the managed rule.

rds-cpu-min-count-limit
OptionalInputParameterDetailsobject

The settings of the optional input parameters for the managed rule.

{"tag1Value":{"type":"string","defaultValue":""},"tag2Key":{"type":"string","defaultValue":""}}
SourceDetailsarray<object>

The intervals at which the rule is triggered. Valid values:

  • One_Hour: 1 hour
  • Three_Hours: 3 hours
  • Six_Hours: 6 hours
  • Twelve_Hours: 12 hours.
  • TwentyFour_Hours: 24 hours.
SourceDetailsobject
EventSourcestring

The event source of the managed rule.

Note Only events related to Cloud Config are supported. The value is fixed to aliyun.config.
aliyun.config
MaximumExecutionFrequencystring

The intervals at which the managed rule is triggered. Valid values:

  • One_Hour: 1 hour.
  • Three_Hours: 3 hours.
  • Six_Hours: 6 hours.
  • Twelve_Hours: 12 hours.
  • TwentyFour_Hours: 24 hours.
Six_Hours
MessageTypestring

The trigger type of the managed rule. Valid values:

  • ConfigurationItemChangeNotification: The managed rule is triggered by configuration changes.
  • ScheduledNotification: The managed rule is triggered as scheduled.
ConfigurationItemChangeNotification
MaximumExecutionFrequencystring

The intervals at which the rule is triggered. Valid values:

  • One_Hour: 1 hour
  • Three_Hours: 3 hours
  • Six_Hours: 6 hours
  • Twelve_Hours: 12 hours.
  • TwentyFour_Hours: 24 hours.
Six_Hours
ModifiedTimestamplong

The timestamp when the rule was last modified.

1602992721000
RiskLevelinteger

The risk level of the resources that are not compliant with the rule. Valid values:

  • 1: high
  • 2: medium
  • 3: low
3
Scopeobject

The monitoring scope of the rule.

ComplianceResourceIdstring

The ID of the resource to be evaluated.

vpc-6weoy5flv41pj4wvr****
ComplianceResourceTypesarray

The types of the resources to be evaluated.

ComplianceResourceTypesstring

The type of the resource to be evaluated against the rule.

["ACS::RDS::DBInstance"]
Sourceobject

The information about the trigger of the rule.

Identifierstring

The identifier of the rule.

  • If the rule was created based on a managed rule, the value of this parameter is the name of the managed rule.
  • If the rule is a custom rule, the value of this parameter is the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
rds-cpu-min-count-limit
Ownerstring

The way in which the rule was created. Valid values:

  • CUSTOM_FC: The rule is a custom rule.
  • ALIYUN: The rule was created based on a managed rule of Alibaba Cloud.
ALIYUN
SourceConditionsarray<object>

The name of the input parameter for the rule.

SourceConditionsobject
DesiredValuestring

The expected value of the input parameter.

2
Namestring

The name of the input parameter for the rule.

cpuCount
Operatorstring

The operator used to compare the actual value against the expected value of the input parameter. The operator varies based on the type of data returned for the SelectPath parameter.

  • Valid values for the String data type:

    • StringEquals: The actual value is equal to the expected value.
    • NotStringEquals: The actual value is not equal to the expected value.
    • StringIn: The actual value exists in the expected value.
    • NotStringIn: The actual value does not exist in the expected value.
    • StringContains: The actual value contains the expected value.
    • NotStringContains: The actual value does not contain the expected value.
  • Valid values for the Number data type:

    • Equals: The actual value is equal to the expected value.
    • NotEquals: The actual value is not equal to the expected value.
    • Less: The actual value is less than the expected value.
    • LessOrEquals: The actual value is less than or equal to the expected value.
    • Greater: The actual value is greater than the expected value.
    • GreaterOrEquals: The actual value is greater than or equal to the expected value.
  • Valid values for the Base64String data type that indicates a Base64-encoded string:

    • Base64Contains: The actual value contains the expected value.
    • NotBase64Contains: The actual value does not contain the expected value.
    • Base64ContainsAll: The actual value contains all characters in the expected value.
    • Base64ExcludeAll: The actual value excludes all characters in the expected value.
  • Valid values for the Array data type:

    • Contains: The actual value contains the expected value.
    • NotContains: The actual value does not contain the expected value.
    • In: The actual value exists in the expected value.
    • NotIn: The actual value does not exist in the expected value.
    • ContainsAll: The actual value contains all elements of the expected value.
    • ExcludeAll: The actual value excludes all elements of the expected value.
    • IsEmpty: The actual value is null.
GreaterOrEquals
Tipsstring

The description of the input parameter.

You are not logged in or your login token has expired.
SourceDetailsarray<object>

The intervals at which the rule is triggered. Valid values:

  • One_Hour: 1 hour
  • Three_Hours: 3 hours
  • Six_Hours: 6 hours
  • Twelve_Hours: 12 hours.
  • TwentyFour_Hours: 24 hours.
SourceDetailsobject
EventSourcestring

The event source of the rule.

Note Only events related to Cloud Config are supported. The value is fixed to aliyun.config.
aliyun.config
MaximumExecutionFrequencystring

The intervals at which the rule is triggered. Valid values:

  • One_Hour: 1 hour.
  • Three_Hours: 3 hours.
  • Six_Hours: 6 hours.
  • Twelve_Hours: 12 hours.
  • TwentyFour_Hours: 24 hours.
Six_Hours
MessageTypestring

The trigger type of the rule. Valid values:

  • ConfigurationItemChangeNotification: The rule is triggered by configuration changes.
  • ScheduledNotification: The rule is triggered as scheduled.
ConfigurationItemChangeNotification
RequestIdstring

The request ID.

A68DD98C-DE65-46AC-B2D2-04A4A9AB5B99

Examples

Sample success responses

JSONformat

{
  "ConfigRule": {
    "ConfigRuleArn": "acs:config::120886317861****:rule/cr-7bc06457e0d90041****",
    "ConfigRuleEvaluationStatus": {
      "FirstActivatedTimestamp": 1618901952341,
      "FirstEvaluationStarted": true,
      "LastErrorCode": "FunctionNotFound",
      "LastErrorMessage": "function 'funtionName' does not exist in service 'serviceName'",
      "LastFailedEvaluationTimestamp": 1602819143913,
      "LastFailedInvocationTimestamp": 1602819143910,
      "LastSuccessfulEvaluationTimestamp": 1618901957876,
      "LastSuccessfulInvocationTimestamp": 1618901957395
    },
    "ConfigRuleId": "cr-7bc06457e0d90041****",
    "ConfigRuleName": "governance-guardrail-rds-public-access-check",
    "ConfigRuleState": "ACTIVE",
    "CreateTimestamp": 1602818964884,
    "Description": "The number of CPU cores of the RDS instance is greater than or equal to the set threshold, which is considered as compliance.",
    "InputParameters": {
      "cpuCount": 2
    },
    "ManagedRule": {
      "CompulsoryInputParameterDetails": {
        "test": "test",
        "test2": 1
      },
      "Description": "The number of CPU cores of the RDS instance is greater than or equal to the set threshold, which is considered as compliance.",
      "Identifier": "rds-cpu-min-count-limit",
      "Labels": [
        [
          "RDS",
          "CPU"
        ]
      ],
      "ManagedRuleName": "rds-cpu-min-count-limit",
      "OptionalInputParameterDetails": {
        "tag1Value": {
          "type": "string",
          "defaultValue": ""
        },
        "tag2Key": {
          "type": "string",
          "defaultValue": ""
        }
      },
      "SourceDetails": [
        {
          "EventSource": "aliyun.config",
          "MaximumExecutionFrequency": "Six_Hours",
          "MessageType": "ConfigurationItemChangeNotification"
        }
      ]
    },
    "MaximumExecutionFrequency": "Six_Hours",
    "ModifiedTimestamp": 1602992721000,
    "RiskLevel": 3,
    "Scope": {
      "ComplianceResourceId": "vpc-6weoy5flv41pj4wvr****",
      "ComplianceResourceTypes": [
        [
          "ACS::RDS::DBInstance"
        ]
      ]
    },
    "Source": {
      "Identifier": "rds-cpu-min-count-limit",
      "Owner": "ALIYUN",
      "SourceConditions": [
        {
          "DesiredValue": 2,
          "Name": "cpuCount",
          "Operator": "GreaterOrEquals",
          "Tips": "You are not logged in or your login token has expired."
        }
      ],
      "SourceDetails": [
        {
          "EventSource": "aliyun.config",
          "MaximumExecutionFrequency": "Six_Hours",
          "MessageType": "ConfigurationItemChangeNotification"
        }
      ]
    }
  },
  "RequestId": "A68DD98C-DE65-46AC-B2D2-04A4A9AB5B99"
}

Error codes

HTTP status codeError codeError messageDescription
400ConfigRuleNotExistsThe ConfigRule does not exist.The rule does not exist.
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
404AccountNotExistedYour 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.