reservations
Creates, updates, deletes, gets or lists a reservations
resource.
Overview
Name | reservations |
Type | Resource |
Id | google.pubsublite.reservations |
Fields
The following fields are returned by SELECT
queries:
- admin_projects_locations_reservations_get
- admin_projects_locations_reservations_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |
throughputCapacity | string (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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |
throughputCapacity | string (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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
admin_projects_locations_reservations_get | select | projectsId , locationsId , reservationsId | Returns the reservation configuration. | |
admin_projects_locations_reservations_list | select | projectsId , locationsId | pageSize , pageToken | Returns the list of reservations for the given project. |
admin_projects_locations_reservations_create | insert | projectsId , locationsId | reservationId | Creates a new reservation. |
admin_projects_locations_reservations_patch | update | projectsId , locationsId , reservationsId | updateMask | Updates properties of the specified reservation. |
admin_projects_locations_reservations_delete | delete | projectsId , locationsId , reservationsId | Deletes 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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
reservationsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
reservationId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- admin_projects_locations_reservations_get
- admin_projects_locations_reservations_list
Returns the reservation configuration.
SELECT
name,
throughputCapacity
FROM google.pubsublite.reservations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND reservationsId = '{{ reservationsId }}' -- required;
Returns the list of reservations for the given project.
SELECT
name,
throughputCapacity
FROM google.pubsublite.reservations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- admin_projects_locations_reservations_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: reservations
props:
- name: projectsId
value: string
description: Required parameter for the reservations resource.
- name: locationsId
value: string
description: Required parameter for the reservations resource.
- name: name
value: string
description: >
The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
- name: throughputCapacity
value: string
description: >
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.
- name: reservationId
value: string
UPDATE
examples
- admin_projects_locations_reservations_patch
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
- admin_projects_locations_reservations_delete
Deletes the specified reservation.
DELETE FROM google.pubsublite.reservations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND reservationsId = '{{ reservationsId }}' --required;