pub struct RouterNat {Show 20 fields
pub auto_network_tier: Option<String>,
pub drain_nat_ips: Vec<String>,
pub enable_dynamic_port_allocation: Option<bool>,
pub enable_endpoint_independent_mapping: Option<bool>,
pub endpoint_types: Vec<String>,
pub icmp_idle_timeout_sec: Option<i32>,
pub log_config: Option<RouterNatLogConfig>,
pub max_ports_per_vm: Option<i32>,
pub min_ports_per_vm: Option<i32>,
pub name: Option<String>,
pub nat_ip_allocate_option: Option<String>,
pub nat_ips: Vec<String>,
pub rules: Vec<RouterNatRule>,
pub source_subnetwork_ip_ranges_to_nat: Option<String>,
pub subnetworks: Vec<RouterNatSubnetworkToNat>,
pub tcp_established_idle_timeout_sec: Option<i32>,
pub tcp_time_wait_timeout_sec: Option<i32>,
pub tcp_transitory_idle_timeout_sec: Option<i32>,
pub type: Option<String>,
pub udp_idle_timeout_sec: Option<i32>,
}
Expand description
Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.
Fields§
§auto_network_tier: Option<String>
The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used. Check the AutoNetworkTier enum for the list of possible values.
drain_nat_ips: Vec<String>
A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.
enable_dynamic_port_allocation: Option<bool>
Enable Dynamic Port Allocation. If not specified, it is disabled by default. If set to true, - Dynamic Port Allocation will be enabled on this NAT config. - enableEndpointIndependentMapping cannot be set to true. - If minPorts is set, minPortsPerVm must be set to a power of two greater than or equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config.
enable_endpoint_independent_mapping: Option<bool>
§endpoint_types: Vec<String>
List of NAT-ted endpoint types supported by the Nat Gateway. If the list is empty, then it will be equivalent to include ENDPOINT_TYPE_VM Check the EndpointTypes enum for the list of possible values.
icmp_idle_timeout_sec: Option<i32>
Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
log_config: Option<RouterNatLogConfig>
Configure logging on this NAT.
max_ports_per_vm: Option<i32>
Maximum number of ports allocated to a VM from this NAT config when Dynamic Port Allocation is enabled. If Dynamic Port Allocation is not enabled, this field has no effect. If Dynamic Port Allocation is enabled, and this field is set, it must be set to a power of two greater than minPortsPerVm, or 64 if minPortsPerVm is not set. If Dynamic Port Allocation is enabled and this field is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config.
min_ports_per_vm: Option<i32>
Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
name: Option<String>
Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.
nat_ip_allocate_option: Option<String>
Specify the NatIpAllocateOption, which can take one of the following values: - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can’t specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty. Check the NatIpAllocateOption enum for the list of possible values.
nat_ips: Vec<String>
A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project.
rules: Vec<RouterNatRule>
A list of rules associated with this NAT.
source_subnetwork_ip_ranges_to_nat: Option<String>
Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for this network in this region. Check the SourceSubnetworkIpRangesToNat enum for the list of possible values.
subnetworks: Vec<RouterNatSubnetworkToNat>
A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.
tcp_established_idle_timeout_sec: Option<i32>
Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
tcp_time_wait_timeout_sec: Option<i32>
Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set.
tcp_transitory_idle_timeout_sec: Option<i32>
Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
type: Option<String>
Indicates whether this NAT is used for public or private IP translation. If unspecified, it defaults to PUBLIC. Check the Type enum for the list of possible values.
udp_idle_timeout_sec: Option<i32>
Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
Implementations§
source§impl RouterNat
impl RouterNat
sourcepub fn icmp_idle_timeout_sec(&self) -> i32
pub fn icmp_idle_timeout_sec(&self) -> i32
Returns the value of icmp_idle_timeout_sec
, or the default value if icmp_idle_timeout_sec
is unset.
sourcepub fn udp_idle_timeout_sec(&self) -> i32
pub fn udp_idle_timeout_sec(&self) -> i32
Returns the value of udp_idle_timeout_sec
, or the default value if udp_idle_timeout_sec
is unset.
sourcepub fn min_ports_per_vm(&self) -> i32
pub fn min_ports_per_vm(&self) -> i32
Returns the value of min_ports_per_vm
, or the default value if min_ports_per_vm
is unset.
sourcepub fn tcp_transitory_idle_timeout_sec(&self) -> i32
pub fn tcp_transitory_idle_timeout_sec(&self) -> i32
Returns the value of tcp_transitory_idle_timeout_sec
, or the default value if tcp_transitory_idle_timeout_sec
is unset.
sourcepub fn tcp_established_idle_timeout_sec(&self) -> i32
pub fn tcp_established_idle_timeout_sec(&self) -> i32
Returns the value of tcp_established_idle_timeout_sec
, or the default value if tcp_established_idle_timeout_sec
is unset.
sourcepub fn max_ports_per_vm(&self) -> i32
pub fn max_ports_per_vm(&self) -> i32
Returns the value of max_ports_per_vm
, or the default value if max_ports_per_vm
is unset.
sourcepub fn source_subnetwork_ip_ranges_to_nat(&self) -> &str
pub fn source_subnetwork_ip_ranges_to_nat(&self) -> &str
Returns the value of source_subnetwork_ip_ranges_to_nat
, or the default value if source_subnetwork_ip_ranges_to_nat
is unset.
sourcepub fn enable_endpoint_independent_mapping(&self) -> bool
pub fn enable_endpoint_independent_mapping(&self) -> bool
Returns the value of enable_endpoint_independent_mapping
, or the default value if enable_endpoint_independent_mapping
is unset.
sourcepub fn auto_network_tier(&self) -> &str
pub fn auto_network_tier(&self) -> &str
Returns the value of auto_network_tier
, or the default value if auto_network_tier
is unset.
sourcepub fn nat_ip_allocate_option(&self) -> &str
pub fn nat_ip_allocate_option(&self) -> &str
Returns the value of nat_ip_allocate_option
, or the default value if nat_ip_allocate_option
is unset.
sourcepub fn tcp_time_wait_timeout_sec(&self) -> i32
pub fn tcp_time_wait_timeout_sec(&self) -> i32
Returns the value of tcp_time_wait_timeout_sec
, or the default value if tcp_time_wait_timeout_sec
is unset.
sourcepub fn enable_dynamic_port_allocation(&self) -> bool
pub fn enable_dynamic_port_allocation(&self) -> bool
Returns the value of enable_dynamic_port_allocation
, or the default value if enable_dynamic_port_allocation
is unset.
Trait Implementations§
source§impl Message for RouterNat
impl Message for RouterNat
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for RouterNat
impl PartialEq for RouterNat
impl StructuralPartialEq for RouterNat
Auto Trait Implementations§
impl Freeze for RouterNat
impl RefUnwindSafe for RouterNat
impl Send for RouterNat
impl Sync for RouterNat
impl Unpin for RouterNat
impl UnwindSafe for RouterNat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request