class Google::Apis::ComputeV1::NetworkInterface

A network interface resource attached to an instance.

Attributes

access_configs[RW]

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. Corresponds to the JSON property `accessConfigs` @return [Array<Google::Apis::ComputeV1::AccessConfig>]

alias_ip_ranges[RW]

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` @return [Array<Google::Apis::ComputeV1::AliasIpRange>]

fingerprint[RW]

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. Corresponds to the JSON property `fingerprint` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

ipv6_access_configs[RW]

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` @return [Array<Google::Apis::ComputeV1::AccessConfig>]

ipv6_access_type[RW]
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` @return [String]

ipv6_address[RW]
Output Only

An IPv6 internal network address for this network interface.

Corresponds to the JSON property `ipv6Address` @return [String]

kind[RW]
Output Only

Type of the resource. Always compute#networkInterface for

network interfaces. Corresponds to the JSON property `kind` @return [String]

name[RW]
Output Only

The name of the network interface, which is generated by the

server. For network devices, these are eth0, eth1, etc. Corresponds to the JSON property `name` @return [String]

network[RW]

URL of the 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 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: - www.googleapis.com/compute/v1/projects/ project/global/networks/ network - projects/project/global/networks/network - global/networks/default Corresponds to the JSON property `network` @return [String]

network_ip[RW]

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` @return [String]

nic_type[RW]

The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Corresponds to the JSON property `nicType` @return [String]

queue_count[RW]

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` @return [Fixnum]

stack_type[RW]

The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used. This field can be both set at instance creation and update network interface operations. Corresponds to the JSON property `stackType` @return [String]

subnetwork[RW]

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: - www.googleapis.com/compute/v1/projects/ project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/ subnetwork Corresponds to the JSON property `subnetwork` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/compute_v1/classes.rb, line 19192
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/compute_v1/classes.rb, line 19197
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)
  @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
  @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)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @network_ip = args[:network_ip] if args.key?(:network_ip)
  @nic_type = args[:nic_type] if args.key?(:nic_type)
  @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)
end