Google Cloud BigQuery C++ Client 2.13.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::bigquery_reservation_v1::ReservationServiceClient Class Reference

This API allows users to manage their BigQuery reservations. More...

#include <google/cloud/bigquery/reservation/v1/reservation_client.h>

Public Member Functions

 ReservationServiceClient (std::shared_ptr< ReservationServiceConnection > connection, Options opts={})
 
 ~ReservationServiceClient ()
 
StatusOr< google::cloud::bigquery::reservation::v1::Reservation > CreateReservation (std::string const &parent, google::cloud::bigquery::reservation::v1::Reservation const &reservation, std::string const &reservation_id, Options opts={})
 Creates a new reservation resource. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Reservation > CreateReservation (google::cloud::bigquery::reservation::v1::CreateReservationRequest const &request, Options opts={})
 Creates a new reservation resource. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Reservation > ListReservations (std::string const &parent, Options opts={})
 Lists all the reservations for the project in the specified location. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Reservation > ListReservations (google::cloud::bigquery::reservation::v1::ListReservationsRequest request, Options opts={})
 Lists all the reservations for the project in the specified location. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Reservation > GetReservation (std::string const &name, Options opts={})
 Returns information about the reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Reservation > GetReservation (google::cloud::bigquery::reservation::v1::GetReservationRequest const &request, Options opts={})
 Returns information about the reservation. More...
 
Status DeleteReservation (std::string const &name, Options opts={})
 Deletes a reservation. More...
 
Status DeleteReservation (google::cloud::bigquery::reservation::v1::DeleteReservationRequest const &request, Options opts={})
 Deletes a reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Reservation > UpdateReservation (google::cloud::bigquery::reservation::v1::Reservation const &reservation, google::protobuf::FieldMask const &update_mask, Options opts={})
 Updates an existing reservation resource. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Reservation > UpdateReservation (google::cloud::bigquery::reservation::v1::UpdateReservationRequest const &request, Options opts={})
 Updates an existing reservation resource. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > CreateCapacityCommitment (std::string const &parent, google::cloud::bigquery::reservation::v1::CapacityCommitment const &capacity_commitment, Options opts={})
 Creates a new capacity commitment resource. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > CreateCapacityCommitment (google::cloud::bigquery::reservation::v1::CreateCapacityCommitmentRequest const &request, Options opts={})
 Creates a new capacity commitment resource. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::CapacityCommitment > ListCapacityCommitments (std::string const &parent, Options opts={})
 Lists all the capacity commitments for the admin project. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::CapacityCommitment > ListCapacityCommitments (google::cloud::bigquery::reservation::v1::ListCapacityCommitmentsRequest request, Options opts={})
 Lists all the capacity commitments for the admin project. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > GetCapacityCommitment (std::string const &name, Options opts={})
 Returns information about the capacity commitment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > GetCapacityCommitment (google::cloud::bigquery::reservation::v1::GetCapacityCommitmentRequest const &request, Options opts={})
 Returns information about the capacity commitment. More...
 
Status DeleteCapacityCommitment (std::string const &name, Options opts={})
 Deletes a capacity commitment. More...
 
Status DeleteCapacityCommitment (google::cloud::bigquery::reservation::v1::DeleteCapacityCommitmentRequest const &request, Options opts={})
 Deletes a capacity commitment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > UpdateCapacityCommitment (google::cloud::bigquery::reservation::v1::CapacityCommitment const &capacity_commitment, google::protobuf::FieldMask const &update_mask, Options opts={})
 Updates an existing capacity commitment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > UpdateCapacityCommitment (google::cloud::bigquery::reservation::v1::UpdateCapacityCommitmentRequest const &request, Options opts={})
 Updates an existing capacity commitment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentResponse > SplitCapacityCommitment (std::string const &name, std::int64_t slot_count, Options opts={})
 Splits capacity commitment to two commitments of the same plan and commitment_end_time. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentResponse > SplitCapacityCommitment (google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentRequest const &request, Options opts={})
 Splits capacity commitment to two commitments of the same plan and commitment_end_time. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > MergeCapacityCommitments (std::string const &parent, std::vector< std::string > const &capacity_commitment_ids, Options opts={})
 Merges capacity commitments of the same plan into a single commitment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > MergeCapacityCommitments (google::cloud::bigquery::reservation::v1::MergeCapacityCommitmentsRequest const &request, Options opts={})
 Merges capacity commitments of the same plan into a single commitment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Assignment > CreateAssignment (std::string const &parent, google::cloud::bigquery::reservation::v1::Assignment const &assignment, Options opts={})
 Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Assignment > CreateAssignment (google::cloud::bigquery::reservation::v1::CreateAssignmentRequest const &request, Options opts={})
 Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Assignment > ListAssignments (std::string const &parent, Options opts={})
 Lists assignments. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Assignment > ListAssignments (google::cloud::bigquery::reservation::v1::ListAssignmentsRequest request, Options opts={})
 Lists assignments. More...
 
