Skip to main content

reservations

Creates, updates, deletes, gets or lists a reservations resource.

Overview

Namereservations
TypeResource
Idgoogle.pubsublite.reservations

Fields

NameDatatypeDescription
namestringThe name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
throughputCapacitystringThe reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually.

Methods

NameAccessible byRequired ParamsDescription
admin_projects_locations_reservations_getSELECTlocationsId, projectsId, reservationsIdReturns the reservation configuration.
admin_projects_locations_reservations_listSELECTlocationsId, projectsIdReturns the list of reservations for the given project.
admin_projects_locations_reservations_createINSERTlocationsId, projectsIdCreates a new reservation.
admin_projects_locations_reservations_deleteDELETElocationsId, projectsId, reservationsIdDeletes the specified reservation.
admin_projects_locations_reservations_patchUPDATElocationsId, projectsId, reservationsIdUpdates properties of the specified reservation.

SELECT examples

Returns the list of reservations for the given project.

SELECT
name,
throughputCapacity
FROM google.pubsublite.reservations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new reservations resource.

/*+ create */
INSERT INTO google.pubsublite.reservations (
locationsId,
projectsId,
name,
throughputCapacity
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ throughputCapacity }}'
;

UPDATE example

Updates a reservations resource.

/*+ update */
UPDATE google.pubsublite.reservations
SET
name = '{{ name }}',
throughputCapacity = '{{ throughputCapacity }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND reservationsId = '{{ reservationsId }}';

DELETE example

Deletes the specified reservations resource.

/*+ delete */
DELETE FROM google.pubsublite.reservations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND reservationsId = '{{ reservationsId }}';