Class CapacityCommitment (1.9.1)

CapacityCommitment(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

Attributes

NameDescription
name str
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
Number of slots in this commitment.
plan google.cloud.bigquery_reservation_v1.types.CapacityCommitment.CommitmentPlan
Capacity commitment commitment plan.
state google.cloud.bigquery_reservation_v1.types.CapacityCommitment.State
Output only. State of the commitment.
commitment_start_time google.protobuf.timestamp_pb2.Timestamp
Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
commitment_end_time google.protobuf.timestamp_pb2.Timestamp
Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
failure_status google.rpc.status_pb2.Status
Output only. For FAILED commitment plan, provides the reason of failure.
renewal_plan google.cloud.bigquery_reservation_v1.types.CapacityCommitment.CommitmentPlan
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.

Classes

CommitmentPlan

CommitmentPlan(value)

Commitment plan defines the current committed period. Capacity commitment cannot be deleted during it's committed period.

Values: COMMITMENT_PLAN_UNSPECIFIED (0): Invalid plan value. Requests with this value will be rejected with error code google.rpc.Code.INVALID_ARGUMENT. FLEX (3): Flex commitments have committed period of 1 minute after becoming ACTIVE. After that, they are not in a committed period anymore and can be removed any time. TRIAL (5): Trial commitments have a committed period of 182 days after becoming ACTIVE. After that, they are converted to a new commitment based on the renewal_plan. Default renewal_plan for Trial commitment is Flex so that it can be deleted right after committed period ends. MONTHLY (2): Monthly commitments have a committed period of 30 days after becoming ACTIVE. After that, they are not in a committed period anymore and can be removed any time. ANNUAL (4): Annual commitments have a committed period of 365 days after becoming ACTIVE. After that they are converted to a new commitment based on the renewal_plan.

State

State(value)

Capacity commitment can either become ACTIVE right away or transition from PENDING to ACTIVE or FAILED.

Values: STATE_UNSPECIFIED (0): Invalid state value. PENDING (1): Capacity commitment is pending provisioning. Pending capacity commitment does not contribute to the project's slot_capacity. ACTIVE (2): Once slots are provisioned, capacity commitment becomes active. slot_count is added to the project's slot_capacity. FAILED (3): Capacity commitment is failed to be activated by the backend.