Status DeleteAssignment (std::string const &name, Options opts={})
 Deletes a assignment. More...
 
Status DeleteAssignment (google::cloud::bigquery::reservation::v1::DeleteAssignmentRequest const &request, Options opts={})
 Deletes a assignment. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Assignment > SearchAssignments (std::string const &parent, std::string const &query, Options opts={})
 Deprecated: Looks up assignments for a specified resource for a particular region. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Assignment > SearchAssignments (google::cloud::bigquery::reservation::v1::SearchAssignmentsRequest request, Options opts={})
 Deprecated: Looks up assignments for a specified resource for a particular region. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Assignment > SearchAllAssignments (std::string const &parent, std::string const &query, Options opts={})
 Looks up assignments for a specified resource for a particular region. More...
 
StreamRange< google::cloud::bigquery::reservation::v1::Assignment > SearchAllAssignments (google::cloud::bigquery::reservation::v1::SearchAllAssignmentsRequest request, Options opts={})
 Looks up assignments for a specified resource for a particular region. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Assignment > MoveAssignment (std::string const &name, std::string const &destination_id, Options opts={})
 Moves an assignment under a new reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Assignment > MoveAssignment (google::cloud::bigquery::reservation::v1::MoveAssignmentRequest const &request, Options opts={})
 Moves an assignment under a new reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Assignment > UpdateAssignment (google::cloud::bigquery::reservation::v1::Assignment const &assignment, google::protobuf::FieldMask const &update_mask, Options opts={})
 Updates an existing assignment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::Assignment > UpdateAssignment (google::cloud::bigquery::reservation::v1::UpdateAssignmentRequest const &request, Options opts={})
 Updates an existing assignment. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > GetBiReservation (std::string const &name, Options opts={})
 Retrieves a BI reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > GetBiReservation (google::cloud::bigquery::reservation::v1::GetBiReservationRequest const &request, Options opts={})
 Retrieves a BI reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > UpdateBiReservation (google::cloud::bigquery::reservation::v1::BiReservation const &bi_reservation, google::protobuf::FieldMask const &update_mask, Options opts={})
 Updates a BI reservation. More...
 
StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > UpdateBiReservation (google::cloud::bigquery::reservation::v1::UpdateBiReservationRequest const &request, Options opts={})
 Updates a BI reservation. More...
 
Copy and move support
 ReservationServiceClient (ReservationServiceClient const &)=default
 
ReservationServiceClientoperator= (ReservationServiceClient const &)=default
 
 ReservationServiceClient (ReservationServiceClient &&)=default
 
ReservationServiceClientoperator= (ReservationServiceClient &&)=default
 

Friends

Equality
bool operator== (ReservationServiceClient const &a, ReservationServiceClient const &b)
 
bool operator!= (ReservationServiceClient const &a, ReservationServiceClient const &b)
 

Detailed Description

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

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructor & Destructor Documentation

◆ ReservationServiceClient() [1/3]

google::cloud::bigquery_reservation_v1::ReservationServiceClient::ReservationServiceClient ( std::shared_ptr< ReservationServiceConnection connection,
Options  opts = {} 
)
explicit

◆ ~ReservationServiceClient()

google::cloud::bigquery_reservation_v1::ReservationServiceClient::~ReservationServiceClient ( )

◆ ReservationServiceClient() [2/3]

google::cloud::bigquery_reservation_v1::ReservationServiceClient::ReservationServiceClient ( ReservationServiceClient const &  )
default

◆ ReservationServiceClient() [3/3]

google::cloud::bigquery_reservation_v1::ReservationServiceClient::ReservationServiceClient ( ReservationServiceClient &&  )
default

Member Function Documentation

