# BigQuery Reservation API . projects . locations

## Instance Methods

Returns the capacityCommitments Resource.

Returns the reservationGroups Resource.

Returns the reservations Resource.

Close httplib2 connections.

Retrieves a BI reservation.

Looks up assignments for a specified resource for a particular region. If the request is about a project: 1. Assignments created on the project will be returned if they exist. 2. Otherwise assignments created on the closest ancestor will be returned. 3. Assignments for different JobTypes will all be returned. 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: 1. permission on the assignee will be verified in this API. 2. Hierarchy lookup (project->folder->organization) happens in this API. 3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`.

Retrieves the next page of results.

Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project: 1. Assignments created on the project will be returned if they exist. 2. Otherwise assignments created on the closest ancestor will be returned. 3. Assignments for different JobTypes will all be returned. 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: 1. permission on the assignee will be verified in this API. 2. Hierarchy lookup (project->folder->organization) happens in this API. 3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`. **Note** "-" cannot be used for projects nor locations.

Retrieves the next page of results.

Updates a BI reservation. Only fields specified in the `field_mask` are updated. 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.

### Method Details

`close()`

    Close httplib2 connections.

`getBiReservation(name, x__xgafv=None)`

    Retrieves a BI reservation.

    Args:
      name: string, Required. Name of the requested reservation, for example: `projects/{project_id}/locations/{location_id}/biReservation` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents a BI Reservation.
      "name": "A String", # Identifier. The resource name of the singleton BI reservation. Reservation names have the form `projects/{project_id}/locations/{location_id}/biReservation`.
      "preferredTables": [ # Optional. Preferred tables to use BI capacity for.
        { # Fully qualified reference to BigQuery table. Internally stored as google.cloud.bi.v1.BqTableReference.
          "datasetId": "A String", # Optional. The ID of the dataset in the above project.
          "projectId": "A String", # Optional. The assigned project ID of the project.
          "tableId": "A String", # Optional. The ID of the table in the above dataset.
        },
      ],
      "size": "A String", # Optional. Size of a reservation, in bytes.
      "updateTime": "A String", # Output only. The last update timestamp of a reservation.
    }

`searchAllAssignments(parent, pageSize=None, pageToken=None, query=None, x__xgafv=None)`

    Looks up assignments for a specified resource for a particular region. If the request is about a project: 1. Assignments created on the project will be returned if they exist. 2. Otherwise assignments created on the closest ancestor will be returned. 3. Assignments for different JobTypes will all be returned. 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: 1. permission on the assignee will be verified in this API. 2. Hierarchy lookup (project->folder->organization) happens in this API. 3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`.

    Args:
      parent: string, Required. The resource name with location (project name could be the wildcard '-'), e.g.: `projects/-/locations/US`. (required)
      pageSize: integer, The maximum number of items to return per page.
      pageToken: string, The next_page_token value returned from a previous List request, if any.
      query: string, Please specify resource name as assignee in the query. Examples: * `assignee=projects/myproject` * `assignee=folders/123` * `assignee=organizations/456`
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # The response for ReservationService.SearchAllAssignments.
      "assignments": [ # List of assignments visible to the user.
        { # An assignment allows a project to submit jobs of a certain type using slots from the specified reservation.
          "assignee": "A String", # Optional. The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.
          "enableGeminiInBigquery": True or False, # Optional. This field controls if "Gemini in BigQuery" (https://cloud.google.com/gemini/docs/bigquery/overview) features should be enabled for this reservation assignment, which is not on by default. "Gemini in BigQuery" has a distinct compliance posture from BigQuery. If this field is set to true, the assignment job type is QUERY, and the parent reservation edition is ENTERPRISE_PLUS, then the assignment will give the grantee project/organization access to "Gemini in BigQuery" features.
          "jobType": "A String", # Optional. Which type of jobs will use the reservation.
          "name": "A String", # 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.
          "schedulingPolicy": { # The scheduling policy controls how a reservation's resources are distributed. # Optional. The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. This feature is not yet generally available.
            "concurrency": "A String", # Optional. If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value. This feature is not yet generally available.
            "maxSlots": "A String", # Optional. If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value. This feature is not yet generally available.
          },
          "state": "A String", # Output only. State of the assignment.
        },
      ],
      "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
    }

`searchAllAssignments_next()`

    Retrieves the next page of results.

            Args:
              previous_request: The request for the previous page. (required)
              previous_response: The response from the request for the previous page. (required)

            Returns:
              A request object that you can call 'execute()' on to request the next
              page. Returns None if there are no more items in the collection.

`searchAssignments(parent, pageSize=None, pageToken=None, query=None, x__xgafv=None)`

    Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project: 1. Assignments created on the project will be returned if they exist. 2. Otherwise assignments created on the closest ancestor will be returned. 3. Assignments for different JobTypes will all be returned. 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: 1. permission on the assignee will be verified in this API. 2. Hierarchy lookup (project->folder->organization) happens in this API. 3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`. **Note** "-" cannot be used for projects nor locations.

    Args:
      parent: string, Required. The resource name of the admin project(containing project and location), e.g.: `projects/myproject/locations/US`. (required)
      pageSize: integer, The maximum number of items to return per page.
      pageToken: string, The next_page_token value returned from a previous List request, if any.
      query: string, Please specify resource name as assignee in the query. Examples: * `assignee=projects/myproject` * `assignee=folders/123` * `assignee=organizations/456`
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # The response for ReservationService.SearchAssignments.
      "assignments": [ # List of assignments visible to the user.
        { # An assignment allows a project to submit jobs of a certain type using slots from the specified reservation.
          "assignee": "A String", # Optional. The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.
          "enableGeminiInBigquery": True or False, # Optional. This field controls if "Gemini in BigQuery" (https://cloud.google.com/gemini/docs/bigquery/overview) features should be enabled for this reservation assignment, which is not on by default. "Gemini in BigQuery" has a distinct compliance posture from BigQuery. If this field is set to true, the assignment job type is QUERY, and the parent reservation edition is ENTERPRISE_PLUS, then the assignment will give the grantee project/organization access to "Gemini in BigQuery" features.
          "jobType": "A String", # Optional. Which type of jobs will use the reservation.
          "name": "A String", # 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.
          "schedulingPolicy": { # The scheduling policy controls how a reservation's resources are distributed. # Optional. The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. This feature is not yet generally available.
            "concurrency": "A String", # Optional. If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value. This feature is not yet generally available.
            "maxSlots": "A String", # Optional. If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value. This feature is not yet generally available.
          },
          "state": "A String", # Output only. State of the assignment.
        },
      ],
      "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
    }

