Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

BigQueryReservation

import { BigQueryReservation } from "https://googleapis.deno.dev/v1/bigqueryreservation:v1.ts";

A service to modify your BigQuery flat-rate reservations.

class BigQueryReservation {
constructor(client?: CredentialsClient, baseUrl?: string);
locations;
 
async projectsLocationsCapacityCommitmentsCreate(
parent: string,
): Promise<CapacityCommitment>;
async projectsLocationsCapacityCommitmentsDelete(name: string, opts?: ProjectsLocationsCapacityCommitmentsDeleteOptions): Promise<Empty>;
async projectsLocationsCapacityCommitmentsGet(name: string): Promise<CapacityCommitment>;
async projectsLocationsCapacityCommitmentsList(parent: string, opts?: ProjectsLocationsCapacityCommitmentsListOptions): Promise<ListCapacityCommitmentsResponse>;
async projectsLocationsCapacityCommitmentsMerge(parent: string, req: MergeCapacityCommitmentsRequest): Promise<CapacityCommitment>;
async projectsLocationsCapacityCommitmentsPatch(
name: string,
): Promise<CapacityCommitment>;
async projectsLocationsCapacityCommitmentsSplit(name: string, req: SplitCapacityCommitmentRequest): Promise<SplitCapacityCommitmentResponse>;
async projectsLocationsGetBiReservation(name: string): Promise<BiReservation>;
async projectsLocationsReservationsAssignmentsCreate(
parent: string,
): Promise<Assignment>;
async projectsLocationsReservationsAssignmentsDelete(name: string): Promise<Empty>;
async projectsLocationsReservationsAssignmentsList(parent: string, opts?: ProjectsLocationsReservationsAssignmentsListOptions): Promise<ListAssignmentsResponse>;
async projectsLocationsReservationsAssignmentsMove(name: string, req: MoveAssignmentRequest): Promise<Assignment>;
async projectsLocationsReservationsAssignmentsPatch(
name: string,
): Promise<Assignment>;
async projectsLocationsReservationsCreate(
parent: string,
): Promise<Reservation>;
async projectsLocationsReservationsDelete(name: string): Promise<Empty>;
async projectsLocationsReservationsFailoverReservation(name: string, req: FailoverReservationRequest): Promise<Reservation>;
async projectsLocationsReservationsGet(name: string): Promise<Reservation>;
async projectsLocationsReservationsList(parent: string, opts?: ProjectsLocationsReservationsListOptions): Promise<ListReservationsResponse>;
async projectsLocationsReservationsPatch(
name: string,
): Promise<Reservation>;
async projectsLocationsSearchAllAssignments(parent: string, opts?: ProjectsLocationsSearchAllAssignmentsOptions): Promise<SearchAllAssignmentsResponse>;
async projectsLocationsSearchAssignments(parent: string, opts?: ProjectsLocationsSearchAssignmentsOptions): Promise<SearchAssignmentsResponse>;
async projectsLocationsUpdateBiReservation(
name: string,
): Promise<BiReservation>;
}

§Constructors

§
new BigQueryReservation(client?: CredentialsClient, baseUrl?: string)
[src]

§Properties

§
locations
[src]

Updates an existing reservation resource.

§Methods

§
projectsLocationsCapacityCommitmentsCreate(parent: string, req: CapacityCommitment, opts?: ProjectsLocationsCapacityCommitmentsCreateOptions): Promise<CapacityCommitment>
[src]

Creates a new capacity commitment resource.

@param parent

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

