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 and MEMORY Check the Type enum for the list of possible values. |
getAcceleratorType
Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
Generated from protobuf field optional string accelerator_type = 138031246;
Returns | |
---|---|
Type | Description |
string |
hasAcceleratorType
clearAcceleratorType
setAcceleratorType
Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
Generated from protobuf field optional string accelerator_type = 138031246;
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.
Generated from protobuf field optional int64 amount = 196759640;
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.
Generated from protobuf field optional int64 amount = 196759640;
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getType
Type of resource for which this commitment applies. Possible values are VCPU and MEMORY Check the Type enum for the list of possible values.
Generated from protobuf field optional string type = 3575610;
Returns | |
---|---|
Type | Description |
string |
hasType
clearType
setType
Type of resource for which this commitment applies. Possible values are VCPU and MEMORY Check the Type enum for the list of possible values.
Generated from protobuf field optional string type = 3575610;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |