[][src]Struct gcp_client::google::cloud::bigquery::reservation::v1beta1::reservation_service_client::ReservationServiceClient

pub struct ReservationServiceClient<T> { /* fields omitted */ }

This API allows users to manage their flat-rate BigQuery reservations.

A reservation provides computational resource guarantees, in the form of slots, to users. A slot is a unit of computational power in BigQuery, and serves as the basic unit of parallelism. In a scan of a multi-partitioned table, a single slot operates on a single partition of the table. A reservation resource exists as a child resource of the admin project and location, e.g.: projects/myproject/locations/US/reservations/reservationName.

A capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. A capacity commitment resource exists as a child resource of the admin project and location, e.g.: projects/myproject/locations/US/capacityCommitments/id.

Implementations

impl<T> ReservationServiceClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn create_reservation<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateReservationRequest>
) -> Result<Response<Reservation>, Status>
[src]

Creates a new reservation resource.

pub async fn list_reservations<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListReservationsRequest>
) -> Result<Response<ListReservationsResponse>, Status>
[src]

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

pub async fn get_reservation<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetReservationRequest>
) -> Result<Response<Reservation>, Status>
[src]

Returns information about the reservation.

pub async fn delete_reservation<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteReservationRequest>
) -> Result<Response<()>, Status>
[src]

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

pub async fn update_reservation<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateReservationRequest>
) -> Result<Response<Reservation>, Status>
[src]

Updates an existing reservation resource.

pub async fn list_capacity_commitments<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListCapacityCommitmentsRequest>
) -> Result<Response<ListCapacityCommitmentsResponse>, Status>
[src]

Lists all the capacity commitments for the admin project.

pub async fn get_capacity_commitment<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetCapacityCommitmentRequest>
) -> Result<Response<CapacityCommitment>, Status>
[src]

Returns information about the capacity commitment.

pub async fn delete_capacity_commitment<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteCapacityCommitmentRequest>
) -> Result<Response<()>, Status>
[src]

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.

pub async fn update_capacity_commitment<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateCapacityCommitmentRequest>
) -> Result<Response<CapacityCommitment>, Status>
[src]

Updates an existing capacity commitment.

Only renewal_plan field can be updated.

pub async fn split_capacity_commitment<'_>(
    &'_ mut self,
    request: impl IntoRequest<SplitCapacityCommitmentRequest>
) -> Result<Response<SplitCapacityCommitmentResponse>, Status>
[src]

Splits capacity commitment to two commitments of the same plan and commitment_end_time. A common use case to do that is to perform a downgrade e.g., in order to downgrade from 10000 slots to 8000, one might split 10000 capacity commitment to 2000 and 8000, change the plan of the first one to flex and then delete it.

pub async fn merge_capacity_commitments<'_>(
    &'_ mut self,
    request: impl IntoRequest<MergeCapacityCommitmentsRequest>
) -> Result<Response<CapacityCommitment>, Status>
[src]

Merges capacity commitments of the same plan into one. Resulting capacity commitment has the longer commitment_end_time out of the two. Attempting to merge capacity commitments of different plan will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

pub async fn create_assignment<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateAssignmentRequest>
) -> Result<Response<Assignment>, Status>
[src]

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.

pub async fn list_assignments<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListAssignmentsRequest>
) -> Result<Response<ListAssignmentsResponse>, Status>
[src]

Lists assignments. Only explicitly created assignments will be returned. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly: <organizationA, res1> <project1, res1> Then this API will just return the above two assignments for reservation res1, and no expansion/merge will happen. 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.

pub async fn delete_assignment<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteAssignmentRequest>
) -> Result<Response<()>, Status>
[src]

Deletes a assignment. No expansion will happen. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly: <organizationA, res1> <project1, res1> Then deletion of <organizationA, res1> won't affect <project1, res1>. After deletion of <organizationA, res1>, queries from project1 will still use res1, while queries from project2 will use on-demand mode.

pub async fn search_assignments<'_>(
    &'_ mut self,
    request: impl IntoRequest<SearchAssignmentsRequest>
) -> Result<Response<SearchAssignmentsResponse>, Status>
[src]

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. 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:
  3. permission on the assignee will be verified in this API.
  4. Hierarchy lookup (project->folder->organization) happens in this API.
  5. Parent here is projects//locations/, instead of projects/*/locations/reservations/. Note "-" cannot be used for projects nor locations.

pub async fn move_assignment<'_>(
    &'_ mut self,
    request: impl IntoRequest<MoveAssignmentRequest>
) -> Result<Response<Assignment>, Status>
[src]

Moves a assignment under a new reservation. Customers can do this by deleting the existing assignment followed by creating another assignment under the new reservation, but this method provides a transactional way to do so, to make sure the assignee always has an associated reservation. Without the method customers might see some queries run on-demand which might be unexpected.

pub async fn get_bi_reservation<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetBiReservationRequest>
) -> Result<Response<BiReservation>, Status>
[src]

Retrieves a BI reservation.

pub async fn update_bi_reservation<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateBiReservationRequest>
) -> Result<Response<BiReservation>, Status>
[src]

Updates a BI reservation. Only fields specified in the field_mask are updated. 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.

Trait Implementations

impl<T: Clone> Clone for ReservationServiceClient<T>[src]

impl<T> Debug for ReservationServiceClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for ReservationServiceClient<T>

impl<T> Send for ReservationServiceClient<T> where
    T: Send

impl<T> Sync for ReservationServiceClient<T> where
    T: Sync

impl<T> Unpin for ReservationServiceClient<T> where
    T: Unpin

impl<T> !UnwindSafe for ReservationServiceClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]