Class: Google::Apis::BatchV1::InstancePolicy
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::InstancePolicy
- 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
-
#accelerators ⇒ Array<Google::Apis::BatchV1::Accelerator>
The accelerators attached to each VM instance.
-
#boot_disk ⇒ Google::Apis::BatchV1::Disk
A new persistent disk or a local ssd.
-
#disks ⇒ Array<Google::Apis::BatchV1::AttachedDisk>
Non-boot disks to be attached for each VM created by this InstancePolicy.
-
#machine_type ⇒ String
The Compute Engine machine type.
-
#min_cpu_platform ⇒ String
The minimum CPU platform.
-
#provisioning_model ⇒ String
The provisioning model.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InstancePolicy
constructor
A new instance of InstancePolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InstancePolicy
Returns a new instance of InstancePolicy.
692 693 694 |
# File 'lib/google/apis/batch_v1/classes.rb', line 692 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerators ⇒ Array<Google::Apis::BatchV1::Accelerator>
The accelerators attached to each VM instance.
Corresponds to the JSON property accelerators
661 662 663 |
# File 'lib/google/apis/batch_v1/classes.rb', line 661 def accelerators @accelerators end |
#boot_disk ⇒ Google::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. https://cloud.google.com/compute/docs/disks#
pdspecs. https://cloud.google.com/compute/docs/disks#localssds.
Corresponds to the JSON property bootDisk
668 669 670 |
# File 'lib/google/apis/batch_v1/classes.rb', line 668 def boot_disk @boot_disk end |
#disks ⇒ Array<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
674 675 676 |
# File 'lib/google/apis/batch_v1/classes.rb', line 674 def disks @disks end |
#machine_type ⇒ String
The Compute Engine machine type.
Corresponds to the JSON property machineType
679 680 681 |
# File 'lib/google/apis/batch_v1/classes.rb', line 679 def machine_type @machine_type end |
#min_cpu_platform ⇒ String
The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/
specify-min-cpu-platform. Not yet implemented.
Corresponds to the JSON property minCpuPlatform
685 686 687 |
# File 'lib/google/apis/batch_v1/classes.rb', line 685 def min_cpu_platform @min_cpu_platform end |
#provisioning_model ⇒ String
The provisioning model.
Corresponds to the JSON property provisioningModel
690 691 692 |
# File 'lib/google/apis/batch_v1/classes.rb', line 690 def provisioning_model @provisioning_model end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
697 698 699 700 701 702 703 704 |
# File 'lib/google/apis/batch_v1/classes.rb', line 697 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 |