Class: Google::Apis::NotebooksV2::GceSetup

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 how to configure a VM instance outside of Resources and Identity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GceSetup

Returns a new instance of GceSetup.



804
805
806
# File 'lib/google/apis/notebooks_v2/classes.rb', line 804

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

Instance Attribute Details

#accelerator_configsArray<Google::Apis::NotebooksV2::AcceleratorConfig>

Optional. The hardware accelerators used on this instance. If you use accelerators, make sure that your configuration has enough vCPUs and memory to support the machine_type you have selected. Currently supports only one accelerator configuration. Corresponds to the JSON property acceleratorConfigs



704
705
706
# File 'lib/google/apis/notebooks_v2/classes.rb', line 704

def accelerator_configs
  @accelerator_configs
end

#boot_diskGoogle::Apis::NotebooksV2::BootDisk

The definition of a boot disk. Corresponds to the JSON property bootDisk



709
710
711
# File 'lib/google/apis/notebooks_v2/classes.rb', line 709

def boot_disk
  @boot_disk
end

#confidential_instance_configGoogle::Apis::NotebooksV2::ConfidentialInstanceConfig

A set of Confidential Instance options. Corresponds to the JSON property confidentialInstanceConfig



714
715
716
# File 'lib/google/apis/notebooks_v2/classes.rb', line 714

def confidential_instance_config
  @confidential_instance_config
end

#container_imageGoogle::Apis::NotebooksV2::ContainerImage

Definition of a container image for starting a notebook instance with the environment installed in a container. Corresponds to the JSON property containerImage



720
721
722
# File 'lib/google/apis/notebooks_v2/classes.rb', line 720

def container_image
  @container_image
end

#data_disksArray<Google::Apis::NotebooksV2::DataDisk>

Optional. Data disks attached to the VM instance. Currently supports only one data disk. Corresponds to the JSON property dataDisks



726
727
728
# File 'lib/google/apis/notebooks_v2/classes.rb', line 726

def data_disks
  @data_disks
end

#disable_public_ipBoolean Also known as: disable_public_ip?

Optional. If true, no external IP will be assigned to this VM instance. Corresponds to the JSON property disablePublicIp

Returns:

  • (Boolean)


731
732
733
# File 'lib/google/apis/notebooks_v2/classes.rb', line 731

def disable_public_ip
  @disable_public_ip
end

#enable_ip_forwardingBoolean Also known as: enable_ip_forwarding?

Optional. Flag to enable ip forwarding or not, default false/off. https:// cloud.google.com/vpc/docs/using-routes#canipforward Corresponds to the JSON property enableIpForwarding

Returns:

  • (Boolean)


738
739
740
# File 'lib/google/apis/notebooks_v2/classes.rb', line 738

def enable_ip_forwarding
  @enable_ip_forwarding
end

#gpu_driver_configGoogle::Apis::NotebooksV2::GpuDriverConfig

A GPU driver configuration Corresponds to the JSON property gpuDriverConfig



744
745
746
# File 'lib/google/apis/notebooks_v2/classes.rb', line 744

def gpu_driver_config
  @gpu_driver_config
end

#instance_idString

Output only. The unique ID of the Compute Engine instance resource. Corresponds to the JSON property instanceId

Returns:

  • (String)


749
750
751
# File 'lib/google/apis/notebooks_v2/classes.rb', line 749

def instance_id
  @instance_id
end

#machine_typeString

Optional. The machine type of the VM instance. https://cloud.google.com/ compute/docs/machine-resource Corresponds to the JSON property machineType

Returns:

  • (String)


755
756
757
# File 'lib/google/apis/notebooks_v2/classes.rb', line 755

def machine_type
  @machine_type
end

#metadataHash<String,String>

Optional. Custom metadata to apply to this instance. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,String>)


760
761
762
# File 'lib/google/apis/notebooks_v2/classes.rb', line 760

def 
  @metadata
end

#min_cpu_platformString

Optional. The minimum CPU platform to use for this instance. The list of valid values can be found in https://cloud.google.com/compute/docs/instances/specify- min-cpu-platform#availablezones Corresponds to the JSON property minCpuPlatform

Returns:

  • (String)


767
768
769
# File 'lib/google/apis/notebooks_v2/classes.rb', line 767

def min_cpu_platform
  @min_cpu_platform
end

#network_interfacesArray<Google::Apis::NotebooksV2::NetworkInterface>

Optional. The network interfaces for the VM. Supports only one interface. Corresponds to the JSON property networkInterfaces



772
773
774
# File 'lib/google/apis/notebooks_v2/classes.rb', line 772

def network_interfaces
  @network_interfaces
end

#reservation_affinityGoogle::Apis::NotebooksV2::ReservationAffinity

A reservation that an instance can consume from. Corresponds to the JSON property reservationAffinity



777
778
779
# File 'lib/google/apis/notebooks_v2/classes.rb', line 777

def reservation_affinity
  @reservation_affinity
end

#service_accountsArray<Google::Apis::NotebooksV2::ServiceAccount>

Optional. The service account that serves as an identity for the VM instance. Currently supports only one service account. Corresponds to the JSON property serviceAccounts



783
784
785
# File 'lib/google/apis/notebooks_v2/classes.rb', line 783

def service_accounts
  @service_accounts
end

#shielded_instance_configGoogle::Apis::NotebooksV2::ShieldedInstanceConfig

A set of Shielded Instance options. See Images using supported Shielded VM features. Not all combinations are valid. Corresponds to the JSON property shieldedInstanceConfig



790
791
792
# File 'lib/google/apis/notebooks_v2/classes.rb', line 790

def shielded_instance_config
  @shielded_instance_config
end

#tagsArray<String>

Optional. The Compute Engine network tags to add to runtime (see Add network tags). Corresponds to the JSON property tags

Returns:

  • (Array<String>)


796
797
798
# File 'lib/google/apis/notebooks_v2/classes.rb', line 796

def tags
  @tags
end

#vm_imageGoogle::Apis::NotebooksV2::VmImage

Definition of a custom Compute Engine virtual machine image for starting a notebook instance with the environment installed directly on the VM. Corresponds to the JSON property vmImage



802
803
804
# File 'lib/google/apis/notebooks_v2/classes.rb', line 802

def vm_image
  @vm_image
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
# File 'lib/google/apis/notebooks_v2/classes.rb', line 809

def update!(**args)
  @accelerator_configs = args[:accelerator_configs] if args.key?(:accelerator_configs)
  @boot_disk = args[:boot_disk] if args.key?(:boot_disk)
  @confidential_instance_config = args[:confidential_instance_config] if args.key?(:confidential_instance_config)
  @container_image = args[:container_image] if args.key?(:container_image)
  @data_disks = args[:data_disks] if args.key?(:data_disks)
  @disable_public_ip = args[:disable_public_ip] if args.key?(:disable_public_ip)
  @enable_ip_forwarding = args[:enable_ip_forwarding] if args.key?(:enable_ip_forwarding)
  @gpu_driver_config = args[:gpu_driver_config] if args.key?(:gpu_driver_config)
  @instance_id = args[:instance_id] if args.key?(:instance_id)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
  @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces)
  @reservation_affinity = args[:reservation_affinity] if args.key?(:reservation_affinity)
  @service_accounts = args[:service_accounts] if args.key?(:service_accounts)
  @shielded_instance_config = args[:shielded_instance_config] if args.key?(:shielded_instance_config)
  @tags = args[:tags] if args.key?(:tags)
  @vm_image = args[:vm_image] if args.key?(:vm_image)
end