§
projectsLocationsCapacityCommitmentsDelete(name: string, opts?: ProjectsLocationsCapacityCommitmentsDeleteOptions): Promise<Empty>
[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.

@param name

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

§
projectsLocationsCapacityCommitmentsGet(name: string): Promise<CapacityCommitment>
[src]

Returns information about the capacity commitment.

@param name

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

§
projectsLocationsCapacityCommitmentsList(parent: string, opts?: ProjectsLocationsCapacityCommitmentsListOptions): Promise<ListCapacityCommitmentsResponse>
[src]

Lists all the capacity commitments for the admin project.

@param parent

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

§
projectsLocationsCapacityCommitmentsMerge(parent: string, req: MergeCapacityCommitmentsRequest): Promise<CapacityCommitment>
[src]

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.

@param parent

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

§
projectsLocationsCapacityCommitmentsPatch(name: string, req: CapacityCommitment, opts?: ProjectsLocationsCapacityCommitmentsPatchOptions): Promise<CapacityCommitment>
[src]

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.

@param name

Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123 The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

§
projectsLocationsCapacityCommitmentsSplit(name: string, req: SplitCapacityCommitmentRequest): Promise<SplitCapacityCommitmentResponse>
[src]

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.

@param name

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

§
projectsLocationsGetBiReservation(name: string): Promise<BiReservation>
[src]

Retrieves a BI reservation.

@param name

Required. Name of the requested reservation, for example: projects/{project_id}/locations/{location_id}/biReservation

§
projectsLocationsReservationsAssignmentsCreate(parent: string, req: Assignment, opts?: ProjectsLocationsReservationsAssignmentsCreateOptions): Promise<Assignment>
[src]

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.

@param parent

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

§
projectsLocationsReservationsAssignmentsDelete(name: string): Promise<Empty>
[src]

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

@param name

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

§
projectsLocationsReservationsAssignmentsList(parent: string, opts?: ProjectsLocationsReservationsAssignmentsListOptions): Promise<ListAssignmentsResponse>
[src]

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: and 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.

@param parent

Required. The parent resource name e.g.: projects/myproject/locations/US/reservations/team1-prod Or: projects/myproject/locations/US/reservations/-

§
projectsLocationsReservationsAssignmentsMove(name: string, req: MoveAssignmentRequest): Promise<Assignment>
[src]

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.

@param name

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

§
projectsLocationsReservationsAssignmentsPatch(name: string, req: Assignment, opts?: ProjectsLocationsReservationsAssignmentsPatchOptions): Promise<Assignment>
[src]

Updates an existing assignment. Only the priority field can be updated.

@param name

Output only. Name of the resource. E.g.: projects/myproject/locations/US/reservations/team1-prod/assignments/123. The assignment_id must only contain lower case alphanumeric characters or dashes and the max length is 64 characters.

§
projectsLocationsReservationsCreate(parent: string, req: Reservation, opts?: ProjectsLocationsReservationsCreateOptions): Promise<Reservation>
[src]

Creates a new reservation resource.

@param parent

Required. Project, location. E.g., projects/myproject/locations/US

§
projectsLocationsReservationsDelete(name: string): Promise<Empty>
[src]

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

@param name

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

§
projectsLocationsReservationsFailoverReservation(name: string, req: FailoverReservationRequest): Promise<Reservation>
[src]

Failover a reservation to the secondary location. The operation should be done in the current secondary location, which will be promoted to the new primary location for the reservation. Attempting to failover a reservation in the current primary location will fail with the error code google.rpc.Code.FAILED_PRECONDITION.

@param name

Required. Resource name of the reservation to failover. E.g., projects/myproject/locations/US/reservations/team1-prod

§
projectsLocationsReservationsGet(name: string): Promise<Reservation>
[src]

Returns information about the reservation.

@param name

Required. Resource name of the reservation to retrieve. E.g., projects/myproject/locations/US/reservations/team1-prod

§
projectsLocationsReservationsList(parent: string, opts?: ProjectsLocationsReservationsListOptions): Promise<ListReservationsResponse>
[src]

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

@param parent

Required. The parent resource name containing project and location, e.g.: projects/myproject/locations/US

§
projectsLocationsReservationsPatch(name: string, req: Reservation, opts?: ProjectsLocationsReservationsPatchOptions): Promise<Reservation>
[src]
§
projectsLocationsSearchAllAssignments(parent: string, opts?: ProjectsLocationsSearchAllAssignmentsOptions): Promise<SearchAllAssignmentsResponse>
[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. 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/*\/locations/*, instead of projects/*\/locations/*reservations/*.

@param parent

Required. The resource name with location (project name could be the wildcard '-'), e.g.: projects/-/locations/US.

§
projectsLocationsSearchAssignments(parent: string, opts?: ProjectsLocationsSearchAssignmentsOptions): Promise<SearchAssignmentsResponse>
[src]

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/*\/locations/*, instead of projects/*\/locations/*reservations/*. Note "-" cannot be used for projects nor locations.

@param parent

Required. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US.

§
projectsLocationsUpdateBiReservation(name: string, req: BiReservation, opts?: ProjectsLocationsUpdateBiReservationOptions): Promise<BiReservation>
[src]

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.

@param name

The resource name of the singleton BI reservation. Reservation names have the form projects/{project_id}/locations/{location_id}/biReservation.