#[non_exhaustive]pub struct ExternalAccessRule {Show 13 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub description: String,
pub priority: i32,
pub action: Action,
pub ip_protocol: String,
pub source_ip_ranges: Vec<IpRange>,
pub source_ports: Vec<String>,
pub destination_ip_ranges: Vec<IpRange>,
pub destination_ports: Vec<String>,
pub state: State,
pub uid: String,
/* private fields */
}Expand description
External access firewall rules for filtering incoming traffic destined to
ExternalAddress resources.
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.name: StringOutput only. The resource name of this external access rule.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names.
For example:
projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule
create_time: Option<Timestamp>Output only. Creation time of this resource.
update_time: Option<Timestamp>Output only. Last update time of this resource.
description: StringUser-provided description for this external access rule.
priority: i32External access rule priority, which determines the external access rule to
use when multiple rules apply. If multiple rules have the same priority,
their ordering is non-deterministic. If specific ordering is required,
assign unique priorities to enforce such ordering. The external access rule
priority is an integer from 100 to 4096, both inclusive. Lower integers
indicate higher precedence. For example, a rule with priority 100 has
higher precedence than a rule with priority 101.
action: ActionThe action that the external access rule performs.
ip_protocol: StringThe IP protocol to which the external access rule applies. This value can
be one of the following three protocol strings (not case-sensitive):
tcp, udp, or icmp.
source_ip_ranges: Vec<IpRange>If source ranges are specified, the external access rule applies only to
traffic that has a source IP address in these ranges. These ranges can
either be expressed in the CIDR format or as an IP address. As only inbound
rules are supported, ExternalAddress resources cannot be the source IP
addresses of an external access rule. To match all source addresses,
specify 0.0.0.0/0.
source_ports: Vec<String>A list of source ports to which the external access rule applies. This
field is only applicable for the UDP or TCP protocol.
Each entry must be either an integer or a range. For example: ["22"],
["80","443"], or ["12345-12349"]. To match all source ports, specify
["0-65535"].
destination_ip_ranges: Vec<IpRange>If destination ranges are specified, the external access rule applies only
to the traffic that has a destination IP address in these ranges. The
specified IP addresses must have reserved external IP addresses in the
scope of the parent network policy. To match all external IP addresses in
the scope of the parent network policy, specify 0.0.0.0/0. To match a
specific external IP address, specify it using the
IpRange.external_address property.
destination_ports: Vec<String>A list of destination ports to which the external access rule applies. This
field is only applicable for the UDP or TCP protocol.
Each entry must be either an integer or a range. For example: ["22"],
["80","443"], or ["12345-12349"]. To match all destination ports,
specify ["0-65535"].
state: StateOutput only. The state of the resource.
uid: StringOutput only. System-generated unique identifier for the resource.
Implementations§
Source§impl ExternalAccessRule
impl ExternalAccessRule
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_priority<T: Into<i32>>(self, v: T) -> Self
pub fn set_priority<T: Into<i32>>(self, v: T) -> Self
Sets the value of priority.
Sourcepub fn set_action<T: Into<Action>>(self, v: T) -> Self
pub fn set_action<T: Into<Action>>(self, v: T) -> Self
Sets the value of action.
Sourcepub fn set_ip_protocol<T: Into<String>>(self, v: T) -> Self
pub fn set_ip_protocol<T: Into<String>>(self, v: T) -> Self
Sets the value of ip_protocol.
Sourcepub fn set_source_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_source_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of source_ip_ranges.
Sourcepub fn set_source_ports<T, V>(self, v: T) -> Self
pub fn set_source_ports<T, V>(self, v: T) -> Self
Sets the value of source_ports.
Sourcepub fn set_destination_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_destination_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of destination_ip_ranges.
Sourcepub fn set_destination_ports<T, V>(self, v: T) -> Self
pub fn set_destination_ports<T, V>(self, v: T) -> Self
Sets the value of destination_ports.
Trait Implementations§
Source§impl Clone for ExternalAccessRule
impl Clone for ExternalAccessRule
Source§fn clone(&self) -> ExternalAccessRule
fn clone(&self) -> ExternalAccessRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more