Index
ReservationService
(interface)Assignment
(message)Assignment.JobType
(enum)Assignment.State
(enum)BiReservation
(message)CapacityCommitment
(message)CapacityCommitment.CommitmentPlan
(enum)CapacityCommitment.State
(enum)CreateAssignmentRequest
(message)CreateCapacityCommitmentRequest
(message)CreateReservationRequest
(message)DeleteAssignmentRequest
(message)DeleteCapacityCommitmentRequest
(message)DeleteReservationRequest
(message)Edition
(enum)FailoverReservationRequest
(message)GetBiReservationRequest
(message)GetCapacityCommitmentRequest
(message)GetReservationRequest
(message)ListAssignmentsRequest
(message)ListAssignmentsResponse
(message)ListCapacityCommitmentsRequest
(message)ListCapacityCommitmentsResponse
(message)ListReservationsRequest
(message)ListReservationsResponse
(message)MergeCapacityCommitmentsRequest
(message)MoveAssignmentRequest
(message)Reservation
(message)Reservation.Autoscale
(message)SearchAllAssignmentsRequest
(message)SearchAllAssignmentsResponse
(message)SearchAssignmentsRequest
(message)SearchAssignmentsResponse
(message)SplitCapacityCommitmentRequest
(message)SplitCapacityCommitmentResponse
(message)TableReference
(message)UpdateAssignmentRequest
(message)UpdateBiReservationRequest
(message)UpdateCapacityCommitmentRequest
(message)UpdateReservationRequest
(message)
ReservationService
This API allows users to manage their BigQuery reservations.
A reservation provides computational resource guarantees, in the form of slots, to users. A slot is a unit of computational power in BigQuery, and serves as the basic unit of parallelism. In a scan of a multi-partitioned table, a single slot operates on a single partition of the table. A reservation resource exists as a child resource of the admin project and location, e.g.: projects/myproject/locations/US/reservations/reservationName
.
A capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. A capacity commitment resource exists as a child resource of the admin project and location, e.g.: projects/myproject/locations/US/capacityCommitments/id
.
CreateAssignment |
---|
Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation. Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type. Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query. When creating assignments, it does not matter if other assignments exist at higher levels. Example:
"None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: Returns Returns
|
CreateCapacityCommitment |
---|
Creates a new capacity commitment resource.
|
CreateReservation |
---|
Creates a new reservation resource.
|
DeleteAssignment |
---|
Deletes a assignment. No expansion will happen. Example:
In this example, deletion of the
|
DeleteCapacityCommitment |
---|
Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code
|
DeleteReservation |
---|
Deletes a reservation. Returns
|
FailoverReservation |
---|
Fail over a reservation to the secondary location. The operation should be done in the current secondary location, which will be promoted to the new primary location for the reservation. Attempting to failover a reservation in the current primary location will fail with the error code
|
GetBiReservation |
---|
Retrieves a BI reservation.
|
GetCapacityCommitment |
---|
Returns information about the capacity commitment.
|
GetReservation |
---|
Returns information about the reservation.
|
ListAssignments |
---|
Lists assignments. Only explicitly created assignments will be returned. Example:
In this example, ListAssignments will just return the above two assignments for reservation The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed. Note "-" cannot be used for projects nor locations.
|
ListCapacityCommitments |
---|
Lists all the capacity commitments for the admin project.
|
ListReservations |
---|
Lists all the reservations for the project in the specified location.
|
MergeCapacityCommitments |
---|
Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code
|
MoveAssignment |
---|
Moves an assignment under a new reservation. This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.
|
SearchAllAssignments |
---|
Looks up assignments for a specified resource for a particular region. If the request is about a project:
The same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences:
|
SearchAssignments |
---|
Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:
The same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences:
Note "-" cannot be used for projects nor locations.
|
SplitCapacityCommitment |
---|
Splits capacity commitment to two commitments of the same plan and A common use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.
|
UpdateAssignment |
---|
Updates an existing assignment. Only the
|
UpdateBiReservation |
---|
Updates a BI reservation. Only fields specified in the A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.
|
UpdateCapacityCommitment |
---|
Updates an existing capacity commitment. Only 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
|
UpdateReservation |
---|
Updates an existing reservation resource.
|
Assignment
An assignment allows a project to submit jobs of a certain type using slots from the specified reservation.
Fields | |
---|---|
name |
Output only. Name of the resource. E.g.: |
assignee |
The resource which will use the reservation. E.g. |
job_ |
Which type of jobs will use the reservation. |
state |
Output only. State of the assignment. |
JobType
Types of job, which could be specified when using the reservation.
Enums | |
---|---|
JOB_TYPE_UNSPECIFIED |
Invalid type. Requests with this value will be rejected with error code google.rpc.Code.INVALID_ARGUMENT . |
PIPELINE |
Pipeline (load/export) jobs from the project will use the reservation. |
QUERY |
Query jobs from the project will use the reservation. |
ML_EXTERNAL |
BigQuery ML jobs that use services external to BigQuery for model training. These jobs will not utilize idle slots from other reservations. |
BACKGROUND |
Background jobs that BigQuery runs for the customers in the background. |
State
Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active.
Enums | |
---|---|
STATE_UNSPECIFIED |
Invalid state value. |
PENDING |
Queries from assignee will be executed as on-demand, if related assignment is pending. |
ACTIVE |
Assignment is ready. |
BiReservation
Represents a BI Reservation.
Fields | |
---|---|
name |
The resource name of the singleton BI reservation. Reservation names have the form |
update_ |
Output only. The last update timestamp of a reservation. |
size |
Size of a reservation, in bytes. |
preferred_ |
Preferred tables to use BI capacity for. |
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.
Fields | |
---|---|
name |
Output only. The resource name of the capacity commitment, e.g., |
slot_ |
Number of slots in this commitment. |
plan |
Capacity commitment commitment plan. |
state |
Output only. State of the commitment. |
commitment_ |
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_ |
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_ |
Output only. For FAILED commitment plan, provides the reason of failure. |
renewal_ |
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. |
edition |
Edition of the capacity commitment. |
is_ |
Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment. |
CommitmentPlan
Commitment plan defines the current committed period. Capacity commitment cannot be deleted during it's committed period.
Enums | |
---|---|
COMMITMENT_PLAN_UNSPECIFIED |
Invalid plan value. Requests with this value will be rejected with error code google.rpc.Code.INVALID_ARGUMENT . |
FLEX |
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. |
FLEX_FLAT_RATE |
Same as FLEX, should only be used if flat-rate commitments are still available. |
TRIAL |
Trial commitments have a committed period of 182 days after becoming ACTIVE. After that, they are converted to a new commitment based on the |
MONTHLY |
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. |
MONTHLY_FLAT_RATE |
Same as MONTHLY, should only be used if flat-rate commitments are still available. |
ANNUAL |
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. |
ANNUAL_FLAT_RATE |
Same as ANNUAL, should only be used if flat-rate commitments are still available. |
THREE_YEAR |
3-year commitments have a committed period of 1095(3 * 365) days after becoming ACTIVE. After that they are converted to a new commitment based on the renewal_plan. |
NONE |
Should only be used for renewal_plan and is only meaningful if edition is specified to values other than EDITION_UNSPECIFIED. Otherwise CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will be rejected with error code google.rpc.Code.INVALID_ARGUMENT . If the renewal_plan is NONE, capacity commitment will be removed at the end of its commitment period. |
State
Capacity commitment can either become ACTIVE right away or transition from PENDING to ACTIVE or FAILED.
Enums | |
---|---|
STATE_UNSPECIFIED |
Invalid state value. |
PENDING |
Capacity commitment is pending provisioning. Pending capacity commitment does not contribute to the project's slot_capacity. |
ACTIVE |
Once slots are provisioned, capacity commitment becomes active. slot_count is added to the project's slot_capacity. |
FAILED |
Capacity commitment is failed to be activated by the backend. |
CreateAssignmentRequest
The request for ReservationService.CreateAssignment
. Note: "bigquery.reservationAssignments.create" permission is required on the related assignee.
Fields | |
---|---|
parent |
Required. The parent resource name of the assignment E.g. Authorization requires the following IAM permission on the specified resource
|
assignment |
Assignment resource to create. |
assignment_ |
The optional assignment ID. Assignment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. Max length is 64 characters. |
CreateCapacityCommitmentRequest
The request for ReservationService.CreateCapacityCommitment
.
Fields | |
---|---|
parent |
Required. Resource name of the parent reservation. E.g., Authorization requires the following IAM permission on the specified resource
|
capacity_ |
Content of the capacity commitment to create. |
enforce_ |
If true, fail the request if another project in the organization has a capacity commitment. |
capacity_ |
The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged. |
CreateReservationRequest
The request for ReservationService.CreateReservation
.
Fields | |
---|---|
parent |
Required. Project, location. E.g., Authorization requires the following IAM permission on the specified resource
|
reservation_ |
The reservation ID. It 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. |
reservation |
Definition of the new reservation to create. |
DeleteAssignmentRequest
The request for ReservationService.DeleteAssignment
. Note: "bigquery.reservationAssignments.delete" permission is required on the related assignee.
Fields | |
---|---|
name |
Required. Name of the resource, e.g. Authorization requires the following IAM permission on the specified resource
|
DeleteCapacityCommitmentRequest
The request for ReservationService.DeleteCapacityCommitment
.
Fields | |
---|---|
name |
Required. Resource name of the capacity commitment to delete. E.g., Authorization requires the following IAM permission on the specified resource
|
force |
Can be used to force delete commitments even if assignments exist. Deleting commitments with assignments may cause queries to fail if they no longer have access to slots. |
DeleteReservationRequest
The request for ReservationService.DeleteReservation
.
Fields | |
---|---|
name |
Required. Resource name of the reservation to retrieve. E.g., Authorization requires the following IAM permission on the specified resource
|
Edition
The type of editions. Different features and behaviors are provided to different editions Capacity commitments and reservations are linked to editions.
Enums | |
---|---|
EDITION_UNSPECIFIED |
Default value, which will be treated as ENTERPRISE. |
STANDARD |
Standard edition. |
ENTERPRISE |
Enterprise edition. |
ENTERPRISE_PLUS |
Enterprise Plus edition. |
FailoverReservationRequest
The request for ReservationService.FailoverReservation.
Fields | |
---|---|
name |
Required. Resource name of the reservation to failover. E.g., Authorization requires the following IAM permission on the specified resource
|
GetBiReservationRequest
A request to get a singleton BI reservation.
Fields | |
---|---|
name |
Required. Name of the requested reservation, for example: Authorization requires the following IAM permission on the specified resource
|
GetCapacityCommitmentRequest
The request for ReservationService.GetCapacityCommitment
.
Fields | |
---|---|
name |
Required. Resource name of the capacity commitment to retrieve. E.g., Authorization requires the following IAM permission on the specified resource
|
GetReservationRequest
The request for ReservationService.GetReservation
.
Fields | |
---|---|
name |
Required. Resource name of the reservation to retrieve. E.g., Authorization requires the following IAM permission on the specified resource
|
ListAssignmentsRequest
The request for ReservationService.ListAssignments
.
Fields | |
---|---|
parent |
Required. The parent resource name e.g.:
Or:
Authorization requires the following IAM permission on the specified resource
|
page_ |
The maximum number of items to return per page. |
page_ |
The next_page_token value returned from a previous List request, if any. |
ListAssignmentsResponse
The response for ReservationService.ListAssignments
.
Fields | |
---|---|
assignments[] |
List of assignments visible to the user. |
next_ |
Token to retrieve the next page of results, or empty if there are no more results in the list. |
ListCapacityCommitmentsRequest
The request for ReservationService.ListCapacityCommitments
.
Fields | |
---|---|
parent |
Required. Resource name of the parent reservation. E.g., Authorization requires the following IAM permission on the specified resource
|
page_ |
The maximum number of items to return. |
page_ |
The next_page_token value returned from a previous List request, if any. |
ListCapacityCommitmentsResponse
The response for ReservationService.ListCapacityCommitments
.
Fields | |
---|---|
capacity_ |
List of capacity commitments visible to the user. |
next_ |
Token to retrieve the next page of results, or empty if there are no more results in the list. |
ListReservationsRequest
The request for ReservationService.ListReservations
.
Fields | |
---|---|
parent |
Required. The parent resource name containing project and location, e.g.: Authorization requires the following IAM permission on the specified resource
|
page_ |
The maximum number of items to return per page. |
page_ |
The next_page_token value returned from a previous List request, if any. |
ListReservationsResponse
The response for ReservationService.ListReservations
.
Fields | |
---|---|
reservations[] |
List of reservations visible to the user. |
next_ |
Token to retrieve the next page of results, or empty if there are no more results in the list. |
MergeCapacityCommitmentsRequest
The request for ReservationService.MergeCapacityCommitments
.
Fields | |
---|---|
parent |
Parent resource that identifies admin project and location e.g., Authorization requires the following IAM permission on the specified resource
|
capacity_ |
Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc |
MoveAssignmentRequest
The request for ReservationService.MoveAssignment
.
Note: "bigquery.reservationAssignments.create" permission is required on the destination_id.
Note: "bigquery.reservationAssignments.create" and "bigquery.reservationAssignments.delete" permission are required on the related assignee.
Fields | |
---|---|
name |
Required. The resource name of the assignment, e.g. Authorization requires the following IAM permission on the specified resource
|
destination_ |
The new reservation ID, e.g.: |
assignment_ |
The optional assignment ID. A new assignment name is generated if this field is empty. This field can contain only lowercase alphanumeric characters or dashes. Max length is 64 characters. |
Reservation
A reservation is a mechanism used to guarantee slots to users.
Fields | |
---|---|
name |
The resource name of the reservation, e.g., |
slot_ |
Baseline slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignore_idle_slots is set to false, or autoscaling is enabled. If edition is EDITION_UNSPECIFIED and total slot_capacity of the reservation and its siblings exceeds the total slot_count of all capacity commitments, the request will fail with If edition is any value but EDITION_UNSPECIFIED, then the above requirement is not needed. The total slot_capacity of the reservation and its siblings may exceed the total slot_count of capacity commitments. In that case, the exceeding slots will be charged with the autoscale SKU. You can increase the number of baseline slots in a reservation every few minutes. If you want to decrease your baseline slots, you are limited to once an hour if you have recently changed your baseline slot capacity and your baseline slots exceed your committed slots. Otherwise, you can decrease your baseline slots every few minutes. |
ignore_ |
If false, any query or pipeline job using this reservation will use idle slots from other reservations within the same admin project. If true, a query or pipeline job using this reservation will execute with the slot capacity specified in the slot_capacity field at most. |
autoscale |
The configuration parameters for the auto scaling feature. |
concurrency |
Job concurrency target which sets a soft upper bound on the number of jobs that can run concurrently in this reservation. This is a soft target due to asynchronous nature of the system and various optimizations for small queries. Default value is 0 which means that concurrency target will be automatically computed by the system. NOTE: this field is exposed as target job concurrency in the Information Schema, DDL and BigQuery CLI. |
creation_ |
Output only. Creation time of the reservation. |
update_ |
Output only. Last update time of the reservation. |
edition |
Edition of the reservation. |
primary_ |
Output only. The current location of the reservation's primary replica. This field is only set for reservations using the managed disaster recovery feature. |
secondary_ |
Optional. The current location of the reservation's secondary replica. This field is only set for reservations using the managed disaster recovery feature. Users can set this in create reservation calls to create a failover reservation or in update reservation calls to convert a non-failover reservation to a failover reservation(or vice versa). |
original_ |
Output only. The location where the reservation was originally created. This is set only during the failover reservation's creation. All billing charges for the failover reservation will be applied to this location. |
Autoscale
Auto scaling settings.
Fields | |
---|---|
current_ |
Output only. The slot capacity added to this reservation when autoscale happens. Will be between [0, max_slots]. Note: after users reduce max_slots, it may take a while before it can be propagated, so current_slots may stay in the original value and could be larger than max_slots for that brief period (less than one minute) |
max_ |
Number of slots to be scaled when needed. |
SearchAllAssignmentsRequest
The request for ReservationService.SearchAllAssignments
. Note: "bigquery.reservationAssignments.search" permission is required on the related assignee.
Fields | |
---|---|
parent |
Required. The resource name with location (project name could be the wildcard '-'), e.g.: Authorization requires the following IAM permission on the specified resource
|
query |
Please specify resource name as assignee in the query. Examples:
|
page_ |
The maximum number of items to return per page. |
page_ |
The next_page_token value returned from a previous List request, if any. |
SearchAllAssignmentsResponse
The response for ReservationService.SearchAllAssignments
.
Fields | |
---|---|
assignments[] |
List of assignments visible to the user. |
next_ |
Token to retrieve the next page of results, or empty if there are no more results in the list. |
SearchAssignmentsRequest
The request for ReservationService.SearchAssignments
. Note: "bigquery.reservationAssignments.search" permission is required on the related assignee.
Fields | |
---|---|
parent |
Required. The resource name of the admin project(containing project and location), e.g.: Authorization requires the following IAM permission on the specified resource
|
query |
Please specify resource name as assignee in the query. Examples:
|
page_ |
The maximum number of items to return per page. |
page_ |
The next_page_token value returned from a previous List request, if any. |
SearchAssignmentsResponse
The response for ReservationService.SearchAssignments
.
Fields | |
---|---|
assignments[] |
List of assignments visible to the user. |
next_ |
Token to retrieve the next page of results, or empty if there are no more results in the list. |
SplitCapacityCommitmentRequest
The request for ReservationService.SplitCapacityCommitment
.
Fields | |
---|---|
name |
Required. The resource name e.g.,: Authorization requires the following IAM permission on the specified resource
|
slot_ |
Number of slots in the capacity commitment after the split. |
SplitCapacityCommitmentResponse
The response for ReservationService.SplitCapacityCommitment
.
Fields | |
---|---|
first |
First capacity commitment, result of a split. |
second |
Second capacity commitment, result of a split. |
TableReference
Fully qualified reference to BigQuery table. Internally stored as google.cloud.bi.v1.BqTableReference.
Fields | |
---|---|
project_ |
The assigned project ID of the project. |
dataset_ |
The ID of the dataset in the above project. |
table_ |
The ID of the table in the above dataset. |
UpdateAssignmentRequest
The request for ReservationService.UpdateAssignment
.
Fields | |
---|---|
assignment |
Content of the assignment to update. Authorization requires the following IAM permission on the specified resource
|
update_ |
Standard field mask for the set of fields to be updated. |
UpdateBiReservationRequest
A request to update a BI reservation.
Fields | |
---|---|
bi_ |
A reservation to update. Authorization requires the following IAM permission on the specified resource
|
update_ |
A list of fields to be updated in this request. |
UpdateCapacityCommitmentRequest
The request for ReservationService.UpdateCapacityCommitment
.
Fields | |
---|---|
capacity_ |
Content of the capacity commitment to update. Authorization requires the following IAM permission on the specified resource
|
update_ |
Standard field mask for the set of fields to be updated. |
UpdateReservationRequest
The request for ReservationService.UpdateReservation
.
Fields | |
---|---|
reservation |
Content of the reservation to update. Authorization requires the following IAM permission on the specified resource
|
update_ |
Standard field mask for the set of fields to be updated. |