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.
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;
string
hasImage
setImage
Name of a public or custom image used as the data source.
Generated from protobuf field string image = 4;
var
string
$this
getSnapshot
Name of a snapshot used as the data source.
Generated from protobuf field string snapshot = 5;
string
hasSnapshot
setSnapshot
Name of a snapshot used as the data source.
Generated from protobuf field string snapshot = 5;
var
string
$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;
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;
var
string
$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;
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;
var
int|string
$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;
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;
var
string
$this
getDataSource
string