# BigQuery Reservation API . projects . locations

## Instance Methods

Returns the capacityCommitments Resource.

Returns the reservations Resource.

Retrieves a BI reservation.

Looks up assignments for a specified resource for a particular region.

Retrieves the next page of results.

Looks up assignments for a specified resource for a particular region.

Retrieves the next page of results.

Updates a BI reservation.

### Method Details

`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", # The resource name of the singleton BI reservation.
            # Reservation names have the form
            # `projects/{project_id}/locations/{location_id}/bireservation`.
        "updateTime": "A String", # Output only. The last update timestamp of a reservation.
        "size": "A String", # Size of a reservation, in bytes.
      }

`searchAllAssignments(parent, query=None, pageSize=None, pageToken=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)
      query: string, Please specify resource name as assignee in the query.

    Examples:

    * `assignee=projects/myproject`
    * `assignee=folders/123`
    * `assignee=organizations/456`
      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.
      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.
          { # A Assignment allows a project to submit jobs
              # of a certain type using slots from the specified reservation.
            "assignee": "A String", # The resource which will use the reservation. E.g.
                # `projects/myproject`, `folders/123`, or `organizations/456`.
            "name": "A String", # Output only. Name of the resource. E.g.:
                # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
            "state": "A String", # Output only. State of the assignment.
            "jobType": "A String", # Which type of jobs will use the reservation.
          },
        ],
        "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
            # more results in the list.
      }

`searchAllAssignments_next(previous_request, previous_response)`

    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)`

    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.
          { # A Assignment allows a project to submit jobs
              # of a certain type using slots from the specified reservation.
            "assignee": "A String", # The resource which will use the reservation. E.g.
                # `projects/myproject`, `folders/123`, or `organizations/456`.
            "name": "A String", # Output only. Name of the resource. E.g.:
                # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
            "state": "A String", # Output only. State of the assignment.
            "jobType": "A String", # Which type of jobs will use the reservation.
          },
        ],
        "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
            # more results in the list.
      }

`searchAssignments_next(previous_request, previous_response)`

    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, 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", # The resource name of the singleton BI reservation.
          # Reservation names have the form
          # `projects/{project_id}/locations/{location_id}/bireservation`.
      "updateTime": "A String", # Output only. The last update timestamp of a reservation.
      "size": "A String", # Size of a reservation, in bytes.
    }

      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", # The resource name of the singleton BI reservation.
            # Reservation names have the form
            # `projects/{project_id}/locations/{location_id}/bireservation`.
        "updateTime": "A String", # Output only. The last update timestamp of a reservation.
        "size": "A String", # Size of a reservation, in bytes.
      }