Skip to main content

FirewallPolicyRuleMatcher

Struct FirewallPolicyRuleMatcher 

Source
#[non_exhaustive]
pub struct FirewallPolicyRuleMatcher {
Show 17 fields pub dest_address_groups: Vec<String>, pub dest_fqdns: Vec<String>, pub dest_ip_ranges: Vec<String>, pub dest_network_context: Option<DestNetworkContext>, pub dest_network_type: Option<DestNetworkType>, pub dest_region_codes: Vec<String>, pub dest_threat_intelligences: Vec<String>, pub layer_4_configs: Vec<FirewallPolicyRuleMatcherLayer4Config>, pub src_address_groups: Vec<String>, pub src_fqdns: Vec<String>, pub src_ip_ranges: Vec<String>, pub src_network_context: Option<SrcNetworkContext>, pub src_network_type: Option<SrcNetworkType>, pub src_networks: Vec<String>, pub src_region_codes: Vec<String>, pub src_secure_tags: Vec<FirewallPolicyRuleSecureTag>, pub src_threat_intelligences: Vec<String>, /* private fields */
}
Available on crate features firewall-policies or instances or network-firewall-policies or networks or region-network-firewall-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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§dest_address_groups: Vec<String>

Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.

§dest_fqdns: Vec<String>

Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.

§dest_ip_ranges: Vec<String>

CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.

§dest_network_context: Option<DestNetworkContext>

Network context of the traffic destination. Allowed values are:

 - UNSPECIFIED
 - INTERNET
 - NON_INTERNET
§dest_network_type: Option<DestNetworkType>

Network type of the traffic destination. Allowed values are:

 - UNSPECIFIED
 - INTERNET
 - NON_INTERNET
§dest_region_codes: Vec<String>

Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex.“US” Maximum number of dest region codes allowed is 5000.

§dest_threat_intelligences: Vec<String>

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.

§layer_4_configs: Vec<FirewallPolicyRuleMatcherLayer4Config>

Pairs of IP protocols and ports that the rule should match.

§src_address_groups: Vec<String>

Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.

§src_fqdns: Vec<String>

Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.

§src_ip_ranges: Vec<String>

CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.

§src_network_context: Option<SrcNetworkContext>

Network context of the traffic source. Allowed values are:

 - UNSPECIFIED
 - INTERNET
 - INTRA_VPC
 - NON_INTERNET
 - VPC_NETWORKS
§src_network_type: Option<SrcNetworkType>

Network type of the traffic source. Allowed values are:

 - UNSPECIFIED
 - INTERNET
 - INTRA_VPC
 - NON_INTERNET
 - VPC_NETWORKS
§src_networks: Vec<String>

Networks of the traffic source. It can be either a full or partial url.

§src_region_codes: Vec<String>

Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex.“US” Maximum number of source region codes allowed is 5000.

§src_secure_tags: Vec<FirewallPolicyRuleSecureTag>

List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256.

§src_threat_intelligences: Vec<String>

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

Implementations§

Source§

impl FirewallPolicyRuleMatcher

Source

pub fn new() -> Self

Source

pub fn set_dest_address_groups<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of dest_address_groups.

§Example
let x = FirewallPolicyRuleMatcher::new().set_dest_address_groups(["a", "b", "c"]);
Source

pub fn set_dest_fqdns<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of dest_fqdns.

§Example
let x = FirewallPolicyRuleMatcher::new().set_dest_fqdns(["a", "b", "c"]);
Source

pub fn set_dest_ip_ranges<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of dest_ip_ranges.

§Example
let x = FirewallPolicyRuleMatcher::new().set_dest_ip_ranges(["a", "b", "c"]);
Source

pub fn set_dest_network_context<T>(self, v: T) -> Self

Sets the value of dest_network_context.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::DestNetworkContext;
let x0 = FirewallPolicyRuleMatcher::new().set_dest_network_context(DestNetworkContext::IntraVpc);
let x1 = FirewallPolicyRuleMatcher::new().set_dest_network_context(DestNetworkContext::NonInternet);
let x2 = FirewallPolicyRuleMatcher::new().set_dest_network_context(DestNetworkContext::Unspecified);
Source

pub fn set_or_clear_dest_network_context<T>(self, v: Option<T>) -> Self

Sets or clears the value of dest_network_context.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::DestNetworkContext;
let x0 = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_context(Some(DestNetworkContext::IntraVpc));
let x1 = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_context(Some(DestNetworkContext::NonInternet));
let x2 = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_context(Some(DestNetworkContext::Unspecified));
let x_none = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_context(None::<DestNetworkContext>);
Source

pub fn set_dest_network_type<T>(self, v: T) -> Self

Sets the value of dest_network_type.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::DestNetworkType;
let x0 = FirewallPolicyRuleMatcher::new().set_dest_network_type(DestNetworkType::IntraVpc);
let x1 = FirewallPolicyRuleMatcher::new().set_dest_network_type(DestNetworkType::NonInternet);
let x2 = FirewallPolicyRuleMatcher::new().set_dest_network_type(DestNetworkType::Unspecified);
Source

pub fn set_or_clear_dest_network_type<T>(self, v: Option<T>) -> Self

