Google Cloud Batch V1 Client - Class Disk (0.3.0)

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
Name Description
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.

Returns
Type Description
string

hasImage

setImage

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

Parameter
Name Description
var string
Returns
Type Description
$this

getSnapshot

Name of a snapshot used as the data source.

Returns
Type Description
string

hasSnapshot

setSnapshot

Name of a snapshot used as the data source.

Parameter
Name Description
var string
Returns
Type Description
$this

getType

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

Returns
Type Description
string

setType

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

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var int|string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getDataSource

Returns
Type Description
string