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.
-
#reservation ⇒ String
Optional.
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.
1166 1167 1168 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1166 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
1125 1126 1127 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1125 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. See https://cloud.google.com/compute/docs/
disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds.
Corresponds to the JSON property bootDisk
1132 1133 1134 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1132 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. A non-boot disk is a disk that
can be of a device with a file system or a raw storage drive that is not ready
for data storage and accessing.
Corresponds to the JSON property disks
1140 1141 1142 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1140 def disks @disks end |
#machine_type ⇒ String
The Compute Engine machine type.
Corresponds to the JSON property machineType
1145 1146 1147 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1145 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.
Corresponds to the JSON property minCpuPlatform
1151 1152 1153 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1151 def min_cpu_platform @min_cpu_platform end |
#provisioning_model ⇒ String
The provisioning model.
Corresponds to the JSON property provisioningModel
1156 1157 1158 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1156 def provisioning_model @provisioning_model end |
#reservation ⇒ String
Optional. If not specified (default), VMs will consume any applicable
reservation. If "NO_RESERVATION" is specified, VMs will not consume any
reservation. Otherwise, if specified, VMs will consume only the specified
reservation.
Corresponds to the JSON property reservation
1164 1165 1166 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1164 def reservation @reservation end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1171 1172 1173 1174 1175 1176 1177 1178 1179 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1171 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) @reservation = args[:reservation] if args.key?(:reservation) end |