Class: Google::Apis::ComputeBeta::NetworkInterface

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_beta/classes.rb,
generated/google/apis/compute_beta/representations.rb,
generated/google/apis/compute_beta/representations.rb

Overview

A network interface resource attached to an instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ NetworkInterface

Returns a new instance of NetworkInterface.



6162
6163
6164
# File 'generated/google/apis/compute_beta/classes.rb', line 6162

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

Instance Attribute Details

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



6120
6121
6122
# File 'generated/google/apis/compute_beta/classes.rb', line 6120

def access_configs
  @access_configs
end

#nameString

[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. Corresponds to the JSON property name

Returns:

  • (String)


6126
6127
6128
# File 'generated/google/apis/compute_beta/classes.rb', line 6126

def name
  @name
end

#networkString

URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default 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)


6140
6141
6142
# File 'generated/google/apis/compute_beta/classes.rb', line 6140

def network
  @network
end

#network_ipString

An IPv4 internal network 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)


6147
6148
6149
# File 'generated/google/apis/compute_beta/classes.rb', line 6147

def network_ip
  @network_ip
end

#subnetworkString

The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:

Returns:

  • (String)


6160
6161
6162
# File 'generated/google/apis/compute_beta/classes.rb', line 6160

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6167
6168
6169
6170
6171
6172
6173
# File 'generated/google/apis/compute_beta/classes.rb', line 6167

def update!(**args)
  @access_configs = args[:access_configs] if args.key?(:access_configs)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @network_ip = args[:network_ip] if args.key?(:network_ip)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end