Google Cloud Batch V1 Client - Class InstancePolicy (0.5.2)

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

Methods

__construct

Constructor.

Parameters
NameDescription
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. Not yet implemented.

↳ provisioning_model int

The provisioning model.

↳ accelerators array<Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>

The accelerators attached to each VM instance.

↳ boot_disk Google\Cloud\Batch\V1\AllocationPolicy\Disk

Book disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted.

↳ disks 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.

getMachineType

The Compute Engine machine type.

Returns
TypeDescription
string

setMachineType

The Compute Engine machine type.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMinCpuPlatform

The minimum CPU platform.

See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. Not yet implemented.

Returns
TypeDescription
string

setMinCpuPlatform

The minimum CPU platform.

See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. Not yet implemented.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProvisioningModel

The provisioning model.

Returns
TypeDescription
int

setProvisioningModel

The provisioning model.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAccelerators

The accelerators attached to each VM instance.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAccelerators

The accelerators attached to each VM instance.

Parameter
NameDescription
var array<Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>
Returns
TypeDescription
$this

getBootDisk

Book disk to be created and attached to each VM by this InstancePolicy.

Boot disk will be deleted when the VM is deleted.

Returns
TypeDescription
Google\Cloud\Batch\V1\AllocationPolicy\Disk|null

hasBootDisk

clearBootDisk

setBootDisk

Book disk to be created and attached to each VM by this InstancePolicy.

Boot disk will be deleted when the VM is deleted.

Parameter
NameDescription
var Google\Cloud\Batch\V1\AllocationPolicy\Disk
Returns
TypeDescription
$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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDisks

Non-boot disks to be attached for each VM created by this InstancePolicy.

New disks will be deleted when the VM is deleted.

Parameter
NameDescription
var array<Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>
Returns
TypeDescription
$this