---
title: "POST /v1/{+parent}/capacityCommitments"
method: POST
path: "/v1/{+parent}/capacityCommitments"
tags: ["projects"]
---

# POST /v1/{+parent}/capacityCommitments

`POST /v1/{+parent}/capacityCommitments`

Creates a new capacity commitment resource.

## Path parameters

- `parent` string, required

## Query parameters

- `capacityCommitmentId` string
- `enforceSingleAdminProjectPerOrg` boolean

## Request body

- 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.
  - `edition` 'EDITION_UNSPECIFIED' | 'STANDARD' | 'ENTERPRISE' | 'ENTERPRISE_PLUS' — Optional. Edition of the capacity commitment.
  - `isFlatRate` boolean — Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment.
  - `multiRegionAuxiliary` boolean — 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.
  - `commitmentStartTime` string, google-datetime — 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.
  - `slotCount` string, int64 — Optional. Number of slots in this commitment.
  - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'ACTIVE' | 'FAILED' — Output only. State of the commitment.
  - `plan` 'COMMITMENT_PLAN_UNSPECIFIED' | 'FLEX' | 'FLEX_FLAT_RATE' | 'TRIAL' | 'MONTHLY' | 'MONTHLY_FLAT_RATE' | 'ANNUAL' | 'ANNUAL_FLAT_RATE' | 'THREE_YEAR' | 'NONE' — Optional. Capacity commitment commitment plan.
  - `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.
  - `failureStatus` Status — The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer — The status code, which should be an enum value of google.rpc.Code.
    - `message` string — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    - `details` object[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
  - `commitmentEndTime` string, google-datetime — 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 ,
  - `renewalPlan` 'COMMITMENT_PLAN_UNSPECIFIED' | 'FLEX' | 'FLEX_FLAT_RATE' | 'TRIAL' | 'MONTHLY' | 'MONTHLY_FLAT_RATE' | 'ANNUAL' | 'ANNUAL_FLAT_RATE' | 'THREE_YEAR' | 'NONE' — 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.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/bigqueryreservation.md) · [All operations](https://skmtc.dev/google/apis/bigqueryreservation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/bigqueryreservation/revisions/3502c38ecee3/schema)
