BigQuery Reservation API . projects . locations . reservationGroups

Instance Methods

close()

Close httplib2 connections.

create(parent, body=None, reservationGroupId=None, x__xgafv=None)

Creates a new reservation group.

delete(name, x__xgafv=None)

Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has assignments.

get(name, x__xgafv=None)

Returns information about the reservation group.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists all the reservation groups for the project in the specified location.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates an existing reservation group resource.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, reservationGroupId=None, x__xgafv=None)
Creates a new reservation group.

Args:
  parent: string, Required. Project, location. E.g., `projects/myproject/locations/US` (required)
  body: object, The request body.
    The object takes the form of:

{ # A reservation group is a container for reservations.
  "creationTime": "A String", # Output only. Creation time of the reservation group.
  "name": "A String", # Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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.
  "parentGroup": "A String", # Optional. The parent reservation group of the reservation group. Format: `projects/*/locations/*/reservationGroups/team1-prod` for non-root reservation groups, or `projects/*/locations/*` for root reservation groups.
  "updateTime": "A String", # Output only. Last update time of the reservation group via a user operation. This timestamp is updated only when an update operation explicitly targets this reservation group directly. It is not updated when parent or child groups are created, updated, or deleted.
}

  reservationGroupId: string, Required. The reservation group 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.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A reservation group is a container for reservations.
  "creationTime": "A String", # Output only. Creation time of the reservation group.
  "name": "A String", # Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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.
  "parentGroup": "A String", # Optional. The parent reservation group of the reservation group. Format: `projects/*/locations/*/reservationGroups/team1-prod` for non-root reservation groups, or `projects/*/locations/*` for root reservation groups.
  "updateTime": "A String", # Output only. Last update time of the reservation group via a user operation. This timestamp is updated only when an update operation explicitly targets this reservation group directly. It is not updated when parent or child groups are created, updated, or deleted.
}
delete(name, x__xgafv=None)
Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has assignments.

Args:
  name: string, Required. Resource name of the reservation group to retrieve. E.g., `projects/myproject/locations/US/reservationGroups/team1-prod` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Returns information about the reservation group.

Args:
  name: string, Required. Resource name of the reservation group to retrieve. E.g., `projects/myproject/locations/US/reservationGroups/team1-prod` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A reservation group is a container for reservations.
  "creationTime": "A String", # Output only. Creation time of the reservation group.
  "name": "A String", # Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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.
  "parentGroup": "A String", # Optional. The parent reservation group of the reservation group. Format: `projects/*/locations/*/reservationGroups/team1-prod` for non-root reservation groups, or `projects/*/locations/*` for root reservation groups.
  "updateTime": "A String", # Output only. Last update time of the reservation group via a user operation. This timestamp is updated only when an update operation explicitly targets this reservation group directly. It is not updated when parent or child groups are created, updated, or deleted.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists all the reservation groups for the project in the specified location.

Args:
  parent: string, Required. The parent resource name 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.
  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.ListReservationGroups.
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
  "reservationGroups": [ # List of reservations visible to the user.
    { # A reservation group is a container for reservations.
      "creationTime": "A String", # Output only. Creation time of the reservation group.
      "name": "A String", # Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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.
      "parentGroup": "A String", # Optional. The parent reservation group of the reservation group. Format: `projects/*/locations/*/reservationGroups/team1-prod` for non-root reservation groups, or `projects/*/locations/*` for root reservation groups.
      "updateTime": "A String", # Output only. Last update time of the reservation group via a user operation. This timestamp is updated only when an update operation explicitly targets this reservation group directly. It is not updated when parent or child groups are created, updated, or deleted.
    },
  ],
}
list_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.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an existing reservation group resource.

Args:
  name: string, Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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. (required)
  body: object, The request body.
    The object takes the form of:

{ # A reservation group is a container for reservations.
  "creationTime": "A String", # Output only. Creation time of the reservation group.
  "name": "A String", # Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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.
  "parentGroup": "A String", # Optional. The parent reservation group of the reservation group. Format: `projects/*/locations/*/reservationGroups/team1-prod` for non-root reservation groups, or `projects/*/locations/*` for root reservation groups.
  "updateTime": "A String", # Output only. Last update time of the reservation group via a user operation. This timestamp is updated only when an update operation explicitly targets this reservation group directly. It is not updated when parent or child groups are created, updated, or deleted.
}

  updateMask: string, Optional. Standard field mask for the set of fields to be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A reservation group is a container for reservations.
  "creationTime": "A String", # Output only. Creation time of the reservation group.
  "name": "A String", # Identifier. The resource name of the reservation group, e.g., `projects/*/locations/*/reservationGroups/team1-prod`. The reservation_group_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.
  "parentGroup": "A String", # Optional. The parent reservation group of the reservation group. Format: `projects/*/locations/*/reservationGroups/team1-prod` for non-root reservation groups, or `projects/*/locations/*` for root reservation groups.
  "updateTime": "A String", # Output only. Last update time of the reservation group via a user operation. This timestamp is updated only when an update operation explicitly targets this reservation group directly. It is not updated when parent or child groups are created, updated, or deleted.
}