Class: Google::Apis::NotebooksV1::Instance

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

Overview

The definition of a notebook instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Instance

Returns a new instance of Instance.



608
609
610
# File 'generated/google/apis/notebooks_v1/classes.rb', line 608

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

Instance Attribute Details

#accelerator_configGoogle::Apis::NotebooksV1::AcceleratorConfig

Definition of a hardware accelerator. Note that not all combinations of type and core_count are valid. Check GPUs on Compute Engine to find a valid combination. TPUs are not supported. Corresponds to the JSON property acceleratorConfig



433
434
435
# File 'generated/google/apis/notebooks_v1/classes.rb', line 433

def accelerator_config
  @accelerator_config
end

#boot_disk_size_gbFixnum

Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100. Corresponds to the JSON property bootDiskSizeGb

Returns:

  • (Fixnum)


440
441
442
# File 'generated/google/apis/notebooks_v1/classes.rb', line 440

def boot_disk_size_gb
  @boot_disk_size_gb
end

#boot_disk_typeString

Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (PD_STANDARD). Corresponds to the JSON property bootDiskType

Returns:

  • (String)


446
447
448
# File 'generated/google/apis/notebooks_v1/classes.rb', line 446

def boot_disk_type
  @boot_disk_type
end

#container_imageGoogle::Apis::NotebooksV1::ContainerImage

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



452
453
454
# File 'generated/google/apis/notebooks_v1/classes.rb', line 452

def container_image
  @container_image
end

#create_timeString

Output only. Instance creation time. Corresponds to the JSON property createTime

Returns:

  • (String)


457
458
459
# File 'generated/google/apis/notebooks_v1/classes.rb', line 457

def create_time
  @create_time
end

#custom_gpu_driver_pathString

Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers. Corresponds to the JSON property customGpuDriverPath

Returns:

  • (String)


463
464
465
# File 'generated/google/apis/notebooks_v1/classes.rb', line 463

def custom_gpu_driver_path
  @custom_gpu_driver_path
end

#data_disk_size_gbFixnum

Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100. Corresponds to the JSON property dataDiskSizeGb

Returns:

  • (Fixnum)


470
471
472
# File 'generated/google/apis/notebooks_v1/classes.rb', line 470

def data_disk_size_gb
  @data_disk_size_gb
end

#data_disk_typeString

Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (PD_STANDARD). Corresponds to the JSON property dataDiskType

Returns:

  • (String)


476
477
478
# File 'generated/google/apis/notebooks_v1/classes.rb', line 476

def data_disk_type
  @data_disk_type
end

#disk_encryptionString

Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. Corresponds to the JSON property diskEncryption

Returns:

  • (String)


482
483
484
# File 'generated/google/apis/notebooks_v1/classes.rb', line 482

def disk_encryption
  @disk_encryption
end

#disksArray<Google::Apis::NotebooksV1::Disk>

Output only. Attached disks to notebook instance. Corresponds to the JSON property disks



487
488
489
# File 'generated/google/apis/notebooks_v1/classes.rb', line 487

def disks
  @disks
end

#install_gpu_driverBoolean Also known as: install_gpu_driver?

Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs. Corresponds to the JSON property installGpuDriver

Returns:

  • (Boolean)


494
495
496
# File 'generated/google/apis/notebooks_v1/classes.rb', line 494

def install_gpu_driver
  @install_gpu_driver
end

#instance_ownersArray<String>

Input only. The owner of this instance after creation. Format: alias@example. com Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance. Corresponds to the JSON property instanceOwners

Returns:

  • (Array<String>)


502
503
504
# File 'generated/google/apis/notebooks_v1/classes.rb', line 502

def instance_owners
  @instance_owners
end

#kms_keyString

Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: projects/project_id/locations/location/ keyRings/key_ring_id/cryptoKeys/key_id`Learn more about [using your own encryption keys](/kms/docs/quickstart). Corresponds to the JSON propertykmsKey`

Returns:

  • (String)


510
511
512
# File 'generated/google/apis/notebooks_v1/classes.rb', line 510

def kms_key
  @kms_key
end

#labelsHash<String,String>

Labels to apply to this instance. These can be later modified by the setLabels method. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


516
517
518
# File 'generated/google/apis/notebooks_v1/classes.rb', line 516

def labels
  @labels
end

#machine_typeString

Required. The Compute Engine machine type of this instance. Corresponds to the JSON property machineType

Returns:

  • (String)


522
523
524
# File 'generated/google/apis/notebooks_v1/classes.rb', line 522

def machine_type
  @machine_type
end

#metadataHash<String,String>

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

Returns:

  • (Hash<String,String>)


527
528
529
# File 'generated/google/apis/notebooks_v1/classes.rb', line 527

def 
  @metadata
end

#nameString

Output only. The name of this notebook instance. Format: projects/project_id /locations/location/instances/instance_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


533
534
535
# File 'generated/google/apis/notebooks_v1/classes.rb', line 533

def name
  @name
end

#networkString

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

Returns:

  • (String)


539
540
541
# File 'generated/google/apis/notebooks_v1/classes.rb', line 539

def network
  @network
end

#no_proxy_accessBoolean Also known as: no_proxy_access?

If true, the notebook instance will not register with the proxy. Corresponds to the JSON property noProxyAccess

Returns:

  • (Boolean)


544
545
546
# File 'generated/google/apis/notebooks_v1/classes.rb', line 544

def no_proxy_access
  @no_proxy_access
end

#no_public_ipBoolean Also known as: no_public_ip?

If true, no public IP will be assigned to this instance. Corresponds to the JSON property noPublicIp

Returns:

  • (Boolean)


550
551
552
# File 'generated/google/apis/notebooks_v1/classes.rb', line 550

def no_public_ip
  @no_public_ip
end

#no_remove_data_diskBoolean Also known as: no_remove_data_disk?

Input only. If true, the data disk will not be auto deleted when deleting the instance. Corresponds to the JSON property noRemoveDataDisk

Returns:

  • (Boolean)


557
558
559
# File 'generated/google/apis/notebooks_v1/classes.rb', line 557

def no_remove_data_disk
  @no_remove_data_disk
end

#post_startup_scriptString

Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (gs://path-to-file/file- name). Corresponds to the JSON property postStartupScript

Returns:

  • (String)


565
566
567
# File 'generated/google/apis/notebooks_v1/classes.rb', line 565

def post_startup_script
  @post_startup_script
end

#proxy_uriString

Output only. The proxy endpoint that is used to access the Jupyter notebook. Corresponds to the JSON property proxyUri

Returns:

  • (String)


570
571
572
# File 'generated/google/apis/notebooks_v1/classes.rb', line 570

def proxy_uri
  @proxy_uri
end

#service_accountString

The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the Compute Engine default service account is used. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


579
580
581
# File 'generated/google/apis/notebooks_v1/classes.rb', line 579

def 
  @service_account
end

#stateString

Output only. The state of this instance. Corresponds to the JSON property state

Returns:

  • (String)


584
585
586
# File 'generated/google/apis/notebooks_v1/classes.rb', line 584

def state
  @state
end

#subnetString

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

Returns:

  • (String)


590
591
592
# File 'generated/google/apis/notebooks_v1/classes.rb', line 590

def subnet
  @subnet
end

#update_timeString

Output only. Instance update time. Corresponds to the JSON property updateTime

Returns:

  • (String)


595
596
597
# File 'generated/google/apis/notebooks_v1/classes.rb', line 595

def update_time
  @update_time
end

#upgrade_historyArray<Google::Apis::NotebooksV1::UpgradeHistoryEntry>

The upgrade history of this instance. Corresponds to the JSON property upgradeHistory



600
601
602
# File 'generated/google/apis/notebooks_v1/classes.rb', line 600

def upgrade_history
  @upgrade_history
end

#vm_imageGoogle::Apis::NotebooksV1::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



606
607
608
# File 'generated/google/apis/notebooks_v1/classes.rb', line 606

def vm_image
  @vm_image
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
# File 'generated/google/apis/notebooks_v1/classes.rb', line 613

def update!(**args)
  @accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config)
  @boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb)
  @boot_disk_type = args[:boot_disk_type] if args.key?(:boot_disk_type)
  @container_image = args[:container_image] if args.key?(:container_image)
  @create_time = args[:create_time] if args.key?(:create_time)
  @custom_gpu_driver_path = args[:custom_gpu_driver_path] if args.key?(:custom_gpu_driver_path)
  @data_disk_size_gb = args[:data_disk_size_gb] if args.key?(:data_disk_size_gb)
  @data_disk_type = args[:data_disk_type] if args.key?(:data_disk_type)
  @disk_encryption = args[:disk_encryption] if args.key?(:disk_encryption)
  @disks = args[:disks] if args.key?(:disks)
  @install_gpu_driver = args[:install_gpu_driver] if args.key?(:install_gpu_driver)
  @instance_owners = args[:instance_owners] if args.key?(:instance_owners)
  @kms_key = args[:kms_key] if args.key?(:kms_key)
  @labels = args[:labels] if args.key?(:labels)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @no_proxy_access = args[:no_proxy_access] if args.key?(:no_proxy_access)
  @no_public_ip = args[:no_public_ip] if args.key?(:no_public_ip)
  @no_remove_data_disk = args[:no_remove_data_disk] if args.key?(:no_remove_data_disk)
  @post_startup_script = args[:post_startup_script] if args.key?(:post_startup_script)
  @proxy_uri = args[:proxy_uri] if args.key?(:proxy_uri)
  @service_account = args[:service_account] if args.key?(:service_account)
  @state = args[:state] if args.key?(:state)
  @subnet = args[:subnet] if args.key?(:subnet)
  @update_time = args[:update_time] if args.key?(:update_time)
  @upgrade_history = args[:upgrade_history] if args.key?(:upgrade_history)
  @vm_image = args[:vm_image] if args.key?(:vm_image)
end