Class: Google::Apis::ComputeV1::NetworkInterface

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/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.



18148
18149
18150
# File 'generated/google/apis/compute_v1/classes.rb', line 18148

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

Instance Attribute Details

#access_configsArray<Google::Apis::ComputeV1::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



18075
18076
18077
# File 'generated/google/apis/compute_v1/classes.rb', line 18075

def access_configs
  @access_configs
end

#alias_ip_rangesArray<Google::Apis::ComputeV1::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



18081
18082
18083
# File 'generated/google/apis/compute_v1/classes.rb', line 18081

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, otherwise the request will fail with error 412 conditionNotMet. Corresponds to the JSON property fingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


18090
18091
18092
# File 'generated/google/apis/compute_v1/classes.rb', line 18090

def fingerprint
  @fingerprint
end

#ipv6_addressString

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

Returns:

  • (String)


18095
18096
18097
# File 'generated/google/apis/compute_v1/classes.rb', line 18095

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)


18101
18102
18103
# File 'generated/google/apis/compute_v1/classes.rb', line 18101

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)


18107
18108
18109
# File 'generated/google/apis/compute_v1/classes.rb', line 18107

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:

Returns:

  • (String)


18121
18122
18123
# File 'generated/google/apis/compute_v1/classes.rb', line 18121

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)


18128
18129
18130
# File 'generated/google/apis/compute_v1/classes.rb', line 18128

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)


18133
18134
18135
# File 'generated/google/apis/compute_v1/classes.rb', line 18133

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

Returns:

  • (String)


18146
18147
18148
# File 'generated/google/apis/compute_v1/classes.rb', line 18146

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
# File 'generated/google/apis/compute_v1/classes.rb', line 18153

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