Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
|
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 | |
ReservationServiceClient & | operator= (ReservationServiceClient const &)=default |
ReservationServiceClient (ReservationServiceClient &&)=default | |
ReservationServiceClient & | operator= (ReservationServiceClient &&)=default |
Friends | |
Equality | |
bool | operator== (ReservationServiceClient const &a, ReservationServiceClient const &b) |
bool | operator!= (ReservationServiceClient const &a, ReservationServiceClient const &b) |
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
.
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.
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.
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.
|
explicit |
google::cloud::bigquery_reservation_v1::ReservationServiceClient::~ReservationServiceClient | ( | ) |
|
default |
|
default |
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:
organizationA
contains two projects, project1
and project2
.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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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:
organizationA
contains two projects, project1
and project2
.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.
parent | Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod |
assignment | Assignment resource to create. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
parent | Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US |
capacity_commitment | Content of the capacity commitment to create. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
parent | Required. Project, location. E.g., projects/myproject/locations/US |
reservation | Definition of the new reservation to create. |
reservation_id | The 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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:
organizationA
contains two projects, project1
and project2
.res1
exists and was created previously.<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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
Status google::cloud::bigquery_reservation_v1::ReservationServiceClient::DeleteAssignment | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Deletes a assignment.
No expansion will happen.
Example:
organizationA
contains two projects, project1
and project2
.res1
exists and was created previously.<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.
name | Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123 |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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
.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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
.
name | Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123 |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
name | Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::cloud::bigquery::reservation::v1::BiReservation > google::cloud::bigquery_reservation_v1::ReservationServiceClient::GetBiReservation | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Retrieves a BI reservation.
name | Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
name | Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123 |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
name | Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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:
organizationA
contains two projects, project1
and project2
.res1
exists and was created previously.<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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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:
organizationA
contains two projects, project1
and project2
.res1
exists and was created previously.<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.
parent | Required. The parent resource name e.g.: projects/myproject/locations/US/reservations/team1-prod Or: projects/myproject/locations/US/reservations/- |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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.
parent | Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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.
parent | Required. The parent resource name containing project and location, e.g.: projects/myproject/locations/US |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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
.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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
.
parent | Parent resource that identifies admin project and location e.g., projects/myproject/locations/us |
capacity_commitment_ids | Ids 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 |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
name | Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123 |
destination_id | The new reservation ID, e.g.: projects/myotherproject/locations/US/reservations/team2-prod |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
|
default |
|
default |
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:
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:
projects/*‍/locations/*
, instead of projects/*‍/locations/*reservations/*
.request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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:
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:
projects/*‍/locations/*
, instead of projects/*‍/locations/*reservations/*
.parent | Required. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US . |
query | Please specify resource name as assignee in the query. Examples:
|
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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:
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:
projects/*‍/locations/*
, instead of projects/*‍/locations/*reservations/*
.Note "-" cannot be used for projects nor locations.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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:
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:
projects/*‍/locations/*
, instead of projects/*‍/locations/*reservations/*
.Note "-" cannot be used for projects nor locations.
parent | Required. The resource name of the admin project(containing project and
location), e.g.: projects/myproject/locations/US . |
query | Please specify resource name as assignee in the query. Examples:
|
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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. 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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
name | Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123 |
slot_count | Number of slots in the capacity commitment after the split. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
assignment | Content of the assignment to update. |
update_mask | Standard field mask for the set of fields to be updated. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
bi_reservation | A reservation to update. |
update_mask | A list of fields to be updated in this request. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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
.
capacity_commitment | Content of the capacity commitment to update. |
update_mask | Standard field mask for the set of fields to be updated. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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
.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
reservation | Content of the reservation to update. |
update_mask | Standard field mask for the set of fields to be updated. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.
request | Unary 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. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
|
friend |
|
friend |