Sets or clears the value of dest_network_type.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::DestNetworkType;
let x0 = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_type(Some(DestNetworkType::IntraVpc));
let x1 = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_type(Some(DestNetworkType::NonInternet));
let x2 = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_type(Some(DestNetworkType::Unspecified));
let x_none = FirewallPolicyRuleMatcher::new().set_or_clear_dest_network_type(None::<DestNetworkType>);
Source

pub fn set_dest_region_codes<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of dest_region_codes.

§Example
let x = FirewallPolicyRuleMatcher::new().set_dest_region_codes(["a", "b", "c"]);
Source

pub fn set_dest_threat_intelligences<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of dest_threat_intelligences.

§Example
let x = FirewallPolicyRuleMatcher::new().set_dest_threat_intelligences(["a", "b", "c"]);
Source

pub fn set_layer_4_configs<T, V>(self, v: T) -> Self

Sets the value of layer_4_configs.

§Example
use google_cloud_compute_v1::model::FirewallPolicyRuleMatcherLayer4Config;
let x = FirewallPolicyRuleMatcher::new()
    .set_layer_4_configs([
        FirewallPolicyRuleMatcherLayer4Config::default()/* use setters */,
        FirewallPolicyRuleMatcherLayer4Config::default()/* use (different) setters */,
    ]);
Source

pub fn set_src_address_groups<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of src_address_groups.

§Example
let x = FirewallPolicyRuleMatcher::new().set_src_address_groups(["a", "b", "c"]);
Source

pub fn set_src_fqdns<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of src_fqdns.

§Example
let x = FirewallPolicyRuleMatcher::new().set_src_fqdns(["a", "b", "c"]);
Source

pub fn set_src_ip_ranges<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of src_ip_ranges.

§Example
let x = FirewallPolicyRuleMatcher::new().set_src_ip_ranges(["a", "b", "c"]);
Source

pub fn set_src_network_context<T>(self, v: T) -> Self

Sets the value of src_network_context.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::SrcNetworkContext;
let x0 = FirewallPolicyRuleMatcher::new().set_src_network_context(SrcNetworkContext::IntraVpc);
let x1 = FirewallPolicyRuleMatcher::new().set_src_network_context(SrcNetworkContext::NonInternet);
let x2 = FirewallPolicyRuleMatcher::new().set_src_network_context(SrcNetworkContext::Unspecified);
Source

pub fn set_or_clear_src_network_context<T>(self, v: Option<T>) -> Self

Sets or clears the value of src_network_context.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::SrcNetworkContext;
let x0 = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_context(Some(SrcNetworkContext::IntraVpc));
let x1 = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_context(Some(SrcNetworkContext::NonInternet));
let x2 = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_context(Some(SrcNetworkContext::Unspecified));
let x_none = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_context(None::<SrcNetworkContext>);
Source

pub fn set_src_network_type<T>(self, v: T) -> Self
where T: Into<SrcNetworkType>,

Sets the value of src_network_type.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::SrcNetworkType;
let x0 = FirewallPolicyRuleMatcher::new().set_src_network_type(SrcNetworkType::IntraVpc);
let x1 = FirewallPolicyRuleMatcher::new().set_src_network_type(SrcNetworkType::NonInternet);
let x2 = FirewallPolicyRuleMatcher::new().set_src_network_type(SrcNetworkType::Unspecified);
Source

pub fn set_or_clear_src_network_type<T>(self, v: Option<T>) -> Self
where T: Into<SrcNetworkType>,

Sets or clears the value of src_network_type.

§Example
use google_cloud_compute_v1::model::firewall_policy_rule_matcher::SrcNetworkType;
let x0 = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_type(Some(SrcNetworkType::IntraVpc));
let x1 = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_type(Some(SrcNetworkType::NonInternet));
let x2 = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_type(Some(SrcNetworkType::Unspecified));
let x_none = FirewallPolicyRuleMatcher::new().set_or_clear_src_network_type(None::<SrcNetworkType>);
Source

pub fn set_src_networks<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of src_networks.

§Example
let x = FirewallPolicyRuleMatcher::new().set_src_networks(["a", "b", "c"]);
Source

pub fn set_src_region_codes<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of src_region_codes.

§Example
let x = FirewallPolicyRuleMatcher::new().set_src_region_codes(["a", "b", "c"]);
Source

pub fn set_src_secure_tags<T, V>(self, v: T) -> Self

Sets the value of src_secure_tags.

§Example
use google_cloud_compute_v1::model::FirewallPolicyRuleSecureTag;
let x = FirewallPolicyRuleMatcher::new()
    .set_src_secure_tags([
        FirewallPolicyRuleSecureTag::default()/* use setters */,
        FirewallPolicyRuleSecureTag::default()/* use (different) setters */,
    ]);
Source

pub fn set_src_threat_intelligences<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of src_threat_intelligences.

§Example
let x = FirewallPolicyRuleMatcher::new().set_src_threat_intelligences(["a", "b", "c"]);

Trait Implementations§

Source§

impl Clone for FirewallPolicyRuleMatcher

Source§

fn clone(&self) -> FirewallPolicyRuleMatcher

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FirewallPolicyRuleMatcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FirewallPolicyRuleMatcher

Source§

fn default() -> FirewallPolicyRuleMatcher

Returns the “default value” for a type. Read more
Source§

impl Message for FirewallPolicyRuleMatcher

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for FirewallPolicyRuleMatcher

Source§

fn eq(&self, other: &FirewallPolicyRuleMatcher) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FirewallPolicyRuleMatcher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,