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.



24017
24018
24019
# File 'lib/google/apis/compute_alpha/classes.rb', line 24017

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 no accessConfigs specified, then this instance will have no external internet access. Corresponds to the JSON property accessConfigs



23905
23906
23907
# File 'lib/google/apis/compute_alpha/classes.rb', line 23905

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



23911
23912
23913
# File 'lib/google/apis/compute_alpha/classes.rb', line 23911

def alias_ip_ranges
  @alias_ip_ranges
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 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.

Returns:

  • (String)


23921
23922
23923
# File 'lib/google/apis/compute_alpha/classes.rb', line 23921

def fingerprint
  @fingerprint
end

#internal_ipv6_prefix_lengthFixnum

[Output Only] The prefix length of the primary internal IPv6 range. Corresponds to the JSON property internalIpv6PrefixLength

Returns:

  • (Fixnum)


23926
23927
23928
# File 'lib/google/apis/compute_alpha/classes.rb', line 23926

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



23933
23934
23935
# File 'lib/google/apis/compute_alpha/classes.rb', line 23933

def ipv6_access_configs
  @ipv6_access_configs
end

#ipv6_access_typeString

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


23940
23941
23942
# File 'lib/google/apis/compute_alpha/classes.rb', line 23940

def ipv6_access_type
  @ipv6_access_type
end

#ipv6_addressString

[Output Only] An IPv6 internal network address for this network interface. Corresponds to the JSON property ipv6Address

Returns:

  • (String)


23945
23946
23947
# File 'lib/google/apis/compute_alpha/classes.rb', line 23945

def ipv6_address
  @ipv6_address
end

#kindString

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

Returns:

  • (String)


23951
23952
23953
# File 'lib/google/apis/compute_alpha/classes.rb', line 23951

def kind
  @kind
end

#nameString

[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

Returns:

  • (String)


23957
23958
23959
# File 'lib/google/apis/compute_alpha/classes.rb', line 23957

def name
  @name
end

#networkString

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: - 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

Returns:

  • (String)


23969
23970
23971
# File 'lib/google/apis/compute_alpha/classes.rb', line 23969

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


23976
23977
23978
# File 'lib/google/apis/compute_alpha/classes.rb', line 23976

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)


23981
23982
23983
# File 'lib/google/apis/compute_alpha/classes.rb', line 23981

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


23988
23989
23990
# File 'lib/google/apis/compute_alpha/classes.rb', line 23988

def queue_count
  @queue_count
end

#stack_typeString

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

Returns:

  • (String)


23995
23996
23997
# File 'lib/google/apis/compute_alpha/classes.rb', line 23995

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



24003
24004
24005
# File 'lib/google/apis/compute_alpha/classes.rb', line 24003

def subinterfaces
  @subinterfaces
end

#subnetworkString

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: - https://www.googleapis.com/compute/v1/projects/ project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/ subnetwork Corresponds to the JSON property subnetwork

Returns:

  • (String)


24015
24016
24017
# File 'lib/google/apis/compute_alpha/classes.rb', line 24015

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
# File 'lib/google/apis/compute_alpha/classes.rb', line 24022

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)
  @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)
  @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)
  @subinterfaces = args[:subinterfaces] if args.key?(:subinterfaces)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end