Google Cloud Batch V1 Client - Class Disk (0.2.2)

Reference documentation and code samples for the Google Cloud Batch V1 Client class 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.

Generated from protobuf message google.cloud.batch.v1.AllocationPolicy.Disk

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ image string

Name of a public or custom image used as the data source.

↳ snapshot string

Name of a snapshot used as the data source.

↳ type string

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd".

↳ size_gb int|string

Disk size in GB. This field is ignored if data_source is disk or image. If type is local-ssd, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB.

↳ disk_interface string

Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. We only support "SCSI" for persistent disks now.

getImage

Name of a public or custom image used as the data source.

Generated from protobuf field string image = 4;

Returns
TypeDescription
string

hasImage

setImage

Name of a public or custom image used as the data source.

Generated from protobuf field string image = 4;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSnapshot

Name of a snapshot used as the data source.

Generated from protobuf field string snapshot = 5;

Returns
TypeDescription
string

hasSnapshot

setSnapshot

Name of a snapshot used as the data source.

Generated from protobuf field string snapshot = 5;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd".

Generated from protobuf field string type = 1;

Returns
TypeDescription
string

setType

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd".

Generated from protobuf field string type = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSizeGb

Disk size in GB.

This field is ignored if data_source is disk or image. If type is local-ssd, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB.

Generated from protobuf field int64 size_gb = 2;

Returns
TypeDescription
int|string

setSizeGb

Disk size in GB.

This field is ignored if data_source is disk or image. If type is local-ssd, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB.

Generated from protobuf field int64 size_gb = 2;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getDiskInterface

Local SSDs are available through both "SCSI" and "NVMe" interfaces.

If not indicated, "NVMe" will be the default one for local ssds. We only support "SCSI" for persistent disks now.

Generated from protobuf field string disk_interface = 6;

Returns
TypeDescription
string

setDiskInterface

Local SSDs are available through both "SCSI" and "NVMe" interfaces.

If not indicated, "NVMe" will be the default one for local ssds. We only support "SCSI" for persistent disks now.

Generated from protobuf field string disk_interface = 6;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDataSource

Returns
TypeDescription
string