Package com.google.cloud.orgpolicy.v2
Interface PolicySpec.PolicyRuleOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
PolicySpec.PolicyRule,PolicySpec.PolicyRule.Builder
- Enclosing class:
- PolicySpec
public static interface PolicySpec.PolicyRuleOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanSetting this to true means that all values are allowed.A condition which determines whether this rule is used in the evaluation of the policy.A condition which determines whether this rule is used in the evaluation of the policy.booleanSetting this to true means that all values are denied.booleanIf `true`, then the policy is enforced.com.google.protobuf.StructOptional.com.google.protobuf.StructOrBuilderOptional.List of values to be used for this policy rule.List of values to be used for this policy rule.booleanSetting this to true means that all values are allowed.booleanA condition which determines whether this rule is used in the evaluation of the policy.booleanSetting this to true means that all values are denied.booleanIf `true`, then the policy is enforced.booleanOptional.booleanList of values to be used for this policy rule.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasValues
boolean hasValues()List of values to be used for this policy rule. This field can be set only in policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;- Returns:
- Whether the values field is set.
-
getValues
PolicySpec.PolicyRule.StringValues getValues()List of values to be used for this policy rule. This field can be set only in policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;- Returns:
- The values.
-
getValuesOrBuilder
PolicySpec.PolicyRule.StringValuesOrBuilder getValuesOrBuilder()List of values to be used for this policy rule. This field can be set only in policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1; -
hasAllowAll
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:
- Whether the allowAll field is set.
-
getAllowAll
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:
- The allowAll.
-
hasDenyAll
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:
- Whether the denyAll field is set.
-
getDenyAll
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:
- The denyAll.
-
hasEnforce
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:
- Whether the enforce field is set.
-
getEnforce
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:
- The enforce.
-
hasCondition
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:
- Whether the condition field is set.
-
getCondition
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:
- The condition.
-
getConditionOrBuilder
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; -
hasParameters
boolean hasParameters()Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true }.google.protobuf.Struct parameters = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the parameters field is set.
-
getParameters
com.google.protobuf.Struct getParameters()Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true }.google.protobuf.Struct parameters = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The parameters.
-
getParametersOrBuilder
com.google.protobuf.StructOrBuilder getParametersOrBuilder()Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true }.google.protobuf.Struct parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getKindCase
PolicySpec.PolicyRule.KindCase getKindCase()
-