Reference documentation and code samples for the Google Cloud Batch V1 Client class InstancePolicy.
InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.
Generated from protobuf message google.cloud.batch.v1.AllocationPolicy.InstancePolicy
Namespace
Google \ Cloud \ Batch \ V1 \ AllocationPolicyMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ machine_type
string
The Compute Engine machine type.
↳ min_cpu_platform
string
The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform .
↳ provisioning_model
int
The provisioning model.
↳ accelerators
↳ boot_disk
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
array< 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.
↳ 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.
getMachineType
The Compute Engine machine type.
string
setMachineType
The Compute Engine machine type.
var
string
$this
getMinCpuPlatform
The minimum CPU platform.
See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform .
string
setMinCpuPlatform
The minimum CPU platform.
See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform .
var
string
$this
getProvisioningModel
The provisioning model.
int
setProvisioningModel
The provisioning model.
var
int
$this
getAccelerators
The accelerators attached to each VM instance.
setAccelerators
The accelerators attached to each VM instance.
$this
getBootDisk
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.
hasBootDisk
clearBootDisk
setBootDisk
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.
$this
getDisks
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.
setDisks
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.
$this
getReservation
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.
string
setReservation
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.
var
string
$this