◆ CreateAssignment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::CreateAssignment ( google::cloud::bigquery::reservation::v1::CreateAssignmentRequest const &  request,
Options  opts = {} 
)

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.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.CreateAssignmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Assignment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ CreateAssignment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::CreateAssignment ( std::string const &  parent,
google::cloud::bigquery::reservation::v1::Assignment const &  assignment,
Options  opts = {} 
)

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.

Parameters
parentRequired. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod
assignmentAssignment resource to create.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Assignment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ CreateCapacityCommitment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::CreateCapacityCommitment ( google::cloud::bigquery::reservation::v1::CreateCapacityCommitmentRequest const &  request,
Options  opts = {} 
)

Creates a new capacity commitment resource.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ CreateCapacityCommitment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::CreateCapacityCommitment ( std::string const &  parent,
google::cloud::bigquery::reservation::v1::CapacityCommitment const &  capacity_commitment,
Options  opts = {} 
)

Creates a new capacity commitment resource.

Parameters
parentRequired. Resource name of the parent reservation. E.g., projects/myproject/locations/US
capacity_commitmentContent of the capacity commitment to create.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ CreateReservation() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::CreateReservation ( google::cloud::bigquery::reservation::v1::CreateReservationRequest const &  request,
Options  opts = {} 
)

Creates a new reservation resource.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.CreateReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ CreateReservation() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::CreateReservation ( std::string const &  parent,
google::cloud::bigquery::reservation::v1::Reservation const &  reservation,
std::string const &  reservation_id,
Options  opts = {} 
)

Creates a new reservation resource.

Parameters
parentRequired. Project, location. E.g., projects/myproject/locations/US
reservationDefinition of the new reservation to create.
reservation_idThe reservation 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.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ DeleteAssignment() [1/2]

Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteAssignment ( google::cloud::bigquery::reservation::v1::DeleteAssignmentRequest const &  request,
Options  opts = {} 
)

Deletes a assignment.

No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: <organizationA, res1> and <project1, res1>

In this example, deletion of the <organizationA, res1> assignment won't affect the other assignment <project1, res1>. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a `Status` object. If the request failed, the status contains the details of the failure.

◆ DeleteAssignment() [2/2]

Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteAssignment ( std::string const &  name,
Options  opts = {} 
)

Deletes a assignment.

No expansion will happen.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: <organizationA, res1> and <project1, res1>

In this example, deletion of the <organizationA, res1> assignment won't affect the other assignment <project1, res1>. After said deletion, queries from project1 will still use res1 while queries from project2 will switch to use on-demand mode.

Parameters
nameRequired. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a `Status` object. If the request failed, the status contains the details of the failure.

◆ DeleteCapacityCommitment() [1/2]

Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteCapacityCommitment ( google::cloud::bigquery::reservation::v1::DeleteCapacityCommitmentRequest const &  request,
Options  opts = {} 
)

Deletes a capacity commitment.

Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a `Status` object. If the request failed, the status contains the details of the failure.

◆ DeleteCapacityCommitment() [2/2]

Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteCapacityCommitment ( std::string const &  name,
Options  opts = {} 
)

Deletes a capacity commitment.

Attempting to delete capacity commitment before its commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
nameRequired. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a `Status` object. If the request failed, the status contains the details of the failure.

◆ DeleteReservation() [1/2]

Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteReservation ( google::cloud::bigquery::reservation::v1::DeleteReservationRequest const &  request,
Options  opts = {} 
)

Deletes a reservation.

Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.DeleteReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a `Status` object. If the request failed, the status contains the details of the failure.

◆ DeleteReservation() [2/2]

Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteReservation ( std::string const &  name,
Options  opts = {} 
)

Deletes a reservation.

Returns google.rpc.Code.FAILED_PRECONDITION when reservation has assignments.

Parameters
nameRequired. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a `Status` object. If the request failed, the status contains the details of the failure.

◆ GetBiReservation() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetBiReservation ( google::cloud::bigquery::reservation::v1::GetBiReservationRequest const &  request,
Options  opts = {} 
)

Retrieves a BI reservation.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.GetBiReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.BiReservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ GetBiReservation() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetBiReservation ( std::string const &  name,
Options  opts = {} 
)

Retrieves a BI reservation.

Parameters
nameRequired. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.BiReservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ GetCapacityCommitment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetCapacityCommitment ( google::cloud::bigquery::reservation::v1::GetCapacityCommitmentRequest const &  request,
Options  opts = {} 
)

Returns information about the capacity commitment.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ GetCapacityCommitment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetCapacityCommitment ( std::string const &  name,
Options  opts = {} 
)

