pub struct FirewallPolicyRule {
Show 15 fields pub action: Option<String>, pub description: Option<String>, pub direction: Option<String>, pub disabled: Option<bool>, pub enable_logging: Option<bool>, pub kind: Option<String>, pub match: Option<FirewallPolicyRuleMatcher>, pub priority: Option<i32>, pub rule_name: Option<String>, pub rule_tuple_count: Option<i32>, pub security_profile_group: Option<String>, pub target_resources: Vec<String>, pub target_secure_tags: Vec<FirewallPolicyRuleSecureTag>, pub target_service_accounts: Vec<String>, pub tls_inspect: Option<bool>,
}
Expand description

Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).

Fields§

§action: Option<String>

The Action to perform when the client connection triggers the rule. Valid actions are “allow”, “deny” and “goto_next”.

§description: Option<String>

An optional description for this resource.

§direction: Option<String>

The direction in which this rule applies. Check the Direction enum for the list of possible values.

§disabled: Option<bool>

Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.

§enable_logging: Option<bool>

Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on “goto_next” rules.

§kind: Option<String>

[Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules

§match: Option<FirewallPolicyRuleMatcher>

A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ‘action’ is enforced.

§priority: Option<i32>

An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.

§rule_name: Option<String>

An optional name for the rule. This field is not a unique identifier and can be updated.

§rule_tuple_count: Option<i32>

[Output Only] Calculation of the complexity of a single firewall policy rule.

§security_profile_group: Option<String>

A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = ‘apply_security_profile_group’ and cannot be specified for other actions.

§target_resources: Vec<String>

A list of network resource URLs to which this rule applies. This field allows you to control which network’s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.

§target_secure_tags: Vec<FirewallPolicyRuleSecureTag>

A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.

§target_service_accounts: Vec<String>

A list of service accounts indicating the sets of instances that are applied with this rule.

§tls_inspect: Option<bool>

Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = ‘apply_security_profile_group’ and cannot be set for other actions.

Implementations§

source§

impl FirewallPolicyRule

source

pub fn kind(&self) -> &str

Returns the value of kind, or the default value if kind is unset.

source

pub fn tls_inspect(&self) -> bool

Returns the value of tls_inspect, or the default value if tls_inspect is unset.

source

pub fn rule_name(&self) -> &str

Returns the value of rule_name, or the default value if rule_name is unset.

source

pub fn direction(&self) -> &str

Returns the value of direction, or the default value if direction is unset.

source

pub fn action(&self) -> &str

Returns the value of action, or the default value if action is unset.

source

pub fn security_profile_group(&self) -> &str

Returns the value of security_profile_group, or the default value if security_profile_group is unset.

source

pub fn disabled(&self) -> bool

Returns the value of disabled, or the default value if disabled is unset.

source

pub fn enable_logging(&self) -> bool

Returns the value of enable_logging, or the default value if enable_logging is unset.

source

pub fn rule_tuple_count(&self) -> i32

Returns the value of rule_tuple_count, or the default value if rule_tuple_count is unset.

source

pub fn description(&self) -> &str

Returns the value of description, or the default value if description is unset.

source

pub fn priority(&self) -> i32

Returns the value of priority, or the default value if priority is unset.

Trait Implementations§

source§

impl Clone for FirewallPolicyRule

source§

fn clone(&self) -> FirewallPolicyRule

Returns a copy 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 FirewallPolicyRule

source§

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

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

impl Default for FirewallPolicyRule

source§

fn default() -> Self

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

impl Message for FirewallPolicyRule

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for FirewallPolicyRule

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for FirewallPolicyRule

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

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

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

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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

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

§

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>,

§

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>,

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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