Class PolicySpec.Types.PolicyRule (1.2.0)

public sealed class PolicyRule : IMessage<PolicySpec.Types.PolicyRule>, IEquatable<PolicySpec.Types.PolicyRule>, IDeepCloneable<PolicySpec.Types.PolicyRule>, IBufferMessage, IMessage

A rule used to express this policy.

Inheritance

Object > PolicySpec.Types.PolicyRule

Namespace

Google.Cloud.OrgPolicy.V2

Assembly

Google.Cloud.OrgPolicy.V2.dll

Constructors

PolicyRule()

public PolicyRule()

PolicyRule(PolicySpec.Types.PolicyRule)

public PolicyRule(PolicySpec.Types.PolicyRule other)
Parameter
NameDescription
otherPolicySpec.Types.PolicyRule

Properties

AllowAll

public bool AllowAll { get; set; }

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

Property Value
TypeDescription
Boolean

Condition

public Expr Condition { get; set; }

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')".

Property Value
TypeDescription
Expr

DenyAll

public bool DenyAll { get; set; }

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

Property Value
TypeDescription
Boolean

Enforce

public bool Enforce { get; set; }

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.

Property Value
TypeDescription
Boolean

KindCase

public PolicySpec.Types.PolicyRule.KindOneofCase KindCase { get; }
Property Value
TypeDescription
PolicySpec.Types.PolicyRule.KindOneofCase

Values

public PolicySpec.Types.PolicyRule.Types.StringValues Values { get; set; }

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

Property Value
TypeDescription
PolicySpec.Types.PolicyRule.Types.StringValues