#[non_exhaustive]pub struct AccessConfig {
pub external_ipv_6: Option<String>,
pub external_ipv_6_prefix_length: Option<i32>,
pub kind: Option<String>,
pub name: Option<String>,
pub nat_ip: Option<String>,
pub network_tier: Option<NetworkTier>,
pub public_ptr_domain_name: Option<String>,
pub security_policy: Option<String>,
pub set_public_ptr: Option<bool>,
pub type: Option<Type>,
/* private fields */
}instance-templates or instances or machine-images or region-instance-templates or region-instances only.Expand description
An access configuration attached to an instance’s network interface. Only one access config per instance is supported.
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.external_ipv_6: Option<String>Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance’s zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance’s subnetwork.
external_ipv_6_prefix_length: Option<i32>Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#accessConfig for access configs.
name: Option<String>The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the recommend name is External IPv6.
nat_ip: Option<String>Applies to accessConfigs (IPv4) only. Anexternal IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
network_tier: Option<NetworkTier>This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM,STANDARD.
If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
public_ptr_domain_name: Option<String>The DNS domain name for the public PTR record.
You can set this field only if the setPublicPtr field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for
first IP in associated external IPv6 range.
security_policy: Option<String>The resource URL for the security policy associated with this access config.
set_public_ptr: Option<bool>Specifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.
This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated.
type: Option<Type>The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option isDIRECT_IPV6.
Implementations§
Source§impl AccessConfig
impl AccessConfig
pub fn new() -> Self
Sourcepub fn set_external_ipv_6<T>(self, v: T) -> Self
pub fn set_external_ipv_6<T>(self, v: T) -> Self
Sets the value of external_ipv_6.
§Example
let x = AccessConfig::new().set_external_ipv_6("example");Sourcepub fn set_or_clear_external_ipv_6<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_external_ipv_6<T>(self, v: Option<T>) -> Self
Sets or clears the value of external_ipv_6.
§Example
let x = AccessConfig::new().set_or_clear_external_ipv_6(Some("example"));
let x = AccessConfig::new().set_or_clear_external_ipv_6(None::<String>);Sourcepub fn set_external_ipv_6_prefix_length<T>(self, v: T) -> Self
pub fn set_external_ipv_6_prefix_length<T>(self, v: T) -> Self
Sets the value of external_ipv_6_prefix_length.
§Example
let x = AccessConfig::new().set_external_ipv_6_prefix_length(42);Sourcepub fn set_or_clear_external_ipv_6_prefix_length<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_external_ipv_6_prefix_length<T>(self, v: Option<T>) -> Self
Sets or clears the value of external_ipv_6_prefix_length.
§Example
let x = AccessConfig::new().set_or_clear_external_ipv_6_prefix_length(Some(42));
let x = AccessConfig::new().set_or_clear_external_ipv_6_prefix_length(None::<i32>);Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_nat_ip<T>(self, v: T) -> Self
pub fn set_nat_ip<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_nat_ip<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_nat_ip<T>(self, v: Option<T>) -> Self
Sourcepub fn set_network_tier<T>(self, v: T) -> Selfwhere
T: Into<NetworkTier>,
pub fn set_network_tier<T>(self, v: T) -> Selfwhere
T: Into<NetworkTier>,
Sets the value of network_tier.
§Example
use google_cloud_compute_v1::model::access_config::NetworkTier;
let x0 = AccessConfig::new().set_network_tier(NetworkTier::Premium);
let x1 = AccessConfig::new().set_network_tier(NetworkTier::Standard);
let x2 = AccessConfig::new().set_network_tier(NetworkTier::StandardOverridesFixedStandard);Sourcepub fn set_or_clear_network_tier<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkTier>,
pub fn set_or_clear_network_tier<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkTier>,
Sets or clears the value of network_tier.
§Example
use google_cloud_compute_v1::model::access_config::NetworkTier;
let x0 = AccessConfig::new().set_or_clear_network_tier(Some(NetworkTier::Premium));
let x1 = AccessConfig::new().set_or_clear_network_tier(Some(NetworkTier::Standard));
let x2 = AccessConfig::new().set_or_clear_network_tier(Some(NetworkTier::StandardOverridesFixedStandard));
let x_none = AccessConfig::new().set_or_clear_network_tier(None::<NetworkTier>);Sourcepub fn set_public_ptr_domain_name<T>(self, v: T) -> Self
pub fn set_public_ptr_domain_name<T>(self, v: T) -> Self
Sets the value of public_ptr_domain_name.
§Example
let x = AccessConfig::new().set_public_ptr_domain_name("example");Sourcepub fn set_or_clear_public_ptr_domain_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_public_ptr_domain_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of public_ptr_domain_name.
§Example
let x = AccessConfig::new().set_or_clear_public_ptr_domain_name(Some("example"));
let x = AccessConfig::new().set_or_clear_public_ptr_domain_name(None::<String>);Sourcepub fn set_security_policy<T>(self, v: T) -> Self
pub fn set_security_policy<T>(self, v: T) -> Self
Sets the value of security_policy.
§Example
let x = AccessConfig::new().set_security_policy("example");Sourcepub fn set_or_clear_security_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_security_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of security_policy.
§Example
let x = AccessConfig::new().set_or_clear_security_policy(Some("example"));
let x = AccessConfig::new().set_or_clear_security_policy(None::<String>);Sourcepub fn set_set_public_ptr<T>(self, v: T) -> Self
pub fn set_set_public_ptr<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_set_public_ptr<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_set_public_ptr<T>(self, v: Option<T>) -> Self
Sets or clears the value of set_public_ptr.
§Example
let x = AccessConfig::new().set_or_clear_set_public_ptr(Some(false));
let x = AccessConfig::new().set_or_clear_set_public_ptr(None::<bool>);Sourcepub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for AccessConfig
impl Clone for AccessConfig
Source§fn clone(&self) -> AccessConfig
fn clone(&self) -> AccessConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more