Class: Google::Apis::ComputeAlpha::NetworkInterface

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkInterface

Returns a new instance of NetworkInterface.



45284
45285
45286
# File 'lib/google/apis/compute_alpha/classes.rb', line 45284

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#access_configsArray<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



45085
45086
45087
# File 'lib/google/apis/compute_alpha/classes.rb', line 45085

def access_configs
  @access_configs
end

#alias_ip_rangesArray<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



45091
45092
45093
# File 'lib/google/apis/compute_alpha/classes.rb', line 45091

def alias_ip_ranges
  @alias_ip_ranges
end

#alias_ipv6_rangesArray<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



45097
45098
45099
# File 'lib/google/apis/compute_alpha/classes.rb', line 45097

def alias_ipv6_ranges
  @alias_ipv6_ranges
end

#dns64_eligibleBoolean 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

Returns:

  • (Boolean)


45103
45104
45105
# File 'lib/google/apis/compute_alpha/classes.rb', line 45103

def dns64_eligible
  @dns64_eligible
end

#enable_vpc_scoped_dnsBoolean 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

Returns:

  • (Boolean)


45111
45112
45113
# File 'lib/google/apis/compute_alpha/classes.rb', line 45111

def enable_vpc_scoped_dns
  @enable_vpc_scoped_dns
end

#fingerprintString

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.

Returns:

  • (String)


45123
45124
45125
# File 'lib/google/apis/compute_alpha/classes.rb', line 45123

def fingerprint
  @fingerprint
end

#igmp_queryString

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

Returns:

  • (String)


45129
45130
45131
# File 'lib/google/apis/compute_alpha/classes.rb', line 45129

def igmp_query
  @igmp_query
end

#internal_ipv6_prefix_lengthFixnum

The prefix length of the primary internal IPv6 range. Corresponds to the JSON property internalIpv6PrefixLength

Returns:

  • (Fixnum)


45134
45135
45136
# File 'lib/google/apis/compute_alpha/classes.rb', line 45134

def internal_ipv6_prefix_length
  @internal_ipv6_prefix_length
end

#ipv6_access_configsArray<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



45142
45143
45144
# File 'lib/google/apis/compute_alpha/classes.rb', line 45142

def ipv6_access_configs
  @ipv6_access_configs
end

#ipv6_access_typeString

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

Returns:

  • (String)


45151
45152
45153
# File 'lib/google/apis/compute_alpha/classes.rb', line 45151

def ipv6_access_type
  @ipv6_access_type
end

#ipv6_addressString

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

Returns:

  • (String)


45159
45160
45161
# File 'lib/google/apis/compute_alpha/classes.rb', line 45159

def ipv6_address
  @ipv6_address
end

#kindString

Output only. [Output Only] Type of the resource. Alwayscompute# networkInterface for network interfaces. Corresponds to the JSON property kind

Returns:

  • (String)


45165
45166
45167
# File 'lib/google/apis/compute_alpha/classes.rb', line 45165

def kind
  @kind
end

#mac_addressString

Output only. [Output Only] MAC address assigned to this network interface. Corresponds to the JSON property macAddress

Returns:

  • (String)


45170
45171
45172
# File 'lib/google/apis/compute_alpha/classes.rb', line 45170

def mac_address
  @mac_address
end

#nameString

[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

Returns:

  • (String)


45177
45178
45179
# File 'lib/google/apis/compute_alpha/classes.rb', line 45177

def name
  @name
end

#nat64_eligibleBoolean 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

Returns:

  • (Boolean)


45183
45184
45185
# File 'lib/google/apis/compute_alpha/classes.rb', line 45183

def nat64_eligible
  @nat64_eligible
end

#networkString

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:

Returns:

  • (String)


45202
45203
45204
# File 'lib/google/apis/compute_alpha/classes.rb', line 45202

def network
  @network
end

#network_attachmentString

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

Returns:

  • (String)


45210
45211
45212
# File 'lib/google/apis/compute_alpha/classes.rb', line 45210

def network_attachment
  @network_attachment
end

#network_ipString

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

Returns:

  • (String)


45217
45218
45219
# File 'lib/google/apis/compute_alpha/classes.rb', line 45217

def network_ip
  @network_ip
end

#nic_typeString

The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Corresponds to the JSON property nicType

Returns:

  • (String)


45223
45224
45225
# File 'lib/google/apis/compute_alpha/classes.rb', line 45223

def nic_type
  @nic_type
end

#parent_nic_nameString

Name of the parent network interface of a dynamic network interface. Corresponds to the JSON property parentNicName

Returns:

  • (String)


45228
45229
45230
# File 'lib/google/apis/compute_alpha/classes.rb', line 45228

def parent_nic_name
  @parent_nic_name
end

#queue_countFixnum

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

Returns:

  • (Fixnum)


45235
45236
45237
# File 'lib/google/apis/compute_alpha/classes.rb', line 45235

def queue_count
  @queue_count
end

#service_class_idString

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

Returns:

  • (String)


45243
45244
45245
# File 'lib/google/apis/compute_alpha/classes.rb', line 45243

def service_class_id
  @service_class_id
end

#stack_typeString

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

Returns:

  • (String)


45252
45253
45254
# File 'lib/google/apis/compute_alpha/classes.rb', line 45252

def stack_type
  @stack_type
end

#subinterfacesArray<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



45260
45261
45262
# File 'lib/google/apis/compute_alpha/classes.rb', line 45260

def subinterfaces
  @subinterfaces
end

#subnetworkString

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:

Returns:

  • (String)


45276
45277
45278
# File 'lib/google/apis/compute_alpha/classes.rb', line 45276

def subnetwork
  @subnetwork
end

#vlanFixnum

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

Returns:

  • (Fixnum)


45282
45283
45284
# File 'lib/google/apis/compute_alpha/classes.rb', line 45282

def vlan
  @vlan
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
# File 'lib/google/apis/compute_alpha/classes.rb', line 45289

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)
  @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