Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::NetworkInterface.
A network interface resource attached to an instance.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#access_configs
def access_configs() -> ::Array<::Google::Cloud::Compute::V1::AccessConfig>- (::Array<::Google::Cloud::Compute::V1::AccessConfig>) — An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs specified, then this instance will have no external internet access.
#access_configs=
def access_configs=(value) -> ::Array<::Google::Cloud::Compute::V1::AccessConfig>- value (::Array<::Google::Cloud::Compute::V1::AccessConfig>) — An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs specified, then this instance will have no external internet access.
- (::Array<::Google::Cloud::Compute::V1::AccessConfig>) — An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs specified, then this instance will have no external internet access.
#alias_ip_ranges
def alias_ip_ranges() -> ::Array<::Google::Cloud::Compute::V1::AliasIpRange>- (::Array<::Google::Cloud::Compute::V1::AliasIpRange>) — An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
#alias_ip_ranges=
def alias_ip_ranges=(value) -> ::Array<::Google::Cloud::Compute::V1::AliasIpRange>- value (::Array<::Google::Cloud::Compute::V1::AliasIpRange>) — An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
- (::Array<::Google::Cloud::Compute::V1::AliasIpRange>) — An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
#enable_vpc_scoped_dns
def enable_vpc_scoped_dns() -> ::Boolean- (::Boolean) — Optional. If true, DNS resolution will be enabled over this interface. Only valid with network_attachment.
#enable_vpc_scoped_dns=
def enable_vpc_scoped_dns=(value) -> ::Boolean- value (::Boolean) — Optional. If true, DNS resolution will be enabled over this interface. Only valid with network_attachment.
- (::Boolean) — Optional. If true, DNS resolution will be enabled over this interface. Only valid with network_attachment.
#fingerprint
def fingerprint() -> ::String- (::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 theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date.
#fingerprint=
def fingerprint=(value) -> ::String- value (::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 theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date.
- (::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 theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date.
#igmp_query
def igmp_query() -> ::String- (::String) — Indicate whether igmp query is enabled on the network interface or not. If enabled, also indicates the version of IGMP supported. Check the IgmpQuery enum for the list of possible values.
#igmp_query=
def igmp_query=(value) -> ::String- value (::String) — Indicate whether igmp query is enabled on the network interface or not. If enabled, also indicates the version of IGMP supported. Check the IgmpQuery enum for the list of possible values.
- (::String) — Indicate whether igmp query is enabled on the network interface or not. If enabled, also indicates the version of IGMP supported. Check the IgmpQuery enum for the list of possible values.
#internal_ipv6_prefix_length
def internal_ipv6_prefix_length() -> ::Integer- (::Integer) — The prefix length of the primary internal IPv6 range.
#internal_ipv6_prefix_length=
def internal_ipv6_prefix_length=(value) -> ::Integer- value (::Integer) — The prefix length of the primary internal IPv6 range.
- (::Integer) — The prefix length of the primary internal IPv6 range.
#ipv6_access_configs
def ipv6_access_configs() -> ::Array<::Google::Cloud::Compute::V1::AccessConfig>- (::Array<::Google::Cloud::Compute::V1::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_configs=
def ipv6_access_configs=(value) -> ::Array<::Google::Cloud::Compute::V1::AccessConfig>- value (::Array<::Google::Cloud::Compute::V1::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.
- (::Array<::Google::Cloud::Compute::V1::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
def ipv6_access_type() -> ::String-
(::String) — Output only. [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_access_type=
def ipv6_access_type=(value) -> ::String-
value (::String) — Output only. [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.
-
(::String) — Output only. [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
def ipv6_address() -> ::String- (::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.
#ipv6_address=
def ipv6_address=(value) -> ::String- value (::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.
- (::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
def kind() -> ::String- (::String) — Output only. [Output Only] Type of the resource. Alwayscompute#networkInterface for network interfaces.
#kind=
def kind=(value) -> ::String- value (::String) — Output only. [Output Only] Type of the resource. Alwayscompute#networkInterface for network interfaces.
- (::String) — Output only. [Output Only] Type of the resource. Alwayscompute#networkInterface for network interfaces.
#name
def name() -> ::String- (::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 and7. The default interface value is nic0.
#name=
def name=(value) -> ::String- value (::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 and7. The default interface value is nic0.
- (::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 and7. The default interface value is nic0.
#network
def network() -> ::String-
(::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=
def network=(value) -> ::String-
value (::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
-
(::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
def network_attachment() -> ::String- (::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_attachment=
def network_attachment=(value) -> ::String- value (::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}.
- (::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
def network_i_p() -> ::String- (::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.
#network_i_p=
def network_i_p=(value) -> ::String- value (::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.
- (::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
def nic_type() -> ::String- (::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.
#nic_type=
def nic_type=(value) -> ::String- value (::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.
- (::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.
#parent_nic_name
def parent_nic_name() -> ::String- (::String) — Name of the parent network interface of a dynamic network interface.
#parent_nic_name=
def parent_nic_name=(value) -> ::String- value (::String) — Name of the parent network interface of a dynamic network interface.
- (::String) — Name of the parent network interface of a dynamic network interface.
#queue_count
def queue_count() -> ::Integer- (::Integer) — 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.
#queue_count=
def queue_count=(value) -> ::Integer- value (::Integer) — 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.
- (::Integer) — 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
def stack_type() -> ::String-
(::String) — The stack type for this network interface. To assign only IPv4 addresses,
use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_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.
#stack_type=
def stack_type=(value) -> ::String-
value (::String) — The stack type for this network interface. To assign only IPv4 addresses,
use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_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.
-
(::String) — The stack type for this network interface. To assign only IPv4 addresses,
use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_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
def subnetwork() -> ::String-
(::String) —
The URL of the Subnetwork resource for this instance. If the network resource is inlegacy 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
#subnetwork=
def subnetwork=(value) -> ::String-
value (::String) —
The URL of the Subnetwork resource for this instance. If the network resource is inlegacy 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
-
(::String) —
The URL of the Subnetwork resource for this instance. If the network resource is inlegacy 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
#vlan
def vlan() -> ::Integer- (::Integer) — VLAN tag of a dynamic network interface, must be an integer in the range from 2 to 255 inclusively.
#vlan=
def vlan=(value) -> ::Integer- value (::Integer) — VLAN tag of a dynamic network interface, must be an integer in the range from 2 to 255 inclusively.
- (::Integer) — VLAN tag of a dynamic network interface, must be an integer in the range from 2 to 255 inclusively.