pub struct RouterNat {
Show 20 fields pub auto_network_tier: Option<String>, pub drain_nat_ips: Option<Vec<String>>, pub enable_dynamic_port_allocation: Option<bool>, pub enable_endpoint_independent_mapping: Option<bool>, pub endpoint_types: Option<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: Option<Vec<String>>, pub rules: Option<Vec<RouterNatRule>>, pub source_subnetwork_ip_ranges_to_nat: Option<String>, pub subnetworks: Option<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.

This type is not used in any activity, and only used as part of another schema.

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.

§drain_nat_ips: Option<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>

no description provided

§endpoint_types: Option<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

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

§nat_ips: Option<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: Option<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.

§subnetworks: Option<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.

§udp_idle_timeout_sec: Option<i32>

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

Trait Implementations§

source§

impl Clone for RouterNat

source§

fn clone(&self) -> RouterNat

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 RouterNat

source§

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

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

impl Default for RouterNat

source§

fn default() -> RouterNat

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

impl<'de> Deserialize<'de> for RouterNat

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for RouterNat

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Part for RouterNat

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.

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