#[non_exhaustive]pub struct SecurityPolicyRuleMatcher {
pub config: Option<SecurityPolicyRuleMatcherConfig>,
pub expr: Option<Expr>,
pub expr_options: Option<SecurityPolicyRuleMatcherExprOptions>,
pub versioned_expr: Option<VersionedExpr>,
/* private fields */
}organization-security-policies or region-security-policies or security-policies only.Expand description
Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.config: Option<SecurityPolicyRuleMatcherConfig>The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
expr: Option<Expr>User defined CEVAL expression.
A CEVAL expression is used to specify match criteria such as origin.ip,
source.region_code and contents in the request header.
Expressions containing evaluateThreatIntelligence require a Cloud
Armor Enterprise subscription and are not supported in Edge Policies
nor in Regional Policies. Expressions containing
evaluatePreconfiguredExpr('sourceiplist-*') require a Cloud Armor
Enterprise subscription and are only supported in Global Security
Policies.
expr_options: Option<SecurityPolicyRuleMatcherExprOptions>The configuration options available when specifying a user defined CEVAL expression (i.e., ‘expr’).
versioned_expr: Option<VersionedExpr>Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
Implementations§
Source§impl SecurityPolicyRuleMatcher
impl SecurityPolicyRuleMatcher
pub fn new() -> Self
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
Sourcepub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
pub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
Sets or clears the value of config.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleMatcherConfig;
let x = SecurityPolicyRuleMatcher::new().set_or_clear_config(Some(SecurityPolicyRuleMatcherConfig::default()/* use setters */));
let x = SecurityPolicyRuleMatcher::new().set_or_clear_config(None::<SecurityPolicyRuleMatcherConfig>);Sourcepub fn set_or_clear_expr<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expr<T>(self, v: Option<T>) -> Self
Sourcepub fn set_expr_options<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
pub fn set_expr_options<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
Sets the value of expr_options.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleMatcherExprOptions;
let x = SecurityPolicyRuleMatcher::new().set_expr_options(SecurityPolicyRuleMatcherExprOptions::default()/* use setters */);Sourcepub fn set_or_clear_expr_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
pub fn set_or_clear_expr_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
Sets or clears the value of expr_options.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleMatcherExprOptions;
let x = SecurityPolicyRuleMatcher::new().set_or_clear_expr_options(Some(SecurityPolicyRuleMatcherExprOptions::default()/* use setters */));
let x = SecurityPolicyRuleMatcher::new().set_or_clear_expr_options(None::<SecurityPolicyRuleMatcherExprOptions>);Sourcepub fn set_versioned_expr<T>(self, v: T) -> Selfwhere
T: Into<VersionedExpr>,
pub fn set_versioned_expr<T>(self, v: T) -> Selfwhere
T: Into<VersionedExpr>,
Sets the value of versioned_expr.
§Example
use google_cloud_compute_v1::model::security_policy_rule_matcher::VersionedExpr;
let x0 = SecurityPolicyRuleMatcher::new().set_versioned_expr(VersionedExpr::SrcIpsV1);Sourcepub fn set_or_clear_versioned_expr<T>(self, v: Option<T>) -> Selfwhere
T: Into<VersionedExpr>,
pub fn set_or_clear_versioned_expr<T>(self, v: Option<T>) -> Selfwhere
T: Into<VersionedExpr>,
Sets or clears the value of versioned_expr.
§Example
use google_cloud_compute_v1::model::security_policy_rule_matcher::VersionedExpr;
let x0 = SecurityPolicyRuleMatcher::new().set_or_clear_versioned_expr(Some(VersionedExpr::SrcIpsV1));
let x_none = SecurityPolicyRuleMatcher::new().set_or_clear_versioned_expr(None::<VersionedExpr>);Trait Implementations§
Source§impl Clone for SecurityPolicyRuleMatcher
impl Clone for SecurityPolicyRuleMatcher
Source§fn clone(&self) -> SecurityPolicyRuleMatcher
fn clone(&self) -> SecurityPolicyRuleMatcher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more