Class: Google::Apis::DataprocV1beta2::InstanceGroupConfig

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

Overview

The config settings for Compute Engine resources in an instance group, such as a master or worker group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceGroupConfig

Returns a new instance of InstanceGroupConfig.



1404
1405
1406
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1404

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

Instance Attribute Details

#acceleratorsArray<Google::Apis::DataprocV1beta2::AcceleratorConfig>

Optional. The Compute Engine accelerator configuration for these instances. Corresponds to the JSON property accelerators



1330
1331
1332
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1330

def accelerators
  @accelerators
end

#disk_configGoogle::Apis::DataprocV1beta2::DiskConfig

Specifies the config of disk options for a group of VM instances. Corresponds to the JSON property diskConfig



1335
1336
1337
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1335

def disk_config
  @disk_config
end

#image_uriString

Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples: https://www.googleapis. com/compute/beta/projects/[project_id]/global/images/[image-id] projects/[ project_id]/global/images/[image-id] image-idImage family examples. Dataproc will use the most recent image from the family: https://www.googleapis.com/ compute/beta/projects/[project_id]/global/images/family/[custom-image-family- name] projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default. Corresponds to the JSON property imageUri

Returns:

  • (String)


1348
1349
1350
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1348

def image_uri
  @image_uri
end

#instance_namesArray<String>

Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group. Corresponds to the JSON property instanceNames

Returns:

  • (Array<String>)


1354
1355
1356
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1354

def instance_names
  @instance_names
end

#instance_referencesArray<Google::Apis::DataprocV1beta2::InstanceReference>

Output only. List of references to Compute Engine instances. Corresponds to the JSON property instanceReferences



1359
1360
1361
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1359

def instance_references
  @instance_references
end

#is_preemptibleBoolean Also known as: is_preemptible?

Output only. Specifies that this instance group contains preemptible instances. Corresponds to the JSON property isPreemptible

Returns:

  • (Boolean)


1364
1365
1366
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1364

def is_preemptible
  @is_preemptible
end

#machine_type_uriString

Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: https://www.googleapis. com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard- 2 projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 n1- standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring- clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2. Corresponds to the JSON property machineTypeUri

Returns:

  • (String)


1377
1378
1379
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1377

def machine_type_uri
  @machine_type_uri
end

#managed_group_configGoogle::Apis::DataprocV1beta2::ManagedGroupConfig

Specifies the resources used to actively manage an instance group. Corresponds to the JSON property managedGroupConfig



1382
1383
1384
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1382

def managed_group_config
  @managed_group_config
end

#min_cpu_platformString

Specifies the minimum cpu platform for the Instance Group. See Dataproc -> Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/ dataproc-min-cpu). Corresponds to the JSON property minCpuPlatform

Returns:

  • (String)


1389
1390
1391
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1389

def min_cpu_platform
  @min_cpu_platform
end

#num_instancesFixnum

Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. Corresponds to the JSON property numInstances

Returns:

  • (Fixnum)


1395
1396
1397
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1395

def num_instances
  @num_instances
end

#preemptibilityString

Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE. Corresponds to the JSON property preemptibility

Returns:

  • (String)


1402
1403
1404
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1402

def preemptibility
  @preemptibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'generated/google/apis/dataproc_v1beta2/classes.rb', line 1409

def update!(**args)
  @accelerators = args[:accelerators] if args.key?(:accelerators)
  @disk_config = args[:disk_config] if args.key?(:disk_config)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
  @instance_names = args[:instance_names] if args.key?(:instance_names)
  @instance_references = args[:instance_references] if args.key?(:instance_references)
  @is_preemptible = args[:is_preemptible] if args.key?(:is_preemptible)
  @machine_type_uri = args[:machine_type_uri] if args.key?(:machine_type_uri)
  @managed_group_config = args[:managed_group_config] if args.key?(:managed_group_config)
  @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
  @num_instances = args[:num_instances] if args.key?(:num_instances)
  @preemptibility = args[:preemptibility] if args.key?(:preemptibility)
end