Rule

A rule in the cloud control.

JSON representation
{
  "description": string,
  "ruleActionTypes": [
    enum (RuleActionType)
  ],

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "celExpression": {
    object (CELExpression)
  }
  // End of mutually exclusive fields.
}
Fields
description

string

Optional. The rule description. The maximum length is 2000 characters.

ruleActionTypes[]

enum (RuleActionType)

Required. The functionality that's enabled by the rule.

The rule implementation. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
celExpression

object (CELExpression)

The rule's logic expression in Common Expression Language (CEL).

End of mutually exclusive fields.

CELExpression

A Common Expression Language (CEL) expression that's used to create a rule.

JSON representation
{
  "expression": string,
  "expressionDescription": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "resourceTypesValues": {
    object (StringList)
  }
  // End of mutually exclusive fields.
}
Fields
expression

string

Required. The logical expression in CEL. The maximum length of the condition is 1000 characters. For more information, see CEL expression.

expressionDescription

string

Optional. A human-readable description or plain-language explanation of what this expression evaluates. The maximum length of this field is 1000 characters.

The criteria of the CEL expression. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
resourceTypesValues

object (StringList)

The resource instance types on which this expression is defined. The format is <SERVICE_NAME>/<type>. For example: compute.googleapis.com/Instance

End of mutually exclusive fields.

RuleActionType

The action type of the rule.

Enums
RULE_ACTION_TYPE_UNSPECIFIED Default value. This value is unused.
RULE_ACTION_TYPE_PREVENTIVE The rule is intended to prevent non-compliance.
RULE_ACTION_TYPE_DETECTIVE The rule is intended to detect non-compliance.
RULE_ACTION_TYPE_AUDIT The rule is intended to audit non-compliance.