`searchAssignments_next()`

    Retrieves the next page of results.

            Args:
              previous_request: The request for the previous page. (required)
              previous_response: The response from the request for the previous page. (required)

            Returns:
              A request object that you can call 'execute()' on to request the next
              page. Returns None if there are no more items in the collection.

`updateBiReservation(name, body=None, updateMask=None, x__xgafv=None)`

    Updates a BI reservation. Only fields specified in the `field_mask` are updated. 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.

    Args:
      name: string, Identifier. The resource name of the singleton BI reservation. Reservation names have the form `projects/{project_id}/locations/{location_id}/biReservation`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Represents a BI Reservation.
      "name": "A String", # Identifier. The resource name of the singleton BI reservation. Reservation names have the form `projects/{project_id}/locations/{location_id}/biReservation`.
      "preferredTables": [ # Optional. Preferred tables to use BI capacity for.
        { # Fully qualified reference to BigQuery table. Internally stored as google.cloud.bi.v1.BqTableReference.
          "datasetId": "A String", # Optional. The ID of the dataset in the above project.
          "projectId": "A String", # Optional. The assigned project ID of the project.
          "tableId": "A String", # Optional. The ID of the table in the above dataset.
        },
      ],
      "size": "A String", # Optional. Size of a reservation, in bytes.
      "updateTime": "A String", # Output only. The last update timestamp of a reservation.
    }

      updateMask: string, A list of fields to be updated in this request.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents a BI Reservation.
      "name": "A String", # Identifier. The resource name of the singleton BI reservation. Reservation names have the form `projects/{project_id}/locations/{location_id}/biReservation`.
      "preferredTables": [ # Optional. Preferred tables to use BI capacity for.
        { # Fully qualified reference to BigQuery table. Internally stored as google.cloud.bi.v1.BqTableReference.
          "datasetId": "A String", # Optional. The ID of the dataset in the above project.
          "projectId": "A String", # Optional. The assigned project ID of the project.
          "tableId": "A String", # Optional. The ID of the table in the above dataset.
        },
      ],
      "size": "A String", # Optional. Size of a reservation, in bytes.
      "updateTime": "A String", # Output only. The last update timestamp of a reservation.
    }