Reference documentation and code samples for the Batch V1 API class Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicy.
InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#accelerators
def accelerators() -> ::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>
Returns
- (::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>) — The accelerators attached to each VM instance.
#accelerators=
def accelerators=(value) -> ::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>
Parameter
- value (::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>) — The accelerators attached to each VM instance.
Returns
- (::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>) — The accelerators attached to each VM instance.
#boot_disk
def boot_disk() -> ::Google::Cloud::Batch::V1::AllocationPolicy::Disk
Returns
- (::Google::Cloud::Batch::V1::AllocationPolicy::Disk) — Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.
#boot_disk=
def boot_disk=(value) -> ::Google::Cloud::Batch::V1::AllocationPolicy::Disk
Parameter
- value (::Google::Cloud::Batch::V1::AllocationPolicy::Disk) — Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.
Returns
- (::Google::Cloud::Batch::V1::AllocationPolicy::Disk) — Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.
#disks
def disks() -> ::Array<::Google::Cloud::Batch::V1::AllocationPolicy::AttachedDisk>
Returns
- (::Array<::Google::Cloud::Batch::V1::AllocationPolicy::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.
#disks=
def disks=(value) -> ::Array<::Google::Cloud::Batch::V1::AllocationPolicy::AttachedDisk>
Parameter
- value (::Array<::Google::Cloud::Batch::V1::AllocationPolicy::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.
Returns
- (::Array<::Google::Cloud::Batch::V1::AllocationPolicy::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.
#machine_type
def machine_type() -> ::String
Returns
- (::String) — The Compute Engine machine type.
#machine_type=
def machine_type=(value) -> ::String
Parameter
- value (::String) — The Compute Engine machine type.
Returns
- (::String) — The Compute Engine machine type.
#min_cpu_platform
def min_cpu_platform() -> ::String
Returns
- (::String) — The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
#min_cpu_platform=
def min_cpu_platform=(value) -> ::String
Parameter
- value (::String) — The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
Returns
- (::String) — The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
#provisioning_model
def provisioning_model() -> ::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel
Returns
- (::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel) — The provisioning model.
#provisioning_model=
def provisioning_model=(value) -> ::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel
Parameter
- value (::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel) — The provisioning model.
Returns
- (::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel) — The provisioning model.
#reservation
def reservation() -> ::String
Returns
- (::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.
#reservation=
def reservation=(value) -> ::String
Parameter
- value (::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.
Returns
- (::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.