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.



702
703
704
# File 'lib/google/apis/notebooks_v2/classes.rb', line 702

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



617
618
619
# File 'lib/google/apis/notebooks_v2/classes.rb', line 617

def accelerator_configs
  @accelerator_configs
end

#boot_diskGoogle::Apis::NotebooksV2::BootDisk

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



622
623
624
# File 'lib/google/apis/notebooks_v2/classes.rb', line 622

def boot_disk
  @boot_disk
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



628
629
630
# File 'lib/google/apis/notebooks_v2/classes.rb', line 628

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



634
635
636
# File 'lib/google/apis/notebooks_v2/classes.rb', line 634

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)


639
640
641
# File 'lib/google/apis/notebooks_v2/classes.rb', line 639

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)


646
647
648
# File 'lib/google/apis/notebooks_v2/classes.rb', line 646

def enable_ip_forwarding
  @enable_ip_forwarding
end

#gpu_driver_configGoogle::Apis::NotebooksV2::GpuDriverConfig

A GPU driver configuration Corresponds to the JSON property gpuDriverConfig



652
653
654
# File 'lib/google/apis/notebooks_v2/classes.rb', line 652

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


658
659
660
# File 'lib/google/apis/notebooks_v2/classes.rb', line 658

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


663
664
665
# File 'lib/google/apis/notebooks_v2/classes.rb', line 663

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)


670
671
672
# File 'lib/google/apis/notebooks_v2/classes.rb', line 670

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



675
676
677
# File 'lib/google/apis/notebooks_v2/classes.rb', line 675

def network_interfaces
  @network_interfaces
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



681
682
683
# File 'lib/google/apis/notebooks_v2/classes.rb', line 681

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



688
689
690
# File 'lib/google/apis/notebooks_v2/classes.rb', line 688

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


694
695
696
# File 'lib/google/apis/notebooks_v2/classes.rb', line 694

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



700
701
702
# File 'lib/google/apis/notebooks_v2/classes.rb', line 700

def vm_image
  @vm_image
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'lib/google/apis/notebooks_v2/classes.rb', line 707

def update!(**args)
  @accelerator_configs = args[:accelerator_configs] if args.key?(:accelerator_configs)
  @boot_disk = args[:boot_disk] if args.key?(:boot_disk)
  @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)
  @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)
  @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