Namespace com.google.cloud.bigquery.reservation.v1 (2.1.4)

A client to BigQuery Reservation API

The interfaces provided are listed below, along with usage samples.

ReservationServiceClient

Service Description: This API allows users to manage their flat-rate 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.

Sample for ReservationServiceClient:


 try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Reservation reservation = Reservation.newBuilder().build();
   String reservationId = "reservationId1116965383";
   Reservation response =
       reservationServiceClient.createReservation(parent, reservation, reservationId);
 }
 

Classes

Assignment

A Assignment allows a project to submit jobs of a certain type using slots from the specified reservation.

Protobuf type google.cloud.bigquery.reservation.v1.Assignment

Assignment.Builder

A Assignment allows a project to submit jobs of a certain type using slots from the specified reservation.

Protobuf type google.cloud.bigquery.reservation.v1.Assignment

AssignmentName

AssignmentName.Builder

Builder for projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}.

BiReservation

Represents a BI Reservation.

Protobuf type google.cloud.bigquery.reservation.v1.BiReservation

BiReservation.Builder

Represents a BI Reservation.

Protobuf type google.cloud.bigquery.reservation.v1.BiReservation

BiReservationName

BiReservationName.Builder

Builder for projects/{project}/locations/{location}/biReservation.

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.

Protobuf type google.cloud.bigquery.reservation.v1.CapacityCommitment

CapacityCommitment.Builder

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.

Protobuf type google.cloud.bigquery.reservation.v1.CapacityCommitment

CapacityCommitmentName

CapacityCommitmentName.Builder

Builder for projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}.

CreateAssignmentRequest

The request for ReservationService.CreateAssignment. Note: "bigquery.reservationAssignments.create" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.CreateAssignmentRequest

CreateAssignmentRequest.Builder

The request for ReservationService.CreateAssignment. Note: "bigquery.reservationAssignments.create" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.CreateAssignmentRequest

CreateCapacityCommitmentRequest

The request for ReservationService.CreateCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest

CreateCapacityCommitmentRequest.Builder

The request for ReservationService.CreateCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest

CreateReservationRequest

The request for ReservationService.CreateReservation.

Protobuf type google.cloud.bigquery.reservation.v1.CreateReservationRequest

CreateReservationRequest.Builder

The request for ReservationService.CreateReservation.

Protobuf type google.cloud.bigquery.reservation.v1.CreateReservationRequest

DeleteAssignmentRequest

The request for ReservationService.DeleteAssignment. Note: "bigquery.reservationAssignments.delete" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest

DeleteAssignmentRequest.Builder

The request for ReservationService.DeleteAssignment. Note: "bigquery.reservationAssignments.delete" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest

DeleteCapacityCommitmentRequest

The request for ReservationService.DeleteCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest

DeleteCapacityCommitmentRequest.Builder

The request for ReservationService.DeleteCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest

DeleteReservationRequest

The request for ReservationService.DeleteReservation.

Protobuf type google.cloud.bigquery.reservation.v1.DeleteReservationRequest

DeleteReservationRequest.Builder

The request for ReservationService.DeleteReservation.

Protobuf type google.cloud.bigquery.reservation.v1.DeleteReservationRequest

GetBiReservationRequest

A request to get a singleton BI reservation.

Protobuf type google.cloud.bigquery.reservation.v1.GetBiReservationRequest

GetBiReservationRequest.Builder

A request to get a singleton BI reservation.

Protobuf type google.cloud.bigquery.reservation.v1.GetBiReservationRequest

GetCapacityCommitmentRequest

The request for ReservationService.GetCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest

GetCapacityCommitmentRequest.Builder

The request for ReservationService.GetCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest

GetReservationRequest

The request for ReservationService.GetReservation.

Protobuf type google.cloud.bigquery.reservation.v1.GetReservationRequest

GetReservationRequest.Builder

The request for ReservationService.GetReservation.

Protobuf type google.cloud.bigquery.reservation.v1.GetReservationRequest

ListAssignmentsRequest

The request for ReservationService.ListAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.ListAssignmentsRequest

ListAssignmentsRequest.Builder

The request for ReservationService.ListAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.ListAssignmentsRequest

ListAssignmentsResponse

The response for ReservationService.ListAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.ListAssignmentsResponse

ListAssignmentsResponse.Builder

The response for ReservationService.ListAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.ListAssignmentsResponse

ListCapacityCommitmentsRequest

The request for ReservationService.ListCapacityCommitments.