Returns information about the capacity commitment.

Parameters
nameRequired. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ GetReservation() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetReservation ( google::cloud::bigquery::reservation::v1::GetReservationRequest const &  request,
Options  opts = {} 
)

Returns information about the reservation.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.GetReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ GetReservation() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetReservation ( std::string const &  name,
Options  opts = {} 
)

Returns information about the reservation.

Parameters
nameRequired. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ ListAssignments() [1/2]

StreamRange< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::ListAssignments ( google::cloud::bigquery::reservation::v1::ListAssignmentsRequest  request,
Options  opts = {} 
)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: <organizationA, res1> and <project1, res1>

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.ListAssignmentsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Assignment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ ListAssignments() [2/2]

StreamRange< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::ListAssignments ( std::string const &  parent,
Options  opts = {} 
)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

  • Organization organizationA contains two projects, project1 and project2.
  • Reservation res1 exists and was created previously.
  • CreateAssignment was used previously to define the following associations between entities and reservations: <organizationA, res1> and <project1, res1>

In this example, ListAssignments will just return the above two assignments for reservation res1, and no expansion/merge will happen.

The wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed.

Note "-" cannot be used for projects nor locations.

Parameters
parentRequired. The parent resource name e.g.:
projects/myproject/locations/US/reservations/team1-prod
Or:
projects/myproject/locations/US/reservations/-
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Assignment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ ListCapacityCommitments() [1/2]

StreamRange< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::ListCapacityCommitments ( google::cloud::bigquery::reservation::v1::ListCapacityCommitmentsRequest  request,
Options  opts = {} 
)

Lists all the capacity commitments for the admin project.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.CapacityCommitment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ ListCapacityCommitments() [2/2]

StreamRange< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::ListCapacityCommitments ( std::string const &  parent,
Options  opts = {} 
)

Lists all the capacity commitments for the admin project.

Parameters
parentRequired. Resource name of the parent reservation. E.g., projects/myproject/locations/US
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.CapacityCommitment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ ListReservations() [1/2]

StreamRange< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::ListReservations ( google::cloud::bigquery::reservation::v1::ListReservationsRequest  request,
Options  opts = {} 
)

Lists all the reservations for the project in the specified location.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.ListReservationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Reservation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ ListReservations() [2/2]

StreamRange< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::ListReservations ( std::string const &  parent,
Options  opts = {} 
)

Lists all the reservations for the project in the specified location.

Parameters
parentRequired. The parent resource name containing project and location, e.g.: projects/myproject/locations/US
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Reservation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ MergeCapacityCommitments() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::MergeCapacityCommitments ( google::cloud::bigquery::reservation::v1::MergeCapacityCommitmentsRequest const &  request,
Options  opts = {} 
)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ MergeCapacityCommitments() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::MergeCapacityCommitments ( std::string const &  parent,
std::vector< std::string > const &  capacity_commitment_ids,
Options  opts = {} 
)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
parentParent resource that identifies admin project and location e.g., projects/myproject/locations/us
capacity_commitment_idsIds of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ MoveAssignment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::MoveAssignment ( google::cloud::bigquery::reservation::v1::MoveAssignmentRequest const &  request,
Options  opts = {} 
)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.MoveAssignmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Assignment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ MoveAssignment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::MoveAssignment ( std::string const &  name,
std::string const &  destination_id,
Options  opts = {} 
)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.

Parameters
nameRequired. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123
destination_idThe new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Assignment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ operator=() [1/2]

ReservationServiceClient & google::cloud::bigquery_reservation_v1::ReservationServiceClient::operator= ( ReservationServiceClient &&  )
default

◆ operator=() [2/2]

ReservationServiceClient & google::cloud::bigquery_reservation_v1::ReservationServiceClient::operator= ( ReservationServiceClient const &  )
default

◆ SearchAllAssignments() [1/2]

