Reference documentation and code samples for the Compute V1 Client class ResourceCommitment.
Commitment for a particular resource (a Commitment is composed of one or more of these).
Generated from protobuf message google.cloud.compute.v1.ResourceCommitment
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data | array Optional. Data for populating the Message object. |
↳ accelerator_type | string Name of the accelerator type resource. Applicable only when the type is ACCELERATOR. |
↳ amount | int|string The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU. |
↳ type | string Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. Check the Type enum for the list of possible values. |
getAcceleratorType
Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
Returns | |
---|---|
Type | Description |
string |
hasAcceleratorType
clearAcceleratorType
setAcceleratorType
Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
Parameter | |
---|---|
Name | Description |
var | string |
Returns | |
---|---|
Type | Description |
$this |
getAmount
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
Returns | |
---|---|
Type | Description |
int|string |
hasAmount
clearAmount
setAmount
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
Parameter | |
---|---|
Name | Description |
var | int|string |
Returns | |
---|---|
Type | Description |
$this |
getType
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
Check the Type enum for the list of possible values.
Returns | |
---|---|
Type | Description |
string |
hasType
clearType
setType
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
Check the Type enum for the list of possible values.
Parameter | |
---|---|
Name | Description |
var | string |
Returns | |
---|---|
Type | Description |
$this |