Class: Google::Apis::ComputeBeta::NetworkInterface
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::NetworkInterface
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb
Overview
A network interface resource attached to an instance.
Instance Attribute Summary collapse
-
#access_configs ⇒ Array<Google::Apis::ComputeBeta::AccessConfig>
An array of configurations for this interface.
-
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeBeta::AliasIpRange>
An array of alias IP ranges for this network interface.
-
#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.
-
#ipv6_access_configs ⇒ Array<Google::Apis::ComputeBeta::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.
-
#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.
-
#stack_type ⇒ String
The stack type for this network interface.
-
#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.
38761 38762 38763 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38761 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_configs ⇒ Array<Google::Apis::ComputeBeta::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
38598 38599 38600 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38598 def access_configs @access_configs end |
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeBeta::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
38604 38605 38606 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38604 def alias_ip_ranges @alias_ip_ranges 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
38611 38612 38613 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38611 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.
38623 38624 38625 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38623 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
38629 38630 38631 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38629 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
38634 38635 38636 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38634 def internal_ipv6_prefix_length @internal_ipv6_prefix_length end |
#ipv6_access_configs ⇒ Array<Google::Apis::ComputeBeta::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
38642 38643 38644 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38642 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
38651 38652 38653 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38651 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
38659 38660 38661 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38659 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
38665 38666 38667 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38665 def kind @kind end |
#mac_address ⇒ String
Output only. [Output Only] MAC address assigned to this network interface.
Corresponds to the JSON property macAddress
38670 38671 38672 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38670 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
38677 38678 38679 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38677 def name @name 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
38695 38696 38697 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38695 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
38703 38704 38705 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38703 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
38710 38711 38712 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38710 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
38716 38717 38718 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38716 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
38721 38722 38723 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38721 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
38728 38729 38730 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38728 def queue_count @queue_count 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
38737 38738 38739 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38737 def stack_type @stack_type 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
38753 38754 38755 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38753 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
38759 38760 38761 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38759 def vlan @vlan end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
38766 38767 38768 38769 38770 38771 38772 38773 38774 38775 38776 38777 38778 38779 38780 38781 38782 38783 38784 38785 38786 38787 38788 |
# File 'lib/google/apis/compute_beta/classes.rb', line 38766 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) @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) @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) @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) @stack_type = args[:stack_type] if args.key?(:stack_type) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @vlan = args[:vlan] if args.key?(:vlan) end |