StreamRange< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::SearchAllAssignments ( google::cloud::bigquery::reservation::v1::SearchAllAssignmentsRequest  request,
Options  opts = {} 
)

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/*&zwj;/locations/*, instead of projects/*&zwj;/locations/*reservations/*.
Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Assignment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ SearchAllAssignments() [2/2]

StreamRange< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::SearchAllAssignments ( std::string const &  parent,
std::string const &  query,
Options  opts = {} 
)

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/*&zwj;/locations/*, instead of projects/*&zwj;/locations/*reservations/*.
Parameters
parentRequired. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US.
queryPlease specify resource name as assignee in the query.
Examples:
  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Assignment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ SearchAssignments() [1/2]

StreamRange< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::SearchAssignments ( google::cloud::bigquery::reservation::v1::SearchAssignmentsRequest  request,
Options  opts = {} 
)

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/*&zwj;/locations/*, instead of projects/*&zwj;/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Assignment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ SearchAssignments() [2/2]

StreamRange< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::SearchAssignments ( std::string const &  parent,
std::string const &  query,
Options  opts = {} 
)

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/*&zwj;/locations/*, instead of projects/*&zwj;/locations/*reservations/*.

Note "-" cannot be used for projects nor locations.

Parameters
parentRequired. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US.
queryPlease specify resource name as assignee in the query.
Examples:
  • assignee=projects/myproject
  • assignee=folders/123
  • assignee=organizations/456
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a `StatusOr` as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.reservation.v1.Assignment, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

◆ SplitCapacityCommitment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentResponse > google::cloud::bigquery_reservation_v1::ReservationServiceClient::SplitCapacityCommitment ( google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentRequest const &  request,
Options  opts = {} 
)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ SplitCapacityCommitment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::SplitCapacityCommitmentResponse > google::cloud::bigquery_reservation_v1::ReservationServiceClient::SplitCapacityCommitment ( std::string const &  name,
std::int64_t  slot_count,
Options  opts = {} 
)

Splits capacity commitment to two commitments of the same plan and commitment_end_time.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you delete the first one after the commitment end time passes.

Parameters
nameRequired. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123
slot_countNumber of slots in the capacity commitment after the split.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateAssignment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateAssignment ( google::cloud::bigquery::reservation::v1::Assignment const &  assignment,
google::protobuf::FieldMask const &  update_mask,
Options  opts = {} 
)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
assignmentContent of the assignment to update.
update_maskStandard field mask for the set of fields to be updated.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Assignment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateAssignment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::Assignment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateAssignment ( google::cloud::bigquery::reservation::v1::UpdateAssignmentRequest const &  request,
Options  opts = {} 
)

Updates an existing assignment.

Only the priority field can be updated.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Assignment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateBiReservation() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateBiReservation ( google::cloud::bigquery::reservation::v1::BiReservation const &  bi_reservation,
google::protobuf::FieldMask const &  update_mask,
Options  opts = {} 
)

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.

Parameters
bi_reservationA reservation to update.
update_maskA list of fields to be updated in this request.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.BiReservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateBiReservation() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateBiReservation ( google::cloud::bigquery::reservation::v1::UpdateBiReservationRequest const &  request,
Options  opts = {} 
)

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.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.BiReservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateCapacityCommitment() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateCapacityCommitment ( google::cloud::bigquery::reservation::v1::CapacityCommitment const &  capacity_commitment,
google::protobuf::FieldMask const &  update_mask,
Options  opts = {} 
)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
capacity_commitmentContent of the capacity commitment to update.
update_maskStandard field mask for the set of fields to be updated.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateCapacityCommitment() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::CapacityCommitment > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateCapacityCommitment ( google::cloud::bigquery::reservation::v1::UpdateCapacityCommitmentRequest const &  request,
Options  opts = {} 
)

Updates an existing capacity commitment.

Only plan and renewal_plan fields can be updated.

Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.CapacityCommitment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateReservation() [1/2]

StatusOr< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateReservation ( google::cloud::bigquery::reservation::v1::Reservation const &  reservation,
google::protobuf::FieldMask const &  update_mask,
Options  opts = {} 
)

Updates an existing reservation resource.

Parameters
reservationContent of the reservation to update.
update_maskStandard field mask for the set of fields to be updated.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

◆ UpdateReservation() [2/2]

StatusOr< google::cloud::bigquery::reservation::v1::Reservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::UpdateReservation ( google::cloud::bigquery::reservation::v1::UpdateReservationRequest const &  request,
Options  opts = {} 
)

Updates an existing reservation resource.

Parameters
requestUnary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.reservation.v1.UpdateReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
the result of the RPC. The response message type (google.cloud.bigquery.reservation.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the `StatusOr` contains the error details.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( ReservationServiceClient const &  a,
ReservationServiceClient const &  b 
)
friend

◆ operator==

bool operator== ( ReservationServiceClient const &  a,
ReservationServiceClient const &  b 
)
friend