reservations
Creates, updates, deletes, gets or lists a reservations
resource.
Overview
Name | reservations |
Type | Resource |
Id | google.pubsublite.reservations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |
throughputCapacity | string | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
admin_projects_locations_reservations_get | SELECT | locationsId, projectsId, reservationsId | Returns the reservation configuration. |
admin_projects_locations_reservations_list | SELECT | locationsId, projectsId | Returns the list of reservations for the given project. |
admin_projects_locations_reservations_create | INSERT | locationsId, projectsId | Creates a new reservation. |
admin_projects_locations_reservations_delete | DELETE | locationsId, projectsId, reservationsId | Deletes the specified reservation. |
admin_projects_locations_reservations_patch | UPDATE | locationsId, projectsId, reservationsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.pubsublite.reservations (
locationsId,
projectsId,
name,
throughputCapacity
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ throughputCapacity }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: throughputCapacity
value: string
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 }}';