Interface PolicySpec.PolicyRuleOrBuilder (2.32.0)

public static interface PolicySpec.PolicyRuleOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAllowAll()

public abstract boolean getAllowAll()

Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.

bool allow_all = 2;

Returns
TypeDescription
boolean

The allowAll.

getCondition()

public abstract Expr getCondition()

A condition which determines whether this rule is used in the evaluation of the policy. When set, the expression field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('<ORG_ID>/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".

.google.type.Expr condition = 5;

Returns
TypeDescription
com.google.type.Expr

The condition.

getConditionOrBuilder()

public abstract ExprOrBuilder getConditionOrBuilder()

A condition which determines whether this rule is used in the evaluation of the policy. When set, the expression field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('<ORG_ID>/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".

.google.type.Expr condition = 5;

Returns
TypeDescription
com.google.type.ExprOrBuilder

getDenyAll()

public abstract boolean getDenyAll()

Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.

bool deny_all = 3;

Returns
TypeDescription
boolean

The denyAll.

getEnforce()

public abstract boolean getEnforce()

If true, then the Policy is enforced. If false, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.

bool enforce = 4;

Returns
TypeDescription
boolean

The enforce.

getKindCase()

public abstract PolicySpec.PolicyRule.KindCase getKindCase()
Returns
TypeDescription
PolicySpec.PolicyRule.KindCase

getValues()

public abstract PolicySpec.PolicyRule.StringValues getValues()

List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.

.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;

Returns
TypeDescription
PolicySpec.PolicyRule.StringValues

The values.

getValuesOrBuilder()

public abstract PolicySpec.PolicyRule.StringValuesOrBuilder getValuesOrBuilder()

List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.

.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;

Returns
TypeDescription
PolicySpec.PolicyRule.StringValuesOrBuilder

hasAllowAll()

public abstract boolean hasAllowAll()

Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.

bool allow_all = 2;

Returns
TypeDescription
boolean

Whether the allowAll field is set.

hasCondition()

public abstract boolean hasCondition()

A condition which determines whether this rule is used in the evaluation of the policy. When set, the expression field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('<ORG_ID>/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".

.google.type.Expr condition = 5;

Returns
TypeDescription
boolean

Whether the condition field is set.

hasDenyAll()

public abstract boolean hasDenyAll()

Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.

bool deny_all = 3;

Returns
TypeDescription
boolean

Whether the denyAll field is set.

hasEnforce()

public abstract boolean hasEnforce()

If true, then the Policy is enforced. If false, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.

bool enforce = 4;

Returns
TypeDescription
boolean

Whether the enforce field is set.

hasValues()

public abstract boolean hasValues()

List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.

.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;

Returns
TypeDescription
boolean

Whether the values field is set.