Skip to main content

@swamp/gcp/pubsub

v2026.04.23.1

Google Cloud pubsub infrastructure models

Repository

https://github.com/systeminit/swamp-extensions

Labels

gcpgoogle-cloudpubsubcloudinfrastructure

Contents

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/gcp/pubsub

@swamp/gcp/pubsub/schemasv2026.04.23.1schemas.ts

Global Arguments

ArgumentTypeDescription
definition?stringThe definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
name?stringRequired. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
type?enumThe type of the schema definition.
schemaId?stringThe ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a schemas
getGet a schemas
ArgumentTypeDescription
identifierstringThe name of the schemas
deleteDelete the schemas
ArgumentTypeDescription
identifierstringThe name of the schemas
syncSync schemas state from GCP
commitcommit
ArgumentTypeDescription
schema?any
list_revisionslist revisions
rollbackrollback
ArgumentTypeDescription
revisionId?any
validatevalidate
ArgumentTypeDescription
schema?any
validate_messagevalidate message
ArgumentTypeDescription
encoding?any
message?any
name?any
schema?any

Resources

state(infinite)— A schema resource.
@swamp/gcp/pubsub/snapshotsv2026.04.23.1snapshots.ts

Global Arguments

ArgumentTypeDescription
labels?recordOptional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
subscription?stringRequired. The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the subscription. More precisely, this is defined as the messages in the subscription's backlog that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as well as: (b) Any messages published to the subscription's topic following the successful completion of the CreateSnapshot request. Format is `projects/{project}/s
tags?recordOptional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
snapshot?objectA snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.
updateMask?stringRequired. Indicates which fields in the provided snapshot to update. Must be specified and non-empty.
namestringRequired. User-provided name for this snapshot. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription. Note that for REST API requests, you must specify a name. See the [resource name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is `projects/{project}/snapshots/{snap}`.
createCreate a snapshots
getGet a snapshots
ArgumentTypeDescription
identifierstringThe name of the snapshots
updateUpdate snapshots attributes
deleteDelete the snapshots
ArgumentTypeDescription
identifierstringThe name of the snapshots
syncSync snapshots state from GCP

Resources

state(infinite)— A snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pu...
@swamp/gcp/pubsub/subscriptionsv2026.04.23.1subscriptions.ts

Global Arguments

ArgumentTypeDescription
ackDeadlineSeconds?numberOptional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be _outstanding_. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAck
analyticsHubSubscriptionInfo?objectInformation about an associated [Analytics Hub subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
bigqueryConfig?objectConfiguration for a BigQuery subscription.
bigtableConfig?objectConfiguration for a Bigtable subscription. The Pub/Sub message will be written to a Bigtable row as follows: - row key: subscription name and message ID delimited by #. - columns: message bytes written to a single column family "data" with an empty-string column qualifier. - cell timestamp: the message publish timestamp.
cloudStorageConfig?objectConfiguration for a Cloud Storage subscription.
deadLetterPolicy?objectDead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.
detached?booleanOptional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.
enableExactlyOnceDelivery?booleanOptional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publishe
enableMessageOrdering?booleanOptional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.
expirationPolicy?objectA policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).
filter?stringOptional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.
labels?recordOptional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
messageRetentionDuration?stringOptional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes.
messageTransformsarray
name?stringRequired. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
pushConfig?objectConfiguration for a push delivery endpoint.
retainAckedMessages?booleanOptional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-acknowledged messages.
retryPolicy?objectA policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.
tags?recordOptional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
topic?stringRequired. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted.
subscription?objectOptional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified.
name?stringRequired. Identifier. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
pushConfig?objectConfiguration for a push delivery endpoint.
retainAckedMessages?booleanOptional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-acknowledged messages.
retryPolicy?objectA policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.
state?enumOutput only. An output-only field indicating whether or not the subscription can receive messages.
tags?recordOptional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
topic?stringRequired. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted.
topicMessageRetentionDuration?stringOutput only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests.
updateMask?stringRequired. Indicates which fields in the provided subscription to update. Must be specified and non-empty.
createCreate a subscriptions
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a subscriptions
ArgumentTypeDescription
identifierstringThe name of the subscriptions
updateUpdate subscriptions attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the subscriptions
ArgumentTypeDescription
identifierstringThe name of the subscriptions
syncSync subscriptions state from GCP
acknowledgeacknowledge
ArgumentTypeDescription
ackIds?any
detachdetach
modify_ack_deadlinemodify ack deadline
ArgumentTypeDescription
ackDeadlineSeconds?any
ackIds?any
modify_push_configmodify push config
ArgumentTypeDescription
pushConfig?any
pullpull
ArgumentTypeDescription
maxMessages?any
returnImmediately?any
seekseek
ArgumentTypeDescription
snapshot?any
time?any

Resources

state(infinite)— A subscription resource. If none of `push_config`, `bigquery_config`, or `clo...
@swamp/gcp/pubsub/topicsv2026.04.23.1topics.ts

Global Arguments

ArgumentTypeDescription
ingestionDataSourceSettings?objectSettings for an ingestion data source on a topic.
kmsKeyName?stringOptional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
labels?recordOptional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
messageRetentionDuration?stringOptional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings o
messageStoragePolicy?objectA policy constraining the storage of messages published to the topic.
messageTransformsarray
name?stringRequired. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
satisfiesPzs?booleanOptional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
schemaSettings?objectSettings for validating messages published against a schema.
tags?recordOptional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
topic?objectOptional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.
name?stringRequired. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
satisfiesPzs?booleanOptional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
schemaSettings?objectSettings for validating messages published against a schema.
state?enumOutput only. An output-only field indicating the state of the topic.
tags?recordOptional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
updateMask?stringRequired. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if `update_mask` contains "message_storage_policy" but the `message_storage_policy` is not set in the `topic` provided above, then the updated value is determined by the policy configured at the project or organization level.
createCreate a topics
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a topics
ArgumentTypeDescription
identifierstringThe name of the topics
updateUpdate topics attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the topics
ArgumentTypeDescription
identifierstringThe name of the topics
syncSync topics state from GCP
publishpublish
ArgumentTypeDescription
messages?any

Resources

state(infinite)— A topic resource.
@swamp/gcp/pubsub/topics-snapshotsv2026.04.23.1topics_snapshots.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a snapshots
ArgumentTypeDescription
identifierstringThe name of the snapshots
syncSync snapshots state from GCP

Resources

state(infinite)— Lists the names of the snapshots on this topic. Snapshots are used in [Seek](...
@swamp/gcp/pubsub/topics-subscriptionsv2026.04.23.1topics_subscriptions.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a subscriptions
ArgumentTypeDescription
identifierstringThe name of the subscriptions
syncSync subscriptions state from GCP

Resources

state(infinite)— Lists the names of the attached subscriptions on this topic.