Class: Google::Apis::ComputeAlpha::NetworkInterface
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::NetworkInterface
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb
Overview
A network interface resource attached to an instance.
Instance Attribute Summary collapse
-
#access_configs ⇒ Array<Google::Apis::ComputeAlpha::AccessConfig>
An array of configurations for this interface.
-
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeAlpha::AliasIpRange>
An array of alias IP ranges for this network interface.
-
#alias_ipv6_ranges ⇒ Array<Google::Apis::ComputeAlpha::AliasIpRange>
An array of alias IPv6 ranges for this network interface.
-
#dns64_eligible ⇒ Boolean
(also: #dns64_eligible?)
If true, this network interface is eligible for DNS64.
-
#enable_vpc_scoped_dns ⇒ Boolean
(also: #enable_vpc_scoped_dns?)
Optional.
-
#fingerprint ⇒ String
Fingerprint hash of contents stored in this network interface.
-
#igmp_query ⇒ String
Indicate whether igmp query is enabled on the network interface or not.
-
#internal_ipv6_prefix_length ⇒ Fixnum
The prefix length of the primary internal IPv6 range.
-
#internal_nic_load_balancing_ipv6_address ⇒ String
[Output Only] This field specifies the internal IPv6 network address assigned to the CX9 Network Interface Card, which facilitates the routing of traffic between NICs.
-
#internal_nic_load_balancing_ipv6_prefix_length ⇒ Fixnum
[Output Only] The prefix length of the internal IPv6 Nic load balancing prefix.
-
#ipv6_access_configs ⇒ Array<Google::Apis::ComputeAlpha::AccessConfig>
An array of IPv6 access configurations for this interface.
-
#ipv6_access_type ⇒ String
Output only.
-
#ipv6_address ⇒ String
An IPv6 internal network address for this network interface.
-
#kind ⇒ String
Output only.
-
#mac_address ⇒ String
Output only.
-
#name ⇒ String
[Output Only] The name of the network interface, which is generated by the server.
-
#nat64_eligible ⇒ Boolean
(also: #nat64_eligible?)
If true, this network interface is eligible for NAT64.
-
#network ⇒ String
URL of the VPC network resource for this instance.
-
#network_attachment ⇒ 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_ip ⇒ String
An IPv4 internal IP address to assign to the instance for this network interface.
-
#nic_type ⇒ String
The type of vNIC to be used on this interface.
-
#parent_nic_name ⇒ String
Name of the parent network interface of a dynamic network interface.
-
#queue_count ⇒ Fixnum
The networking queue count that's specified by users for the network interface.
-
#service_class_id ⇒ String
Optional.
-
#stack_type ⇒ String
The stack type for this network interface.
-
#subinterfaces ⇒ Array<Google::Apis::ComputeAlpha::NetworkInterfaceSubInterface>
SubInterfaces help enable L2 communication for the instance over subnetworks that support L2.
-
#subnetwork ⇒ String
The URL of the Subnetwork resource for this instance.
-
#vlan ⇒ Fixnum
VLAN tag of a dynamic network interface, must be an integer in the range from 2 to 255 inclusively.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NetworkInterface
constructor
A new instance of NetworkInterface.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NetworkInterface
Returns a new instance of NetworkInterface.
46841 46842 46843 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46841 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_configs ⇒ Array<Google::Apis::ComputeAlpha::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.
Corresponds to the JSON property accessConfigs
46627 46628 46629 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46627 def access_configs @access_configs end |
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeAlpha::AliasIpRange>
An array of alias IP ranges for this network interface.
You can only specify this field for network interfaces in VPC networks.
Corresponds to the JSON property aliasIpRanges
46633 46634 46635 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46633 def alias_ip_ranges @alias_ip_ranges end |
#alias_ipv6_ranges ⇒ Array<Google::Apis::ComputeAlpha::AliasIpRange>
An array of alias IPv6 ranges for this network interface.
You can only specify this field for network interfaces in VPC networks.
Corresponds to the JSON property aliasIpv6Ranges
46639 46640 46641 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46639 def alias_ipv6_ranges @alias_ipv6_ranges end |
#dns64_eligible ⇒ Boolean Also known as: dns64_eligible?
If true, this network interface is eligible for DNS64.
This field is only supported for dual-stack (IPV4_IPV6) network interfaces.
Corresponds to the JSON property dns64Eligible
46645 46646 46647 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46645 def dns64_eligible @dns64_eligible end |
#enable_vpc_scoped_dns ⇒ Boolean Also known as: enable_vpc_scoped_dns?
Optional. If true, DNS resolution will be enabled over this interface. Only
valid
with network_attachment.
Corresponds to the JSON property enableVpcScopedDns
46653 46654 46655 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46653 def enable_vpc_scoped_dns @enable_vpc_scoped_dns end |
#fingerprint ⇒ 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.
Corresponds to the JSON property fingerprint
NOTE: Values are automatically base64 encoded/decoded in the client library.
46665 46666 46667 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46665 def fingerprint @fingerprint end |
#igmp_query ⇒ String
Indicate whether igmp query is enabled on the network interface
or not. If enabled, also indicates the version of IGMP supported.
Corresponds to the JSON property igmpQuery
46671 46672 46673 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46671 def igmp_query @igmp_query end |
#internal_ipv6_prefix_length ⇒ Fixnum
The prefix length of the primary internal IPv6 range.
Corresponds to the JSON property internalIpv6PrefixLength
46676 46677 46678 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46676 def internal_ipv6_prefix_length @internal_ipv6_prefix_length end |
#internal_nic_load_balancing_ipv6_address ⇒ String
[Output Only] This field specifies the internal IPv6 network address
assigned to the CX9 Network Interface Card, which facilitates the routing
of traffic between NICs. For any single CX9 Network Interface Card, the
identical internalNicLoadBalancingIpv6Address is assigned across all four
associated ports.
Corresponds to the JSON property internalNicLoadBalancingIpv6Address
46685 46686 46687 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46685 def internal_nic_load_balancing_ipv6_address @internal_nic_load_balancing_ipv6_address end |
#internal_nic_load_balancing_ipv6_prefix_length ⇒ Fixnum
[Output Only] The prefix length of the internal IPv6 Nic load balancing
prefix.
Corresponds to the JSON property internalNicLoadBalancingIpv6PrefixLength
46691 46692 46693 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46691 def internal_nic_load_balancing_ipv6_prefix_length @internal_nic_load_balancing_ipv6_prefix_length end |
#ipv6_access_configs ⇒ Array<Google::Apis::ComputeAlpha::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.
Corresponds to the JSON property ipv6AccessConfigs
46699 46700 46701 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46699 def ipv6_access_configs @ipv6_access_configs end |
#ipv6_access_type ⇒ 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.
Corresponds to the JSON property ipv6AccessType
46708 46709 46710 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46708 def ipv6_access_type @ipv6_access_type end |
#ipv6_address ⇒ 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.
Corresponds to the JSON property ipv6Address
46716 46717 46718 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46716 def ipv6_address @ipv6_address end |
#kind ⇒ String
Output only. [Output Only] Type of the resource. Alwayscompute#
networkInterface for network interfaces.
Corresponds to the JSON property kind
46722 46723 46724 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46722 def kind @kind end |
#mac_address ⇒ String
Output only. [Output Only] MAC address assigned to this network interface.
Corresponds to the JSON property macAddress
46727 46728 46729 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46727 def mac_address @mac_address end |
#name ⇒ 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.
Corresponds to the JSON property name
46734 46735 46736 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46734 def name @name end |
#nat64_eligible ⇒ Boolean Also known as: nat64_eligible?
If true, this network interface is eligible for NAT64.
This field is only supported for dual-stack (IPV4_IPV6) network interfaces.
Corresponds to the JSON property nat64Eligible
46740 46741 46742 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46740 def nat64_eligible @nat64_eligible end |
#network ⇒ 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
Corresponds to the JSON property
network
46759 46760 46761 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46759 def network @network end |
#network_attachment ⇒ 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.
Corresponds to the JSON property networkAttachment
46767 46768 46769 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46767 def @network_attachment end |
#network_ip ⇒ 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.
Corresponds to the JSON property networkIP
46774 46775 46776 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46774 def network_ip @network_ip end |
#nic_type ⇒ String
The type of vNIC to be used on this interface. This may be gVNIC or
VirtioNet.
Corresponds to the JSON property nicType
46780 46781 46782 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46780 def nic_type @nic_type end |
#parent_nic_name ⇒ String
Name of the parent network interface of a dynamic network interface.
Corresponds to the JSON property parentNicName
46785 46786 46787 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46785 def parent_nic_name @parent_nic_name end |
#queue_count ⇒ Fixnum
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.
Corresponds to the JSON property queueCount
46792 46793 46794 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46792 def queue_count @queue_count end |
#service_class_id ⇒ String
Optional. Producer Service's Service class Id for the region of this network
interface. Can only be used with network_attachment. It is not possible to
use on its own however, network_attachment can be used without
service_class_id.
Corresponds to the JSON property serviceClassId
46800 46801 46802 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46800 def service_class_id @service_class_id end |
#stack_type ⇒ 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.
Corresponds to the JSON property stackType
46809 46810 46811 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46809 def stack_type @stack_type end |
#subinterfaces ⇒ Array<Google::Apis::ComputeAlpha::NetworkInterfaceSubInterface>
SubInterfaces help enable L2 communication for the instance over
subnetworks that support L2. Every network interface will get a default
untagged (vlan not specified) subinterface. Users can specify additional
tagged subinterfaces which are sub-fields to the Network Interface.
Corresponds to the JSON property subinterfaces
46817 46818 46819 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46817 def subinterfaces @subinterfaces end |
#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
Corresponds to the JSON property
subnetwork
46833 46834 46835 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46833 def subnetwork @subnetwork end |
#vlan ⇒ Fixnum
VLAN tag of a dynamic network interface, must be an integer in the range
from 2 to 255 inclusively.
Corresponds to the JSON property vlan
46839 46840 46841 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46839 def vlan @vlan end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
46846 46847 46848 46849 46850 46851 46852 46853 46854 46855 46856 46857 46858 46859 46860 46861 46862 46863 46864 46865 46866 46867 46868 46869 46870 46871 46872 46873 46874 46875 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 46846 def update!(**args) @access_configs = args[:access_configs] if args.key?(:access_configs) @alias_ip_ranges = args[:alias_ip_ranges] if args.key?(:alias_ip_ranges) @alias_ipv6_ranges = args[:alias_ipv6_ranges] if args.key?(:alias_ipv6_ranges) @dns64_eligible = args[:dns64_eligible] if args.key?(:dns64_eligible) @enable_vpc_scoped_dns = args[:enable_vpc_scoped_dns] if args.key?(:enable_vpc_scoped_dns) @fingerprint = args[:fingerprint] if args.key?(:fingerprint) @igmp_query = args[:igmp_query] if args.key?(:igmp_query) @internal_ipv6_prefix_length = args[:internal_ipv6_prefix_length] if args.key?(:internal_ipv6_prefix_length) @internal_nic_load_balancing_ipv6_address = args[:internal_nic_load_balancing_ipv6_address] if args.key?(:internal_nic_load_balancing_ipv6_address) @internal_nic_load_balancing_ipv6_prefix_length = args[:internal_nic_load_balancing_ipv6_prefix_length] if args.key?(:internal_nic_load_balancing_ipv6_prefix_length) @ipv6_access_configs = args[:ipv6_access_configs] if args.key?(:ipv6_access_configs) @ipv6_access_type = args[:ipv6_access_type] if args.key?(:ipv6_access_type) @ipv6_address = args[:ipv6_address] if args.key?(:ipv6_address) @kind = args[:kind] if args.key?(:kind) @mac_address = args[:mac_address] if args.key?(:mac_address) @name = args[:name] if args.key?(:name) @nat64_eligible = args[:nat64_eligible] if args.key?(:nat64_eligible) @network = args[:network] if args.key?(:network) @network_attachment = args[:network_attachment] if args.key?(:network_attachment) @network_ip = args[:network_ip] if args.key?(:network_ip) @nic_type = args[:nic_type] if args.key?(:nic_type) @parent_nic_name = args[:parent_nic_name] if args.key?(:parent_nic_name) @queue_count = args[:queue_count] if args.key?(:queue_count) @service_class_id = args[:service_class_id] if args.key?(:service_class_id) @stack_type = args[:stack_type] if args.key?(:stack_type) @subinterfaces = args[:subinterfaces] if args.key?(:subinterfaces) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @vlan = args[:vlan] if args.key?(:vlan) end |