v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-13203076.0 KB
projects

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: * The organization organizationA contains two projects, project1 and project2. * Assignments for all three entities (organizationA, project1, and project2) could all be created and mapped to the same or different reservations. "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: projects/myproject/locations/US/reservations/none. Returns google.rpc.Code.PERMISSION_DENIED if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation. Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment does not match location of the reservation.

post/v1/{+parent}/assignments

Path parameters

parentstring required

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

Query parameters

assignmentIdstring

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.

Request body

namestring

Output only. Name of the resource. E.g.: projects/myproject/locations/US/reservations/team1-prod/assignments/123. The assignment_id must only contain lower case alphanumeric characters or dashes and the max length is 64 characters.

principalstring

Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are: * principal://goog/subject/USER_EMAIL_ADDRESS for users, * principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS for service accounts, * principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID for workload identity pool identities. * The special value unknown_or_deleted_user represents principals which cannot be read from the user info service, for example deleted users.

jobType'JOB_TYPE_UNSPECIFIED' | 'PIPELINE' | 'QUERY' | 'ML_EXTERNAL' | 'BACKGROUND' | 'CONTINUOUS' | 'BACKGROUND_CHANGE_DATA_CAPTURE' | 'BACKGROUND_COLUMN_METADATA_INDEX' | 'BACKGROUND_SEARCH_INDEX_REFRESH'

Optional. Which type of jobs will use the reservation.

enableGeminiInBigqueryboolean

Optional. Deprecated: "Gemini in BigQuery" is now available by default for all BigQuery editions and should not be explicitly set. Controls if "Gemini in BigQuery" (https://cloud.google.com/gemini/docs/bigquery/overview) features should be enabled for this reservation assignment.

assigneestring

Optional. The resource which will use the reservation. E.g. projects/myproject, folders/123, or organizations/456.

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

Output only. State of the assignment.

Response

Successful response