Send feedback
Class PolicySpec.PolicyRule (2.21.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.21.0 keyboard_arrow_down
public static final class PolicySpec . PolicyRule extends GeneratedMessageV3 implements PolicySpec . PolicyRuleOrBuilder
A rule used to express this policy.
Protobuf type google.cloud.orgpolicy.v2.PolicySpec.PolicyRule
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
ALLOW_ALL_FIELD_NUMBER
public static final int ALLOW_ALL_FIELD_NUMBER
Field Value Type Description int
CONDITION_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER
Field Value Type Description int
DENY_ALL_FIELD_NUMBER
public static final int DENY_ALL_FIELD_NUMBER
Field Value Type Description int
ENFORCE_FIELD_NUMBER
public static final int ENFORCE_FIELD_NUMBER
Field Value Type Description int
VALUES_FIELD_NUMBER
public static final int VALUES_FIELD_NUMBER
Field Value Type Description int
Static Methods
getDefaultInstance()
public static PolicySpec . PolicyRule getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static PolicySpec . PolicyRule . Builder newBuilder ()
newBuilder(PolicySpec.PolicyRule prototype)
public static PolicySpec . PolicyRule . Builder newBuilder ( PolicySpec . PolicyRule prototype )
public static PolicySpec . PolicyRule parseDelimitedFrom ( InputStream input )
public static PolicySpec . PolicyRule parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static PolicySpec . PolicyRule parseFrom ( byte [] data )
Parameter Name Description data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PolicySpec . PolicyRule parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static PolicySpec . PolicyRule parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PolicySpec . PolicyRule parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static PolicySpec . PolicyRule parseFrom ( CodedInputStream input )
public static PolicySpec . PolicyRule parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static PolicySpec . PolicyRule parseFrom ( InputStream input )
public static PolicySpec . PolicyRule parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static PolicySpec . PolicyRule parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PolicySpec . PolicyRule parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<PolicySpec . PolicyRule> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter Name Description obj
Object
Overrides
getAllowAll()
public 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 Type Description boolean
The allowAll.
getCondition()
public 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 Type Description com.google.type.Expr
The condition.
getConditionOrBuilder()
public 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 Type Description com.google.type.ExprOrBuilder
getDefaultInstanceForType()
public PolicySpec . PolicyRule getDefaultInstanceForType ()
getDenyAll()
public 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 Type Description boolean
The denyAll.
getEnforce()
public 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 Type Description boolean
The enforce.
getKindCase()
public PolicySpec . PolicyRule . KindCase getKindCase ()
getParserForType()
public Parser<PolicySpec . PolicyRule> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns Type Description int
Overrides
getValues()
public 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;
getValuesOrBuilder()
public 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;
hasAllowAll()
public 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 Type Description boolean
Whether the allowAll field is set.
hasCondition()
public 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 Type Description boolean
Whether the condition field is set.
hasDenyAll()
public 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 Type Description boolean
Whether the denyAll field is set.
hasEnforce()
public 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 Type Description boolean
Whether the enforce field is set.
hasValues()
public 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 Type Description boolean
Whether the values field is set.
hashCode()
Returns Type Description int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public PolicySpec . PolicyRule . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected PolicySpec . PolicyRule . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Overrides
toBuilder()
public PolicySpec . PolicyRule . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-01 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-01 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-01 UTC."]]