Class: Google::Apis::WorkstationsV1beta::GceInstance
- Inherits:
-
Object
- Object
- Google::Apis::WorkstationsV1beta::GceInstance
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/workstations_v1beta/classes.rb,
lib/google/apis/workstations_v1beta/representations.rb,
lib/google/apis/workstations_v1beta/representations.rb
Overview
A runtime using a Compute Engine instance.
Instance Attribute Summary collapse
-
#accelerators ⇒ Array<Google::Apis::WorkstationsV1beta::Accelerator>
Optional.
-
#boost_configs ⇒ Array<Google::Apis::WorkstationsV1beta::BoostConfig>
Optional.
-
#boot_disk_size_gb ⇒ Fixnum
Optional.
-
#confidential_instance_config ⇒ Google::Apis::WorkstationsV1beta::GceConfidentialInstanceConfig
A set of Compute Engine Confidential VM instance options.
-
#disable_public_ip_addresses ⇒ Boolean
(also: #disable_public_ip_addresses?)
Optional.
-
#disable_ssh ⇒ Boolean
(also: #disable_ssh?)
Optional.
-
#enable_nested_virtualization ⇒ Boolean
(also: #enable_nested_virtualization?)
Optional.
-
#instance_metadata ⇒ Hash<String,String>
Optional.
-
#machine_type ⇒ String
Optional.
-
#pool_size ⇒ Fixnum
Optional.
-
#pooled_instances ⇒ Fixnum
Output only.
-
#reservation_affinity ⇒ Google::Apis::WorkstationsV1beta::ReservationAffinity
ReservationAffinity is the configuration of the desired reservation from which instances can consume resources.
-
#service_account ⇒ String
Optional.
-
#service_account_scopes ⇒ Array<String>
Optional.
-
#shielded_instance_config ⇒ Google::Apis::WorkstationsV1beta::GceShieldedInstanceConfig
A set of Compute Engine Shielded instance options.
-
#startup_script_uri ⇒ String
Optional.
-
#tags ⇒ Array<String>
Optional.
-
#vm_tags ⇒ Hash<String,String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GceInstance
constructor
A new instance of GceInstance.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GceInstance
Returns a new instance of GceInstance.
765 766 767 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 765 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerators ⇒ Array<Google::Apis::WorkstationsV1beta::Accelerator>
Optional. A list of the type and count of accelerator cards attached to the
instance.
Corresponds to the JSON property accelerators
614 615 616 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 614 def accelerators @accelerators end |
#boost_configs ⇒ Array<Google::Apis::WorkstationsV1beta::BoostConfig>
Optional. A list of the boost configurations that workstations created using
this workstation configuration are allowed to use. If specified, users will
have the option to choose from the list of boost configs when starting a
workstation.
Corresponds to the JSON property boostConfigs
622 623 624 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 622 def boost_configs @boost_configs end |
#boot_disk_size_gb ⇒ Fixnum
Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum
boot disk size is 30 GB. Defaults to 50 GB.
Corresponds to the JSON property bootDiskSizeGb
628 629 630 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 628 def boot_disk_size_gb @boot_disk_size_gb end |
#confidential_instance_config ⇒ Google::Apis::WorkstationsV1beta::GceConfidentialInstanceConfig
A set of Compute Engine Confidential VM instance options.
Corresponds to the JSON property confidentialInstanceConfig
633 634 635 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 633 def confidential_instance_config @confidential_instance_config end |
#disable_public_ip_addresses ⇒ Boolean Also known as: disable_public_ip_addresses?
Optional. When set to true, disables public IP addresses for VMs. If you
disable public IP addresses, you must set up Private Google Access or Cloud
NAT on your network. If you use Private Google Access and you use private.
googleapis.com or restricted.googleapis.com for Container Registry and
Artifact Registry, make sure that you set up DNS records for domains *.gcr.io
and *.pkg.dev. Defaults to false (VMs have public IP addresses).
Corresponds to the JSON property disablePublicIpAddresses
643 644 645 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 643 def disable_public_ip_addresses @disable_public_ip_addresses end |
#disable_ssh ⇒ Boolean Also known as: disable_ssh?
Optional. Whether to disable SSH access to the VM.
Corresponds to the JSON property disableSsh
649 650 651 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 649 def disable_ssh @disable_ssh end |
#enable_nested_virtualization ⇒ Boolean Also known as: enable_nested_virtualization?
Optional. Whether to enable nested virtualization on Cloud Workstations VMs
created using this workstation configuration. Defaults to false. Nested
virtualization lets you run virtual machine (VM) instances inside your
workstation. Before enabling nested virtualization, consider the following
important considerations. Cloud Workstations instances are subject to the
same restrictions as Compute Engine instances: * **
Organization policy*: projects, folders, or organizations may be restricted
from creating nested VMs if the **Disable VM nested virtualization*
constraint is enforced in the organization policy. For more information, see
the Compute Engine section, Checking whether nested virtualization is allowed. * **
Performance*: nested VMs might experience a 10% or greater decrease in
performance for workloads that are CPU-bound and possibly greater than a 10%
decrease for workloads that are input/output bound. * **Machine Type*: nested
virtualization can only be enabled on workstation configurations that specify
a machine_type in the N1 or N2 machine series.
Corresponds to the JSON property enableNestedVirtualization
672 673 674 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 672 def enable_nested_virtualization @enable_nested_virtualization end |
#instance_metadata ⇒ Hash<String,String>
Optional. Custom metadata to apply to Compute Engine instances.
Corresponds to the JSON property instanceMetadata
678 679 680 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 678 def @instance_metadata end |
#machine_type ⇒ String
Optional. The type of machine to use for VM instances—for example, "e2-
standard-4". For more information about machine types that Cloud Workstations
supports, see the list of available machine types.
Corresponds to the JSON property machineType
686 687 688 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 686 def machine_type @machine_type end |
#pool_size ⇒ Fixnum
Optional. The number of VMs that the system should keep idle so that new
workstations can be started quickly for new users. Defaults to 0 in the API.
Corresponds to the JSON property poolSize
692 693 694 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 692 def pool_size @pool_size end |
#pooled_instances ⇒ Fixnum
Output only. Number of instances currently available in the pool for faster
workstation startup.
Corresponds to the JSON property pooledInstances
698 699 700 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 698 def pooled_instances @pooled_instances end |
#reservation_affinity ⇒ Google::Apis::WorkstationsV1beta::ReservationAffinity
ReservationAffinity is the configuration of the desired reservation from which
instances can consume resources.
Corresponds to the JSON property reservationAffinity
704 705 706 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 704 def reservation_affinity @reservation_affinity end |
#service_account ⇒ String
Optional. The email address of the service account for Cloud Workstations VMs
created with this configuration. When specified, be sure that the service
account has logging.logEntries.create and monitoring.timeSeries.create
permissions on the project so it can write logs out to Cloud Logging. If using
a custom container image, the service account must have Artifact Registry
Reader
permission to pull the specified image. If you as the administrator want to be
able to ssh into the underlying VM, you need to set this value to a service
account for which you have the iam.serviceAccounts.actAs permission.
Conversely, if you don't want anyone to be able to ssh into the underlying
VM, use a service account where no one has that permission. If not set, VMs
run with a service account provided by the Cloud Workstations service, and the
image must be publicly accessible.
Corresponds to the JSON property serviceAccount
721 722 723 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 721 def service_account @service_account end |
#service_account_scopes ⇒ Array<String>
Optional. Scopes to grant to the service_account. When specified, users of
workstations under this configuration must have iam.serviceAccounts.actAs on
the service account.
Corresponds to the JSON property serviceAccountScopes
728 729 730 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 728 def service_account_scopes @service_account_scopes end |
#shielded_instance_config ⇒ Google::Apis::WorkstationsV1beta::GceShieldedInstanceConfig
A set of Compute Engine Shielded instance options.
Corresponds to the JSON property shieldedInstanceConfig
733 734 735 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 733 def shielded_instance_config @shielded_instance_config end |
#startup_script_uri ⇒ String
Optional. Link to the startup script stored in Cloud Storage. This script will
be run on the host workstation VM when the VM is created. The URI must be of
the form gs://bucket-name/object-name. If specifying a startup script, the
service account must have Permission to access the bucket and script file in
Cloud Storage. Otherwise, the script must be publicly accessible. Note that the
service regularly updates the OS version of the host VM, and it is the
responsibility of the user to ensure the script stays compatible with the OS
version.
Corresponds to the JSON property startupScriptUri
746 747 748 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 746 def startup_script_uri @startup_script_uri end |
#tags ⇒ Array<String>
Optional. Network tags to add to the Compute Engine VMs backing the
workstations. This option applies network tags to VMs created with this configuration. These
network tags enable the creation of firewall rules.
Corresponds to the JSON property tags
755 756 757 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 755 def @tags end |
#vm_tags ⇒ Hash<String,String>
Optional. Resource manager tags to be bound to this instance. Tag keys and
values have the same definition as resource manager tags. Keys must be in the
format tagKeys/tag_key_id`, and values are in the formattagValues/456.
Corresponds to the JSON propertyvmTags`
763 764 765 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 763 def @vm_tags end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 770 def update!(**args) @accelerators = args[:accelerators] if args.key?(:accelerators) @boost_configs = args[:boost_configs] if args.key?(:boost_configs) @boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb) @confidential_instance_config = args[:confidential_instance_config] if args.key?(:confidential_instance_config) @disable_public_ip_addresses = args[:disable_public_ip_addresses] if args.key?(:disable_public_ip_addresses) @disable_ssh = args[:disable_ssh] if args.key?(:disable_ssh) @enable_nested_virtualization = args[:enable_nested_virtualization] if args.key?(:enable_nested_virtualization) @instance_metadata = args[:instance_metadata] if args.key?(:instance_metadata) @machine_type = args[:machine_type] if args.key?(:machine_type) @pool_size = args[:pool_size] if args.key?(:pool_size) @pooled_instances = args[:pooled_instances] if args.key?(:pooled_instances) @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) @startup_script_uri = args[:startup_script_uri] if args.key?(:startup_script_uri) @tags = args[:tags] if args.key?(:tags) @vm_tags = args[:vm_tags] if args.key?(:vm_tags) end |