Struct google_api_proto::google::cloud::compute::v1::NetworkInterface
source · pub struct NetworkInterface {Show 16 fields
pub access_configs: Vec<AccessConfig>,
pub alias_ip_ranges: Vec<AliasIpRange>,
pub fingerprint: Option<String>,
pub internal_ipv6_prefix_length: Option<i32>,
pub ipv6_access_configs: Vec<AccessConfig>,
pub ipv6_access_type: Option<String>,
pub ipv6_address: Option<String>,
pub kind: Option<String>,
pub name: Option<String>,
pub network: Option<String>,
pub network_attachment: Option<String>,
pub network_i_p: Option<String>,
pub nic_type: Option<String>,
pub queue_count: Option<i32>,
pub stack_type: Option<String>,
pub subnetwork: Option<String>,
}
Expand description
A network interface resource attached to an instance.
Fields§
§access_configs: Vec<AccessConfig>
An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
alias_ip_ranges: Vec<AliasIpRange>
An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
fingerprint: Option<String>
Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
internal_ipv6_prefix_length: Option<i32>
The prefix length of the primary internal IPv6 range.
ipv6_access_configs: Vec<AccessConfig>
An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access.
ipv6_access_type: Option<String>
[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork. Valid only if stackType is IPV4_IPV6. Check the Ipv6AccessType enum for the list of possible values.
ipv6_address: Option<String>
An IPv6 internal network address for this network interface. To use a static internal 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 internal IPv6 address from the instance’s subnetwork.
kind: Option<String>
[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
name: Option<String>
[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0.
network: Option<String>
URL of the VPC network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used. If the selected project doesn’t have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/global/networks/ network - projects/project/global/networks/network - global/networks/default
network_attachment: Option<String>
The URL of the network attachment that this interface should connect to in the following format: projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
network_i_p: Option<String>
An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
nic_type: Option<String>
The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Check the NicType enum for the list of possible values.
queue_count: Option<i32>
The networking queue count that’s specified by users for the network interface. Both Rx and Tx queues will be set to this number. It’ll be empty if not specified by the users.
stack_type: Option<String>
The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can be both set at instance creation and update network interface operations. Check the StackType enum for the list of possible values.
subnetwork: Option<String>
The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/subnetwork
Implementations§
source§impl NetworkInterface
impl NetworkInterface
sourcepub fn nic_type(&self) -> &str
pub fn nic_type(&self) -> &str
Returns the value of nic_type
, or the default value if nic_type
is unset.
sourcepub fn internal_ipv6_prefix_length(&self) -> i32
pub fn internal_ipv6_prefix_length(&self) -> i32
Returns the value of internal_ipv6_prefix_length
, or the default value if internal_ipv6_prefix_length
is unset.
sourcepub fn network_i_p(&self) -> &str
pub fn network_i_p(&self) -> &str
Returns the value of network_i_p
, or the default value if network_i_p
is unset.
sourcepub fn network_attachment(&self) -> &str
pub fn network_attachment(&self) -> &str
Returns the value of network_attachment
, or the default value if network_attachment
is unset.
sourcepub fn network(&self) -> &str
pub fn network(&self) -> &str
Returns the value of network
, or the default value if network
is unset.
sourcepub fn fingerprint(&self) -> &str
pub fn fingerprint(&self) -> &str
Returns the value of fingerprint
, or the default value if fingerprint
is unset.
sourcepub fn subnetwork(&self) -> &str
pub fn subnetwork(&self) -> &str
Returns the value of subnetwork
, or the default value if subnetwork
is unset.
sourcepub fn ipv6_address(&self) -> &str
pub fn ipv6_address(&self) -> &str
Returns the value of ipv6_address
, or the default value if ipv6_address
is unset.
sourcepub fn stack_type(&self) -> &str
pub fn stack_type(&self) -> &str
Returns the value of stack_type
, or the default value if stack_type
is unset.
sourcepub fn queue_count(&self) -> i32
pub fn queue_count(&self) -> i32
Returns the value of queue_count
, or the default value if queue_count
is unset.
sourcepub fn ipv6_access_type(&self) -> &str
pub fn ipv6_access_type(&self) -> &str
Returns the value of ipv6_access_type
, or the default value if ipv6_access_type
is unset.
Trait Implementations§
source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NetworkInterface
impl Debug for NetworkInterface
source§impl Default for NetworkInterface
impl Default for NetworkInterface
source§impl Message for NetworkInterface
impl Message for NetworkInterface
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 NetworkInterface
impl PartialEq for NetworkInterface
source§fn eq(&self, other: &NetworkInterface) -> bool
fn eq(&self, other: &NetworkInterface) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for NetworkInterface
Auto Trait Implementations§
impl Freeze for NetworkInterface
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
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