# Class CapacityCommitment (1.25.0)

1.25.0 (latest) 1.24.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.2 1.16.0 1.15.0 1.14.1 1.13.5 1.12.0 1.11.3 1.10.0 1.9.1 1.8.0 1.7.3 1.6.3 1.5.0 1.4.1 1.3.1 1.2.2 1.1.0 1.0.1 0.4.2 0.3.0 0.2.0 0.1.0

    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 ||
|---|---|
| **Name** | **Description** |
| `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` Optional. Number of slots in this commitment. |
| `plan` | `https://docs.cloud.google.com/python/docs/reference/bigqueryreservation/latest/google.cloud.bigquery_reservation_v1.types.CapacityCommitment.CommitmentPlan` Optional. Capacity commitment commitment plan. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/bigqueryreservation/latest/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. Note after the commitment is renewed, commitment_start_time won't be changed. It refers to the start time of the original commitment. |
| `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. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don't change commitment_start_time , |
| `failure_status` | `google.rpc.status_pb2.Status` Output only. For FAILED commitment plan, provides the reason of failure. |
| `renewal_plan` | `https://docs.cloud.google.com/python/docs/reference/bigqueryreservation/latest/google.cloud.bigquery_reservation_v1.types.CapacityCommitment.CommitmentPlan` Optional. 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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field. |
| `edition` | `https://docs.cloud.google.com/python/docs/reference/bigqueryreservation/latest/google.cloud.bigquery_reservation_v1.types.Edition` Optional. Edition of the capacity commitment. |
| `is_flat_rate` | `bool` Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment. |

## Classes

### CommitmentPlan

    CommitmentPlan(value)

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

### State

    State(value)

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