Reference documentation and code samples for the Google BigQuery Reservation V1 Client class CapacityCommitment.
Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes.
In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
Generated from protobuf message google.cloud.bigquery.reservation.v1.CapacityCommitment
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
↳ slot_count
int|string
Number of slots in this commitment.
↳ plan
int
Capacity commitment commitment plan.
↳ state
int
Output only. State of the commitment.
↳ commitment_start_time
Google\Protobuf\Timestamp
Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
↳ commitment_end_time
Google\Protobuf\Timestamp
Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
↳ failure_status
↳ renewal_plan
int
The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
↳ multi_region_auxiliary
bool
Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region.
getName
Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
The commitment_id must only contain lower case alphanumeric characters or
dashes. It must start with a letter and must not end
with a dash. Its maximum length is 64 characters.
string
setName
Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
The commitment_id must only contain lower case alphanumeric characters or
dashes. It must start with a letter and must not end
with a dash. Its maximum length is 64 characters.
var
string
$this
getSlotCount
Number of slots in this commitment.
int|string
setSlotCount
Number of slots in this commitment.
var
int|string
$this
getPlan
Capacity commitment commitment plan.
int
setPlan
Capacity commitment commitment plan.
var
int
$this
getState
Output only. State of the commitment.
int
setState
Output only. State of the commitment.
var
int
$this
getCommitmentStartTime
Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
hasCommitmentStartTime
clearCommitmentStartTime
setCommitmentStartTime
Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
$this
getCommitmentEndTime
Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
hasCommitmentEndTime
clearCommitmentEndTime
setCommitmentEndTime
Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
$this
getFailureStatus
Output only. For FAILED commitment plan, provides the reason of failure.
hasFailureStatus
clearFailureStatus
setFailureStatus
Output only. For FAILED commitment plan, provides the reason of failure.
$this
getRenewalPlan
The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
int
setRenewalPlan
The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
var
int
$this
getMultiRegionAuxiliary
Applicable only for commitments located within one of the BigQuery multi-regions (US or EU).
If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region.
bool
setMultiRegionAuxiliary
Applicable only for commitments located within one of the BigQuery multi-regions (US or EU).
If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region.
var
bool
$this