Class: Google::Apis::NotebooksV1::Instance
- Inherits:
-
Object
- Object
- Google::Apis::NotebooksV1::Instance
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/notebooks_v1/classes.rb,
lib/google/apis/notebooks_v1/representations.rb,
lib/google/apis/notebooks_v1/representations.rb
Overview
The definition of a notebook instance.
Instance Attribute Summary collapse
-
#accelerator_config ⇒ Google::Apis::NotebooksV1::AcceleratorConfig
Definition of a hardware accelerator.
-
#boot_disk_size_gb ⇒ Fixnum
Input only.
-
#boot_disk_type ⇒ String
Input only.
-
#can_ip_forward ⇒ Boolean
(also: #can_ip_forward?)
Optional.
-
#container_image ⇒ Google::Apis::NotebooksV1::ContainerImage
Definition of a container image for starting a notebook instance with the environment installed in a container.
-
#create_time ⇒ String
Output only.
-
#creator ⇒ String
Output only.
-
#custom_gpu_driver_path ⇒ String
Specify a custom Cloud Storage path where the GPU driver is stored.
-
#data_disk_size_gb ⇒ Fixnum
Input only.
-
#data_disk_type ⇒ String
Input only.
-
#disk_encryption ⇒ String
Input only.
-
#disks ⇒ Array<Google::Apis::NotebooksV1::Disk>
Output only.
-
#install_gpu_driver ⇒ Boolean
(also: #install_gpu_driver?)
Whether the end user authorizes Google Cloud to install GPU driver on this instance.
-
#instance_migration_eligibility ⇒ Google::Apis::NotebooksV1::InstanceMigrationEligibility
InstanceMigrationEligibility represents the feasibility information of a migration from UmN to WbI.
-
#instance_owners ⇒ Array<String>
Input only.
-
#kms_key ⇒ String
Input only.
-
#labels ⇒ Hash<String,String>
Labels to apply to this instance.
-
#machine_type ⇒ String
Required.
-
#metadata ⇒ Hash<String,String>
Custom metadata to apply to this instance.
-
#migrated ⇒ Boolean
(also: #migrated?)
Output only.
-
#name ⇒ String
Output only.
-
#network ⇒ String
The name of the VPC that this instance is in.
-
#nic_type ⇒ String
Optional.
-
#no_proxy_access ⇒ Boolean
(also: #no_proxy_access?)
If true, the notebook instance will not register with the proxy.
-
#no_public_ip ⇒ Boolean
(also: #no_public_ip?)
If true, no external IP will be assigned to this instance.
-
#no_remove_data_disk ⇒ Boolean
(also: #no_remove_data_disk?)
Input only.
-
#post_startup_script ⇒ String
Path to a Bash script that automatically runs after a notebook instance fully boots up.
-
#proxy_uri ⇒ String
Output only.
-
#reservation_affinity ⇒ Google::Apis::NotebooksV1::ReservationAffinity
Reservation Affinity for consuming Zonal reservation.
-
#service_account ⇒ String
The service account on this instance, giving access to other Google Cloud services.
-
#service_account_scopes ⇒ Array<String>
Optional.
-
#shielded_instance_config ⇒ Google::Apis::NotebooksV1::ShieldedInstanceConfig
A set of Shielded Instance options.
-
#state ⇒ String
Output only.
-
#subnet ⇒ String
The name of the subnet that this instance is in.
-
#tags ⇒ Array<String>
Optional.
-
#update_time ⇒ String
Output only.
-
#upgrade_history ⇒ Array<Google::Apis::NotebooksV1::UpgradeHistoryEntry>
The upgrade history of this instance.
-
#vm_image ⇒ Google::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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Instance
constructor
A new instance of Instance.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Instance
Returns a new instance of Instance.
1103 1104 1105 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1103 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerator_config ⇒ Google::Apis::NotebooksV1::AcceleratorConfig
Definition of a hardware accelerator. Note that not all combinations of type
and core_count are valid. See GPUs on Compute Engine to find a valid combination. TPUs are not
supported.
Corresponds to the JSON property acceleratorConfig
867 868 869 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 867 def accelerator_config @accelerator_config end |
#boot_disk_size_gb ⇒ Fixnum
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
874 875 876 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 874 def boot_disk_size_gb @boot_disk_size_gb end |
#boot_disk_type ⇒ String
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
880 881 882 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 880 def boot_disk_type @boot_disk_type end |
#can_ip_forward ⇒ Boolean Also known as: can_ip_forward?
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 canIpForward
886 887 888 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 886 def can_ip_forward @can_ip_forward end |
#container_image ⇒ Google::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
893 894 895 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 893 def container_image @container_image end |
#create_time ⇒ String
Output only. Instance creation time.
Corresponds to the JSON property createTime
898 899 900 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 898 def create_time @create_time end |
#creator ⇒ String
Output only. Email address of entity that sent original CreateInstance request.
Corresponds to the JSON property creator
903 904 905 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 903 def creator @creator end |
#custom_gpu_driver_path ⇒ String
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
909 910 911 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 909 def custom_gpu_driver_path @custom_gpu_driver_path end |
#data_disk_size_gb ⇒ Fixnum
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
916 917 918 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 916 def data_disk_size_gb @data_disk_size_gb end |
#data_disk_type ⇒ String
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
922 923 924 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 922 def data_disk_type @data_disk_type end |
#disk_encryption ⇒ String
Input only. Disk encryption method used on the boot and data disks, defaults
to GMEK.
Corresponds to the JSON property diskEncryption
928 929 930 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 928 def disk_encryption @disk_encryption end |
#disks ⇒ Array<Google::Apis::NotebooksV1::Disk>
Output only. Attached disks to notebook instance.
Corresponds to the JSON property disks
933 934 935 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 933 def disks @disks end |
#install_gpu_driver ⇒ Boolean 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
940 941 942 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 940 def install_gpu_driver @install_gpu_driver end |
#instance_migration_eligibility ⇒ Google::Apis::NotebooksV1::InstanceMigrationEligibility
InstanceMigrationEligibility represents the feasibility information of a
migration from UmN to WbI.
Corresponds to the JSON property instanceMigrationEligibility
947 948 949 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 947 def instance_migration_eligibility @instance_migration_eligibility end |
#instance_owners ⇒ Array<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
954 955 956 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 954 def instance_owners @instance_owners end |
#kms_key ⇒ String
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`
962 963 964 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 962 def kms_key @kms_key end |
#labels ⇒ Hash<String,String>
Labels to apply to this instance. These can be later modified by the setLabels
method.
Corresponds to the JSON property labels
968 969 970 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 968 def labels @labels end |
#machine_type ⇒ String
Required. The Compute Engine machine type of this instance.
Corresponds to the JSON property machineType
974 975 976 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 974 def machine_type @machine_type end |
#metadata ⇒ Hash<String,String>
Custom metadata to apply to this instance. For example, to specify a Cloud
Storage bucket for automatic backup, you can use the gcs-data-bucket
metadata tag. Format: "--metadata=gcs-data-bucket=BUCKET''".
Corresponds to the JSON property metadata
981 982 983 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 981 def @metadata end |
#migrated ⇒ Boolean Also known as: migrated?
Output only. Bool indicating whether this notebook has been migrated to a
Workbench Instance
Corresponds to the JSON property migrated
987 988 989 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 987 def migrated @migrated end |
#name ⇒ String
Output only. The name of this notebook instance. Format: projects/project_id
/locations/location/instances/instance_id`
Corresponds to the JSON propertyname`
994 995 996 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 994 def name @name end |
#network ⇒ String
The name of the VPC that this instance is in. Format: projects/project_id/
global/networks/network_id`
Corresponds to the JSON propertynetwork`
1000 1001 1002 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1000 def network @network end |
#nic_type ⇒ String
Optional. The type of vNIC to be used on this interface. This may be gVNIC or
VirtioNet.
Corresponds to the JSON property nicType
1006 1007 1008 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1006 def nic_type @nic_type end |
#no_proxy_access ⇒ Boolean Also known as: no_proxy_access?
If true, the notebook instance will not register with the proxy.
Corresponds to the JSON property noProxyAccess
1011 1012 1013 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1011 def no_proxy_access @no_proxy_access end |
#no_public_ip ⇒ Boolean Also known as: no_public_ip?
If true, no external IP will be assigned to this instance.
Corresponds to the JSON property noPublicIp
1017 1018 1019 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1017 def no_public_ip @no_public_ip end |
#no_remove_data_disk ⇒ Boolean 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
1024 1025 1026 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1024 def no_remove_data_disk @no_remove_data_disk end |
#post_startup_script ⇒ String
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
1032 1033 1034 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1032 def post_startup_script @post_startup_script end |
#proxy_uri ⇒ String
Output only. The proxy endpoint that is used to access the Jupyter notebook.
Corresponds to the JSON property proxyUri
1037 1038 1039 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1037 def proxy_uri @proxy_uri end |
#reservation_affinity ⇒ Google::Apis::NotebooksV1::ReservationAffinity
Reservation Affinity for consuming Zonal reservation.
Corresponds to the JSON property reservationAffinity
1042 1043 1044 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1042 def reservation_affinity @reservation_affinity end |
#service_account ⇒ String
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
1051 1052 1053 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1051 def service_account @service_account end |
#service_account_scopes ⇒ Array<String>
Optional. The URIs of service account scopes to be included in Compute Engine
instances. If not specified, the following scopes are defined: - https://
www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/
userinfo.email If not using default scopes, you need at least: https://www.
googleapis.com/auth/compute
Corresponds to the JSON property serviceAccountScopes
1061 1062 1063 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1061 def service_account_scopes @service_account_scopes end |
#shielded_instance_config ⇒ Google::Apis::NotebooksV1::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
1068 1069 1070 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1068 def shielded_instance_config @shielded_instance_config end |
#state ⇒ String
Output only. The state of this instance.
Corresponds to the JSON property state
1073 1074 1075 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1073 def state @state end |
#subnet ⇒ String
The name of the subnet that this instance is in. Format: projects/project_id
/regions/region/subnetworks/subnetwork_id`
Corresponds to the JSON propertysubnet`
1079 1080 1081 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1079 def subnet @subnet end |
#tags ⇒ Array<String>
Optional. The Compute Engine tags to add to runtime (see Tagging instances).
Corresponds to the JSON property tags
1085 1086 1087 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1085 def @tags end |
#update_time ⇒ String
Output only. Instance update time.
Corresponds to the JSON property updateTime
1090 1091 1092 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1090 def update_time @update_time end |
#upgrade_history ⇒ Array<Google::Apis::NotebooksV1::UpgradeHistoryEntry>
The upgrade history of this instance.
Corresponds to the JSON property upgradeHistory
1095 1096 1097 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1095 def upgrade_history @upgrade_history end |
#vm_image ⇒ Google::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
1101 1102 1103 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1101 def vm_image @vm_image end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 1108 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) @can_ip_forward = args[:can_ip_forward] if args.key?(:can_ip_forward) @container_image = args[:container_image] if args.key?(:container_image) @create_time = args[:create_time] if args.key?(:create_time) @creator = args[:creator] if args.key?(:creator) @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_migration_eligibility = args[:instance_migration_eligibility] if args.key?(:instance_migration_eligibility) @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) @migrated = args[:migrated] if args.key?(:migrated) @name = args[:name] if args.key?(:name) @network = args[:network] if args.key?(:network) @nic_type = args[:nic_type] if args.key?(:nic_type) @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) @reservation_affinity = args[:reservation_affinity] if args.key?(:reservation_affinity) @service_account = args[:service_account] if args.key?(:service_account) @service_account_scopes = args[:service_account_scopes] if args.key?(:service_account_scopes) @shielded_instance_config = args[:shielded_instance_config] if args.key?(:shielded_instance_config) @state = args[:state] if args.key?(:state) @subnet = args[:subnet] if args.key?(:subnet) @tags = args[:tags] if args.key?(:tags) @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 |