pub struct GoogleCloudOrgpolicyV2PolicySpecPolicyRule {
pub allow_all: Option<bool>,
pub condition: Option<GoogleTypeExpr>,
pub deny_all: Option<bool>,
pub enforce: Option<bool>,
pub parameters: Option<HashMap<String, Value>>,
pub values: Option<GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues>,
}Expand description
A rule used to express this policy.
This type is not used in any activity, and only used as part of another schema.
Fields§
§allow_all: Option<bool>Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
condition: Option<GoogleTypeExpr>A condition that determines whether this rule is used to evaluate the policy. When set, the google.type.Expr.expression field must contain 1 to 10 subexpressions, joined by the || or && operators. Each subexpression must use the resource.matchTag(), resource.matchTagId(), resource.hasTagKey(), or resource.hasTagKeyId() Common Expression Language (CEL) function. The resource.matchTag() function takes the following arguments: * key_name: the namespaced name of the tag key, with the organization ID and a slash (/) as a prefix; for example, 123456789012/environment * value_name: the short name of the tag value For example: resource.matchTag('123456789012/environment, 'prod') The resource.matchTagId() function takes the following arguments: * key_id: the permanent ID of the tag key; for example, tagKeys/123456789012 * value_id: the permanent ID of the tag value; for example, tagValues/567890123456 For example: resource.matchTagId('tagKeys/123456789012', 'tagValues/567890123456') The resource.hasTagKey() function takes the following argument: * key_name: the namespaced name of the tag key, with the organization ID and a slash (/) as a prefix; for example, 123456789012/environment For example: resource.hasTagKey('123456789012/environment') The resource.hasTagKeyId() function takes the following arguments: * key_id: the permanent ID of the tag key; for example, tagKeys/123456789012 For example: resource.hasTagKeyId('tagKeys/123456789012')
deny_all: Option<bool>Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
enforce: Option<bool>If true, then the policy is enforced. If false, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
parameters: Option<HashMap<String, Value>>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 }
values: Option<GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues>List of values to be used for this policy rule. This field can be set only in policies for list constraints.
Trait Implementations§
Source§impl Clone for GoogleCloudOrgpolicyV2PolicySpecPolicyRule
impl Clone for GoogleCloudOrgpolicyV2PolicySpecPolicyRule
Source§fn clone(&self) -> GoogleCloudOrgpolicyV2PolicySpecPolicyRule
fn clone(&self) -> GoogleCloudOrgpolicyV2PolicySpecPolicyRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more