Protobuf type google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest

ListCapacityCommitmentsRequest.Builder

The request for ReservationService.ListCapacityCommitments.

Protobuf type google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest

ListCapacityCommitmentsResponse

The response for ReservationService.ListCapacityCommitments.

Protobuf type google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse

ListCapacityCommitmentsResponse.Builder

The response for ReservationService.ListCapacityCommitments.

Protobuf type google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse

ListReservationsRequest

The request for ReservationService.ListReservations.

Protobuf type google.cloud.bigquery.reservation.v1.ListReservationsRequest

ListReservationsRequest.Builder

The request for ReservationService.ListReservations.

Protobuf type google.cloud.bigquery.reservation.v1.ListReservationsRequest

ListReservationsResponse

The response for ReservationService.ListReservations.

Protobuf type google.cloud.bigquery.reservation.v1.ListReservationsResponse

ListReservationsResponse.Builder

The response for ReservationService.ListReservations.

Protobuf type google.cloud.bigquery.reservation.v1.ListReservationsResponse

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

MergeCapacityCommitmentsRequest

The request for ReservationService.MergeCapacityCommitments.

Protobuf type google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest

MergeCapacityCommitmentsRequest.Builder

The request for ReservationService.MergeCapacityCommitments.

Protobuf type google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest

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.

Protobuf type google.cloud.bigquery.reservation.v1.MoveAssignmentRequest

MoveAssignmentRequest.Builder

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.

Protobuf type google.cloud.bigquery.reservation.v1.MoveAssignmentRequest

Reservation

A reservation is a mechanism used to guarantee slots to users.

Protobuf type google.cloud.bigquery.reservation.v1.Reservation

Reservation.Builder

A reservation is a mechanism used to guarantee slots to users.

Protobuf type google.cloud.bigquery.reservation.v1.Reservation

ReservationName

ReservationName.Builder

Builder for projects/{project}/locations/{location}/reservations/{reservation}.

ReservationProto

ReservationServiceClient

Service Description: This API allows users to manage their flat-rate 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.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Reservation reservation = Reservation.newBuilder().build();
   String reservationId = "reservationId1116965383";
   Reservation response =
       reservationServiceClient.createReservation(parent, reservation, reservationId);
 }
 

Note: close() needs to be called on the ReservationServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of ReservationServiceSettings to create(). For example:

To customize credentials:


 ReservationServiceSettings reservationServiceSettings =
     ReservationServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ReservationServiceClient reservationServiceClient =
     ReservationServiceClient.create(reservationServiceSettings);
 

