projects

PATCH /v1/projects/{projectsId}/locations/{locationsId}/capacityCommitments/{capacityCommitmentsId}

Changed on

Updates an existing capacity commitment. Only plan and renewal_plan fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Request

  • Base URL
    https://bigqueryreservation.googleapis.com
  • URL
    https://bigqueryreservation.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/capacityCommitments/{capacityCommitmentsId}
  • Auth
    • OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/bigquery
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/bigquery
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/cloud-platform
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform

Path parameters

projectsIdstring required
locationsIdstring required
capacityCommitmentsIdstring required

Query parameters

updateMaskstring google-fieldmask

Standard field mask for the set of fields to be updated.

Request body

commitmentEndTimestring 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 ,

commitmentStartTimestring 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.

edition'EDITION_UNSPECIFIED' | 'STANDARD' | 'ENTERPRISE' | 'ENTERPRISE_PLUS'

Optional. Edition of the capacity commitment.

isFlatRateboolean

Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment.

multiRegionAuxiliaryboolean

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.

namestring

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.

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.

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.

slotCountstring int64

Optional. Number of slots in this commitment.

state'STATE_UNSPECIFIED' | 'PENDING' | 'ACTIVE' | 'FAILED'

Output only. State of the commitment.

Response

Successful response

commitmentEndTimestring 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 ,

commitmentStartTimestring 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.

edition'EDITION_UNSPECIFIED' | 'STANDARD' | 'ENTERPRISE' | 'ENTERPRISE_PLUS'

Optional. Edition of the capacity commitment.

isFlatRateboolean

Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment.

multiRegionAuxiliaryboolean

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.

namestring

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.

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.

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.

slotCountstring int64

Optional. Number of slots in this commitment.

state'STATE_UNSPECIFIED' | 'PENDING' | 'ACTIVE' | 'FAILED'

Output only. State of the commitment.

Changes

    • info

      the security scope https://www.googleapis.com/auth/bigquery was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/bigquery was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was removed from the endpoint's security scheme Oauth2c