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.



672
673
674
# File 'lib/google/apis/notebooks_v2/classes.rb', line 672

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



594
595
596
# File 'lib/google/apis/notebooks_v2/classes.rb', line 594

def accelerator_configs
  @accelerator_configs
end

#boot_diskGoogle::Apis::NotebooksV2::BootDisk

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



599
600
601
# File 'lib/google/apis/notebooks_v2/classes.rb', line 599

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



605
606
607
# File 'lib/google/apis/notebooks_v2/classes.rb', line 605

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



611
612
613
# File 'lib/google/apis/notebooks_v2/classes.rb', line 611

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)


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

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)


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

def enable_ip_forwarding
  @enable_ip_forwarding
end

#gpu_driver_configGoogle::Apis::NotebooksV2::GpuDriverConfig

A GPU driver configuration Corresponds to the JSON property gpuDriverConfig



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

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)


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

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


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

def 
  @metadata
end

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

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



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

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



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

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



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

def shielded_instance_config
  @shielded_instance_config
end

#tagsArray<String>

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

Returns:

  • (Array<String>)


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

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



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

def vm_image
  @vm_image
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/google/apis/notebooks_v2/classes.rb', line 677

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