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 |
↳ size_gb |
int|string
Disk size in GB. This field is ignored if |
↳ 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 | |
---|---|
Type | Description |
string |
hasImage
setImage
Name of a public or custom image used as the data source.
Generated from protobuf field string image = 4;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSnapshot
Name of a snapshot used as the data source.
Generated from protobuf field string snapshot = 5;
Returns | |
---|---|
Type | Description |
string |
hasSnapshot
setSnapshot
Name of a snapshot used as the data source.
Generated from protobuf field string snapshot = 5;
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".
Generated from protobuf field string type = 1;
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".
Generated from protobuf field string type = 1;
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.
Generated from protobuf field int64 size_gb = 2;
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.
Generated from protobuf field int64 size_gb = 2;
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.
Generated from protobuf field string disk_interface = 6;
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.
Generated from protobuf field string disk_interface = 6;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDataSource
Returns | |
---|---|
Type | Description |
string |