Rule

A rule in the cloud control.

JSON representation
 { 
 "description" 
 : 
 string 
 , 
 "ruleActionTypes" 
 : 
 [ 
 enum (  RuleActionType 
 
) 
 ] 
 , 
 // Union field implementation 
can be only one of the following: 
 "celExpression" 
 : 
 { 
 object (  CELExpression 
 
) 
 } 
 // End of list of possible types for union field implementation 
. 
 } 
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.

Union field implementation . The rule implementation. implementation can be only one of the following:
celExpression

object ( CELExpression )

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

CELExpression

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

JSON representation
 { 
 "expression" 
 : 
 string 
 , 
 // Union field criteria 
can be only one of the following: 
 "resourceTypesValues" 
 : 
 { 
 object (  StringList 
 
) 
 } 
 // End of list of possible types for union field criteria 
. 
 } 
Fields
expression

string

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

Union field criteria . The criteria of the CEL expression. criteria can be only one of the following:
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

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.
Design a Mobile Site
View Site in Mobile | Classic
Share by: