Class: Google::Apis::BatchV1::InstancePolicy

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

Overview

InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstancePolicy

Returns a new instance of InstancePolicy.



958
959
960
# File 'lib/google/apis/batch_v1/classes.rb', line 958

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

Instance Attribute Details

#acceleratorsArray<Google::Apis::BatchV1::Accelerator>

The accelerators attached to each VM instance. Corresponds to the JSON property accelerators



927
928
929
# File 'lib/google/apis/batch_v1/classes.rb', line 927

def accelerators
  @accelerators
end

#boot_diskGoogle::Apis::BatchV1::Disk

A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/ disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds. Corresponds to the JSON property bootDisk



934
935
936
# File 'lib/google/apis/batch_v1/classes.rb', line 934

def boot_disk
  @boot_disk
end

#disksArray<Google::Apis::BatchV1::AttachedDisk>

Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. Corresponds to the JSON property disks



940
941
942
# File 'lib/google/apis/batch_v1/classes.rb', line 940

def disks
  @disks
end

#machine_typeString

The Compute Engine machine type. Corresponds to the JSON property machineType

Returns:

  • (String)


945
946
947
# File 'lib/google/apis/batch_v1/classes.rb', line 945

def machine_type
  @machine_type
end

#min_cpu_platformString

The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/ specify-min-cpu-platform. Corresponds to the JSON property minCpuPlatform

Returns:

  • (String)


951
952
953
# File 'lib/google/apis/batch_v1/classes.rb', line 951

def min_cpu_platform
  @min_cpu_platform
end

#provisioning_modelString

The provisioning model. Corresponds to the JSON property provisioningModel

Returns:

  • (String)


956
957
958
# File 'lib/google/apis/batch_v1/classes.rb', line 956

def provisioning_model
  @provisioning_model
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



963
964
965
966
967
968
969
970
# File 'lib/google/apis/batch_v1/classes.rb', line 963

def update!(**args)
  @accelerators = args[:accelerators] if args.key?(:accelerators)
  @boot_disk = args[:boot_disk] if args.key?(:boot_disk)
  @disks = args[:disks] if args.key?(:disks)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
  @provisioning_model = args[:provisioning_model] if args.key?(:provisioning_model)
end