To customize the endpoint:


 ReservationServiceSettings reservationServiceSettings =
     ReservationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 ReservationServiceClient reservationServiceClient =
     ReservationServiceClient.create(reservationServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

ReservationServiceClient.ListAssignmentsFixedSizeCollection

ReservationServiceClient.ListAssignmentsPage

ReservationServiceClient.ListAssignmentsPagedResponse

ReservationServiceClient.ListCapacityCommitmentsFixedSizeCollection

ReservationServiceClient.ListCapacityCommitmentsPage

ReservationServiceClient.ListCapacityCommitmentsPagedResponse

ReservationServiceClient.ListReservationsFixedSizeCollection

ReservationServiceClient.ListReservationsPage

ReservationServiceClient.ListReservationsPagedResponse

ReservationServiceClient.SearchAllAssignmentsFixedSizeCollection

ReservationServiceClient.SearchAllAssignmentsPage

ReservationServiceClient.SearchAllAssignmentsPagedResponse

ReservationServiceClient.SearchAssignmentsFixedSizeCollection

ReservationServiceClient.SearchAssignmentsPage

ReservationServiceClient.SearchAssignmentsPagedResponse

ReservationServiceGrpc

This API allows users to manage their flat-rate 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.

ReservationServiceGrpc.ReservationServiceBlockingStub

This API allows users to manage their flat-rate 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.

ReservationServiceGrpc.ReservationServiceFutureStub

This API allows users to manage their flat-rate 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.

ReservationServiceGrpc.ReservationServiceImplBase

This API allows users to manage their flat-rate 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.

ReservationServiceGrpc.ReservationServiceStub

This API allows users to manage their flat-rate 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.

ReservationServiceSettings

Settings class to configure an instance of ReservationServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (bigqueryreservation.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createReservation to 30 seconds:


 ReservationServiceSettings.Builder reservationServiceSettingsBuilder =
     ReservationServiceSettings.newBuilder();
 reservationServiceSettingsBuilder
     .createReservationSettings()
     .setRetrySettings(
         reservationServiceSettingsBuilder
             .createReservationSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 ReservationServiceSettings reservationServiceSettings =
     reservationServiceSettingsBuilder.build();
 

ReservationServiceSettings.Builder

Builder for ReservationServiceSettings.

SearchAllAssignmentsRequest

The request for ReservationService.SearchAllAssignments. Note: "bigquery.reservationAssignments.search" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest

SearchAllAssignmentsRequest.Builder

The request for ReservationService.SearchAllAssignments. Note: "bigquery.reservationAssignments.search" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest

SearchAllAssignmentsResponse

The response for ReservationService.SearchAllAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse

SearchAllAssignmentsResponse.Builder

The response for ReservationService.SearchAllAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse

SearchAssignmentsRequest

The request for ReservationService.SearchAssignments. Note: "bigquery.reservationAssignments.search" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest

SearchAssignmentsRequest.Builder

The request for ReservationService.SearchAssignments. Note: "bigquery.reservationAssignments.search" permission is required on the related assignee.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest

SearchAssignmentsResponse

The response for ReservationService.SearchAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse

SearchAssignmentsResponse.Builder

The response for ReservationService.SearchAssignments.

Protobuf type google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse

SplitCapacityCommitmentRequest

The request for ReservationService.SplitCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest

SplitCapacityCommitmentRequest.Builder

The request for ReservationService.SplitCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest

SplitCapacityCommitmentResponse

The response for ReservationService.SplitCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse

SplitCapacityCommitmentResponse.Builder

The response for ReservationService.SplitCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse

UpdateBiReservationRequest

A request to update a BI reservation.

Protobuf type google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest

UpdateBiReservationRequest.Builder

A request to update a BI reservation.

Protobuf type google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest

UpdateCapacityCommitmentRequest

The request for ReservationService.UpdateCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest

UpdateCapacityCommitmentRequest.Builder

The request for ReservationService.UpdateCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest

UpdateReservationRequest

The request for ReservationService.UpdateReservation.

Protobuf type google.cloud.bigquery.reservation.v1.UpdateReservationRequest

UpdateReservationRequest.Builder

The request for ReservationService.UpdateReservation.

Protobuf type google.cloud.bigquery.reservation.v1.UpdateReservationRequest

Interfaces

AssignmentOrBuilder

BiReservationOrBuilder

CapacityCommitmentOrBuilder

CreateAssignmentRequestOrBuilder

CreateCapacityCommitmentRequestOrBuilder

CreateReservationRequestOrBuilder

DeleteAssignmentRequestOrBuilder

DeleteCapacityCommitmentRequestOrBuilder

DeleteReservationRequestOrBuilder

GetBiReservationRequestOrBuilder

GetCapacityCommitmentRequestOrBuilder

GetReservationRequestOrBuilder

ListAssignmentsRequestOrBuilder

ListAssignmentsResponseOrBuilder

ListCapacityCommitmentsRequestOrBuilder

ListCapacityCommitmentsResponseOrBuilder

ListReservationsRequestOrBuilder

ListReservationsResponseOrBuilder

MergeCapacityCommitmentsRequestOrBuilder

MoveAssignmentRequestOrBuilder

ReservationOrBuilder

SearchAllAssignmentsRequestOrBuilder

SearchAllAssignmentsResponseOrBuilder

SearchAssignmentsRequestOrBuilder

SearchAssignmentsResponseOrBuilder

SplitCapacityCommitmentRequestOrBuilder

SplitCapacityCommitmentResponseOrBuilder

UpdateBiReservationRequestOrBuilder

UpdateCapacityCommitmentRequestOrBuilder

UpdateReservationRequestOrBuilder

Enums

Assignment.JobType

Types of job, which could be specified when using the reservation.

Protobuf enum google.cloud.bigquery.reservation.v1.Assignment.JobType

Assignment.State

Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active.

Protobuf enum google.cloud.bigquery.reservation.v1.Assignment.State

CapacityCommitment.CommitmentPlan

Commitment plan defines the current committed period. Capacity commitment cannot be deleted during it's committed period.

Protobuf enum google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan

CapacityCommitment.State

Capacity commitment can either become ACTIVE right away or transition from PENDING to ACTIVE or FAILED.

Protobuf enum google.cloud.bigquery.reservation.v1.CapacityCommitment.State