Skip to main content

reservations

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

Overview

Namereservations
TypeResource
Idgoogle.pubsublite.reservations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
throughputCapacitystring (int64)The 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
admin_projects_locations_reservations_getselectprojectsId, locationsId, reservationsIdReturns the reservation configuration.
admin_projects_locations_reservations_listselectprojectsId, locationsIdpageSize, pageTokenReturns the list of reservations for the given project.
admin_projects_locations_reservations_createinsertprojectsId, locationsIdreservationIdCreates a new reservation.
admin_projects_locations_reservations_patchupdateprojectsId, locationsId, reservationsIdupdateMaskUpdates properties of the specified reservation.
admin_projects_locations_reservations_deletedeleteprojectsId, locationsId, reservationsIdDeletes the specified reservation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
reservationsIdstring
pageSizeinteger (int32)
pageTokenstring
reservationIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Returns the reservation configuration.

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

INSERT examples

Creates a new reservation.

INSERT INTO google.pubsublite.reservations (
data__name,
data__throughputCapacity,
projectsId,
locationsId,
reservationId
)
SELECT
'{{ name }}',
'{{ throughputCapacity }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ reservationId }}'
RETURNING
name,
throughputCapacity
;

UPDATE examples

Updates properties of the specified reservation.

UPDATE google.pubsublite.reservations
SET
data__name = '{{ name }}',
data__throughputCapacity = '{{ throughputCapacity }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND reservationsId = '{{ reservationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
throughputCapacity;

DELETE examples

Deletes the specified reservation.

DELETE FROM google.pubsublite.reservations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND reservationsId = '{{ reservationsId }}' --required;