subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | google.pubsublite.subscriptions |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
admin_projects_locations_subscriptions_get | SELECT | locationsId, projectsId, subscriptionsId | Returns the subscription configuration. |
admin_projects_locations_subscriptions_list | SELECT | locationsId, projectsId | Returns the list of subscriptions for the given project. |
admin_projects_locations_topics_subscriptions_list | SELECT | locationsId, projectsId, topicsId | Lists the subscriptions attached to the specified topic. |
admin_projects_locations_subscriptions_create | INSERT | locationsId, projectsId | Creates a new subscription. |
admin_projects_locations_subscriptions_delete | DELETE | locationsId, projectsId, subscriptionsId | Deletes the specified subscription. |
admin_projects_locations_subscriptions_patch | UPDATE | locationsId, projectsId, subscriptionsId | Updates properties of the specified subscription. |
admin_projects_locations_subscriptions_seek | EXEC | locationsId, projectsId, subscriptionsId | Performs an out-of-band seek for a subscription to a specified target, which may be timestamps or named positions within the message backlog. Seek translates these targets to cursors for each partition and orchestrates subscribers to start consuming messages from these seek cursors. If an operation is returned, the seek has been registered and subscribers will eventually receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a minimum supported client library version and not a system that tracks cursors independently of Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported clients. If clients would like to know when subscribers react to the seek (or not), they can poll the operation. The seek operation will succeed and complete once subscribers are ready to receive messages from the seek cursors for all partitions of the topic. This means that the seek operation will not complete until all subscribers come online. If the previous seek operation has not yet completed, it will be aborted and the new invocation of seek will supersede it. |
cursor_projects_locations_subscriptions_commit_cursor | EXEC | locationsId, projectsId, subscriptionsId | Updates the committed cursor. |
SELECT
examples
Returns the list of subscriptions for the given project.
SELECT
column_anon
FROM google.pubsublite.subscriptions
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new subscriptions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.pubsublite.subscriptions (
locationsId,
projectsId,
name,
topic,
deliveryConfig,
exportConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ topic }}',
'{{ deliveryConfig }}',
'{{ exportConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: topic
value: string
- name: deliveryConfig
value:
- name: deliveryRequirement
value: string
- name: exportConfig
value:
- name: desiredState
value: string
- name: currentState
value: string
- name: deadLetterTopic
value: string
- name: pubsubConfig
value:
- name: topic
value: string
UPDATE
example
Updates a subscriptions
resource.
/*+ update */
UPDATE google.pubsublite.subscriptions
SET
name = '{{ name }}',
topic = '{{ topic }}',
deliveryConfig = '{{ deliveryConfig }}',
exportConfig = '{{ exportConfig }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND subscriptionsId = '{{ subscriptionsId }}';
DELETE
example
Deletes the specified subscriptions
resource.
/*+ delete */
DELETE FROM google.pubsublite.subscriptions
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND subscriptionsId = '{{ subscriptionsId }}';