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.
Implements
IMessage<PolicySpec.Types.PolicyRule>, IEquatable<PolicySpec.Types.PolicyRule>, IDeepCloneable<PolicySpec.Types.PolicyRule>, IBufferMessage, IMessageNamespace
Google.Cloud.OrgPolicy.V2Assembly
Google.Cloud.OrgPolicy.V2.dll
Constructors
PolicyRule()
public PolicyRule()
PolicyRule(PolicySpec.Types.PolicyRule)
public PolicyRule(PolicySpec.Types.PolicyRule other)
Parameter | |
---|---|
Name | Description |
other | PolicySpec.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 | |
---|---|
Type | Description |
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.matchLabels(key_name, value_name)",
where key_name and value_name are the resource names for Label Keys
and Values. These names are available from the Label Manager Service. An
example expression is:
"resource.matchLabels('labelKeys/123, 'labelValues/456')".
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Boolean |
KindCase
public PolicySpec.Types.PolicyRule.KindOneofCase KindCase { get; }
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
PolicySpec.Types.PolicyRule.Types.StringValues |