Class: Google::Apis::NotebooksV1::VirtualMachineConfig
- Inherits:
-
Object
- Object
- Google::Apis::NotebooksV1::VirtualMachineConfig
- 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 config settings for virtual machine.
Instance Attribute Summary collapse
-
#accelerator_config ⇒ Google::Apis::NotebooksV1::RuntimeAcceleratorConfig
Definition of the types of hardware accelerators that can be used.
-
#boot_image ⇒ Google::Apis::NotebooksV1::BootImage
Definition of the boot image used by the Runtime.
-
#container_images ⇒ Array<Google::Apis::NotebooksV1::ContainerImage>
Optional.
-
#data_disk ⇒ Google::Apis::NotebooksV1::LocalDisk
A Local attached disk resource.
-
#encryption_config ⇒ Google::Apis::NotebooksV1::EncryptionConfig
Represents a custom encryption key configuration that can be applied to a resource.
-
#guest_attributes ⇒ Hash<String,String>
Output only.
-
#internal_ip_only ⇒ Boolean
(also: #internal_ip_only?)
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#machine_type ⇒ String
Required.
-
#metadata ⇒ Hash<String,String>
Optional.
-
#network ⇒ String
Optional.
-
#nic_type ⇒ String
Optional.
-
#reserved_ip_range ⇒ String
Optional.
-
#shielded_instance_config ⇒ Google::Apis::NotebooksV1::RuntimeShieldedInstanceConfig
A set of Shielded Instance options.
-
#subnet ⇒ String
Optional.
-
#tags ⇒ Array<String>
Optional.
-
#zone ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ VirtualMachineConfig
constructor
A new instance of VirtualMachineConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ VirtualMachineConfig
Returns a new instance of VirtualMachineConfig.
3474 3475 3476 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3474 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerator_config ⇒ Google::Apis::NotebooksV1::RuntimeAcceleratorConfig
Definition of the types of hardware accelerators that can be used. See
Compute Engine AcceleratorTypes. Examples: * nvidia-tesla-k80
* nvidia-
tesla-p100
* nvidia-tesla-v100
* nvidia-tesla-p4
* nvidia-tesla-t4
*
nvidia-tesla-a100
Corresponds to the JSON property acceleratorConfig
3349 3350 3351 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3349 def accelerator_config @accelerator_config end |
#boot_image ⇒ Google::Apis::NotebooksV1::BootImage
Definition of the boot image used by the Runtime. Used to facilitate runtime
upgradeability.
Corresponds to the JSON property bootImage
3355 3356 3357 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3355 def boot_image @boot_image end |
#container_images ⇒ Array<Google::Apis::NotebooksV1::ContainerImage>
Optional. Use a list of container images to use as Kernels in the notebook
instance.
Corresponds to the JSON property containerImages
3361 3362 3363 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3361 def container_images @container_images end |
#data_disk ⇒ Google::Apis::NotebooksV1::LocalDisk
A Local attached disk resource.
Corresponds to the JSON property dataDisk
3366 3367 3368 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3366 def data_disk @data_disk end |
#encryption_config ⇒ Google::Apis::NotebooksV1::EncryptionConfig
Represents a custom encryption key configuration that can be applied to a
resource. This will encrypt all disks in Virtual Machine.
Corresponds to the JSON property encryptionConfig
3372 3373 3374 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3372 def encryption_config @encryption_config end |
#guest_attributes ⇒ Hash<String,String>
Output only. The Compute Engine guest attributes. (see Project and instance
guest attributes).
Corresponds to the JSON property guestAttributes
3379 3380 3381 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3379 def guest_attributes @guest_attributes end |
#internal_ip_only ⇒ Boolean Also known as: internal_ip_only?
Optional. If true, runtime will only have internal IP addresses. By default,
runtimes are not restricted to internal IP addresses, and will have ephemeral
external IP addresses assigned to each vm. This internal_ip_only
restriction
can only be enabled for subnetwork enabled networks, and all dependencies must
be configured to be accessible without external IP addresses.
Corresponds to the JSON property internalIpOnly
3388 3389 3390 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3388 def internal_ip_only @internal_ip_only end |
#labels ⇒ Hash<String,String>
Optional. The labels to associate with this runtime. Label keys must
contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must
contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.
Corresponds to the JSON property labels
3398 3399 3400 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3398 def labels @labels end |
#machine_type ⇒ String
Required. The Compute Engine machine type used for runtimes. Short name is
valid. Examples: * n1-standard-2
* e2-standard-8
Corresponds to the JSON property machineType
3404 3405 3406 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3404 def machine_type @machine_type end |
#metadata ⇒ Hash<String,String>
Optional. The Compute Engine metadata entries to add to virtual machine. (see
Project and instance metadata).
Corresponds to the JSON property metadata
3411 3412 3413 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3411 def @metadata end |
#network ⇒ String
Optional. The Compute Engine network to be used for machine communications.
Cannot be specified with subnetwork. If neither network
nor subnet
is
specified, the "default" network of the project is used, if it exists. A full
URL or partial URI. Examples: * https://www.googleapis.com/compute/v1/
projects/[project_id]/global/networks/default
* projects/[project_id]/global/
networks/default
Runtimes are managed resources inside Google Infrastructure.
Runtimes support the following network configurations: * Google Managed
Network (Network & subnet are empty) * Consumer Project VPC (network & subnet
are required). Requires configuring Private Service Access. * Shared VPC (
network & subnet are required). Requires configuring Private Service Access.
Corresponds to the JSON property network
3425 3426 3427 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3425 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
3431 3432 3433 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3431 def nic_type @nic_type end |
#reserved_ip_range ⇒ String
Optional. Reserved IP Range name is used for VPC Peering. The subnetwork
allocation will use the range name if it's assigned. Example: managed-
notebooks-range-c PEERING_RANGE_NAME_3=managed-notebooks-range-c gcloud
compute addresses create $PEERING_RANGE_NAME_3 \ --global \ --prefix-length=24
\ --description="Google Cloud Managed Notebooks Range 24 c" \ --network=$
NETWORK \ --addresses=192.168.0.0 \ --purpose=VPC_PEERING Field value will be:
managed-notebooks-range-c
Corresponds to the JSON property reservedIpRange
3442 3443 3444 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3442 def reserved_ip_range @reserved_ip_range end |
#shielded_instance_config ⇒ Google::Apis::NotebooksV1::RuntimeShieldedInstanceConfig
A set of Shielded Instance options. See Images using supported Shielded VM
features. Not all combinations are valid.
Corresponds to the JSON property shieldedInstanceConfig
3449 3450 3451 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3449 def shielded_instance_config @shielded_instance_config end |
#subnet ⇒ String
Optional. The Compute Engine subnetwork to be used for machine communications.
Cannot be specified with network. A full URL or partial URI are valid.
Examples: * https://www.googleapis.com/compute/v1/projects/[project_id]/
regions/us-east1/subnetworks/sub0
* projects/[project_id]/regions/us-east1/
subnetworks/sub0
Corresponds to the JSON property subnet
3458 3459 3460 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3458 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
3464 3465 3466 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3464 def @tags end |
#zone ⇒ String
Output only. The zone where the virtual machine is located. If using regional
request, the notebooks service will pick a location in the corresponding
runtime region. On a get request, zone will always be present. Example: * us-
central1-b
Corresponds to the JSON property zone
3472 3473 3474 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3472 def zone @zone end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 |
# File 'lib/google/apis/notebooks_v1/classes.rb', line 3479 def update!(**args) @accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config) @boot_image = args[:boot_image] if args.key?(:boot_image) @container_images = args[:container_images] if args.key?(:container_images) @data_disk = args[:data_disk] if args.key?(:data_disk) @encryption_config = args[:encryption_config] if args.key?(:encryption_config) @guest_attributes = args[:guest_attributes] if args.key?(:guest_attributes) @internal_ip_only = args[:internal_ip_only] if args.key?(:internal_ip_only) @labels = args[:labels] if args.key?(:labels) @machine_type = args[:machine_type] if args.key?(:machine_type) @metadata = args[:metadata] if args.key?(:metadata) @network = args[:network] if args.key?(:network) @nic_type = args[:nic_type] if args.key?(:nic_type) @reserved_ip_range = args[:reserved_ip_range] if args.key?(:reserved_ip_range) @shielded_instance_config = args[:shielded_instance_config] if args.key?(:shielded_instance_config) @subnet = args[:subnet] if args.key?(:subnet) @tags = args[:tags] if args.key?(:tags) @zone = args[:zone] if args.key?(:zone) end |