Class: Google::Apis::NotebooksV2::NetworkInterface

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/notebooks_v2/classes.rb,
lib/google/apis/notebooks_v2/representations.rb,
lib/google/apis/notebooks_v2/representations.rb

Overview

The definition of a network interface resource attached to a VM.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkInterface

Returns a new instance of NetworkInterface.



1040
1041
1042
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1040

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

Instance Attribute Details

#access_configsArray<Google::Apis::NotebooksV2::AccessConfig>

Optional. An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If no accessConfigs specified, the instance will have an external internet access through an ephemeral external IP address. Corresponds to the JSON property accessConfigs



1020
1021
1022
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1020

def access_configs
  @access_configs
end

#networkString

Optional. The name of the VPC that this VM instance is in. Format: projects/ project_id/global/networks/network_id` Corresponds to the JSON propertynetwork`

Returns:

  • (String)


1026
1027
1028
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1026

def network
  @network
end

#nic_typeString

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

Returns:

  • (String)


1032
1033
1034
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1032

def nic_type
  @nic_type
end

#subnetString

Optional. The name of the subnet that this VM instance is in. Format: projects/project_id/regions/region/subnetworks/subnetwork_id` Corresponds to the JSON propertysubnet`

Returns:

  • (String)


1038
1039
1040
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1038

def subnet
  @subnet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1045
1046
1047
1048
1049
1050
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1045

def update!(**args)
  @access_configs = args[:access_configs] if args.key?(:access_configs)
  @network = args[:network] if args.key?(:network)
  @nic_type = args[:nic_type] if args.key?(:nic_type)
  @subnet = args[:subnet] if args.key?(:subnet)
end