Class: Google::Apis::NotebooksV1::VirtualMachineConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VirtualMachineConfig

Returns a new instance of VirtualMachineConfig.



2988
2989
2990
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2988

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

Instance Attribute Details

#accelerator_configGoogle::Apis::NotebooksV1::RuntimeAcceleratorConfig

Definition of the types of hardware accelerators that can be used. 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



2869
2870
2871
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2869

def accelerator_config
  @accelerator_config
end

#container_imagesArray<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



2875
2876
2877
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2875

def container_images
  @container_images
end

#data_diskGoogle::Apis::NotebooksV1::LocalDisk

A Local attached disk resource. Corresponds to the JSON property dataDisk



2880
2881
2882
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2880

def data_disk
  @data_disk
end

#encryption_configGoogle::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



2886
2887
2888
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2886

def encryption_config
  @encryption_config
end

#guest_attributesHash<String,String>

Output only. The Compute Engine guest attributes. (see Project and instance guest attributes). Corresponds to the JSON property guestAttributes

Returns:

  • (Hash<String,String>)


2893
2894
2895
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2893

def guest_attributes
  @guest_attributes
end

#internal_ip_onlyBoolean 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

Returns:

  • (Boolean)


2902
2903
2904
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2902

def internal_ip_only
  @internal_ip_only
end

#labelsHash<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

Returns:

  • (Hash<String,String>)


2912
2913
2914
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2912

def labels
  @labels
end

#machine_typeString

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

Returns:

  • (String)


2918
2919
2920
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2918

def machine_type
  @machine_type
end

#metadataHash<String,String>

Optional. The Compute Engine metadata entries to add to virtual machine. (see Project and instance metadata). Corresponds to the JSON property metadata

Returns:

  • (Hash<String,String>)


2925
2926
2927
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2925

def 
  @metadata
end

#networkString

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]/regions/global/default * projects/[project_id]/regions/ global/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

Returns:

  • (String)


2939
2940
2941
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2939

def network
  @network
end

#nic_typeString

Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Corresponds to the JSON property nicType

Returns:

  • (String)


2945
2946
2947
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2945

def nic_type
  @nic_type
end

#reserved_ip_rangeString

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

Returns:

  • (String)


2956
2957
2958
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2956

def reserved_ip_range
  @reserved_ip_range
end

#shielded_instance_configGoogle::Apis::NotebooksV1::RuntimeShieldedInstanceConfig

A set of Shielded Instance options. Check Images using supported Shielded VM features. Not all combinations are valid. Corresponds to the JSON property shieldedInstanceConfig



2963
2964
2965
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2963

def shielded_instance_config
  @shielded_instance_config
end

#subnetString

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

Returns:

  • (String)


2972
2973
2974
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2972

def subnet
  @subnet
end

#tagsArray<String>

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

Returns:

  • (Array<String>)


2978
2979
2980
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2978

def tags
  @tags
end

#zoneString

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

Returns:

  • (String)


2986
2987
2988
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2986

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
# File 'lib/google/apis/notebooks_v1/classes.rb', line 2993

def update!(**args)
  @accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config)
  @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