Skip to main content

Google Cloud Pub/Sub Component

Google Cloud Pub/Sub provides messaging between applications. Publisher applications can send messages to a 'topic' and other applications can subscribe to that topic to receive the messages.

Component key: google-cloud-pub-sub

Description

Google Cloud Pub/Sub provides messaging between applications. Publisher applications can send messages to a "topic" and other applications can subscribe to that topic to receive the messages.

The Push Notifications service lets you to receive notifications that an order has been created. This is called "push" since Google will push notifications to you about events, such as orders, that happen on the Google side.

  • The Content API's pubsubnotificationsettings.update receives the request and sends you back a cloudTopicName.

  • To configure additional Topics

    • In the Google Cloud console, select the navigation menu scroll to the Pub/Sub page (Navigation Menu > More Products > Analytics > Pub/Sub)
    • In the Topics page, click Create Topic
      • In the window that opens, enter MyTopic in the Topic ID field.
        • Leave the default values for the remaining options, and then click Create.
        • You see the success message: A new topic and a new subscription have been successfully created.
        • You have just created a topic called MyTopic and an associated default subscription MyTopic-sub.
  • You create a subscription for the topic and register the URL push endpoint with Cloud Pub/Sub.

  • To Configure Subscription go to Pub/Sub > Subscriptions

    • In the Subscriptions page, click Create subscription.

    • Enter MySub in the Subscription ID field.

    • For Select a Cloud Pub/Sub topic, select the MyTopic topic from the drop-down menu

    • Leave the default values for the remaining options.

    • Click Create

      • You see the success message: Subscription successfully added.
    • Click the Topics page and click MyTopic.

      • The MySub subscription is now attached to the topic

        MyTopic. Pub/Sub delivers all messages sent to

        MyTopic to the MySub and MyTopic-sub subscriptions.

  • Cloud Pub/Sub accepts your subscription and associates that cloudTopicName with your URL. When messages are published to that cloudTopicName (for example, your order notifications), they will be sent to your URL push endpoint.

Request

PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/pubsubnotificationsettings

Connections

OAuth2

All requests to the Google Pub/Sub API must be authorized by an authenticated user.

The details of the authorization process, or "flow," for OAuth 2.0 vary somewhat depending on what kind of application you're writing. The following general process applies to all application types:

  1. When you create your application, you register it using the Google API Console. Google then provides information you'll need later, such as a client ID and a client secret.
  2. From APIs & Services > Library, activate the Google Content API for Shopping
  3. To create API Credentials navigate to Enabled APIs & Services and select Content API for Shopping
    1. Select Create Credentials
    2. Ensure the Pub/Sub API is enabled
    3. Choose User Data and select Next
    4. Fill out the OAuth consent screen with an app name (your company or product's name), support email, app logo, domain, etc.
    5. Select Add Or Remove scopes, search ‘Pub/Sub’, and check the boxes for the following scopes
      1. https://www.googleapis.com/auth/cloud-platform
      2. https://www.googleapis.com/auth/pubsub
    6. For OAuth Client ID, under Application type select Web application.Under Authorized redirect URIs enter Prismatic's OAuth 2.0 callback URL: https://oauth2.prismatic.io/callbackClick CREATE.
      1. Take note of the Client ID and Client Secret that are generated, as you will enter them into Prismatic for Authentication.
    7. Client Id and Secret can also be obtained in the Credentials Page under the OAuth 2.0 Client IDs section by selecting the name of the OAuth client created.
InputDefaultNotes
Authorize URL
string
/ Required
Hidden Field
authorizeUrl
https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent
The Authorization URL for Google Cloud Pub/Sub.
Client ID
string
/ Required
clientId
The Google Cloud Pub/Sub app's Client Identifier.
Client Secret
password
/ Required
clientSecret
The Google Cloud Pub/Sub app's Client Secret.
Scopes
string
/ Required
scopes
https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/pubsub
Space delimited listing of scopes. https://developers.google.com/identity/protocols/oauth2/scopes#pubsub
Token URL
string
/ Required
Hidden Field
tokenUrl
https://oauth2.googleapis.com/token
The Token URL for Google Cloud Pub/Sub.

Google Pub/Sub Private Key

InputDefaultNotesExample
Client Email
string
/ Required
clientEmail
The email address of the client you would like to connect.
someone@example.com
Private Key
text
/ Required
privateKey
The private key of the client you would like to connect.
 
Project Id
string
/ Required
projectId
The ID of the project that hosts the storage bucket
 
Scopes
string
/ Required
scopes
https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/pubsub
Space delimited listing of scopes. https://developers.google.com/identity/protocols/oauth2/scopes#pubsub
 

Triggers

PubSub Notification

PubSub Notification Trigger Settings | key: myTrigger


Data Sources

Fetch subscriptions

Fetch an array of subscriptions | key: subscriptions | type: picklist

InputNotesExample
Connection
connection
/ Required
connection
 
 
Page Size
string
pageSize
Optional. The value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior topics.list call, and that the system should return the next page of data.
3
Page Token
string
pageToken
Page token, returned by a previous call, to request the next page of results
DBsPVgscdHRpdWhSGwQLQVd-
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example

{
"result": [
{
"label": "projects/{project}/subscriptions/{subscription} / projects/{project}/topics/{topic}",
"key": "projects/{project}/subscriptions/{subscription}"
}
]
}

Fetch Topics

Fetch an array of topics | key: topics | type: picklist

InputNotesExample
Connection
connection
/ Required
connection
 
 
Page Size
string
pageSize
Optional. The value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior topics.list call, and that the system should return the next page of data.
3
Page Token
string
pageToken
Page token, returned by a previous call, to request the next page of results
DBsPVgscdHRpdWhSGwQLQVd-
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example

{
"result": [
{
"label": "projects/{project}/topics/{topic}.",
"key": "projects/{project}/topics/{topic}."
}
]
}

Actions

Create Subscription

Creates a subscription to a given topic. | key: createSubscription

InputDefaultNotesExample
Ack Deadline Seconds
string
ackDeadlineSeconds
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 subscriptions.modifyAckDeadline with the corresponding ackId if using non-streaming pull or send the ackId in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used.
10
BigQuery Config
code
bigqueryConfig
If delivery to BigQuery is used with this subscription, this field is used to configure it.
Connection
connection
/ Required
connectionInput
 
 
 
Dead Letter Policy
code
deadLetterPolicy
A policy that specifies the conditions for dead lettering messages in this subscription. If deadLetterPolicy is not set, dead lettering is disabled.
Detached
boolean
detached
false
Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. subscriptions.pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.
true
Enable Exactly Once Delivery
boolean
enableExactlyOnceDelivery
false
If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this subscription: - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. - An acknowledged message will not be resent to a subscriber.
true
Enable Message Ordering
boolean
enableMessageOrdering
false
If true, messages published with the same orderingKey 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.
true
Expiration Policy
code
expirationPolicy
A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. The minimum allowed value for expirationPolicy.ttl is 1 day. If expirationPolicy is set, but expirationPolicy.ttl is not set, the subscription never expires.
Filter
string
filter
An expression written in the Pub/Sub filter language. If non-empty, then only PubsubMessages whose attributes field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.
attributes.myattr = "value"
Labels
code
labels
The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
Message Retention Duration
string
messageRetentionDuration
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 messageRetentionDuration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to messageRetentionDuration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '1200s'.
1800s
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Push Config
code
pushConfig
If push delivery is used with this subscription, this field is used to configure it.
Retain Acked Messages
boolean
retainAckedMessages
false
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 messageRetentionDuration window. This must be true if you would like to subscriptions.seek to a timestamp in the past to replay previously-acknowledged messages.
true
Retry Policy
code
retryPolicy
A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.
State
string
state
Output only. An output-only field indicating whether or not the subscription can receive messages.
ACTIVE
Subscription
string
/ Required
subscription
The name of the subscription to create.
ASubscriptionName or /projects/{projectId}/subscriptions/ASubscriptionName
Topic
string
/ Required
topic
The name of the topic from which this subscription is receiving messages. The value of this field will be _deleted-topic_ if the topic has been deleted.
ATopicName or /projects/{projectId}/topics/ATopicName
Topic Message Retention Duration
string
topicMessageRetentionDuration
Output 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 topicMessageRetentionDuration are always available to subscribers. See the messageRetentionDuration field in Topic. This field is set only in responses from the server; it is ignored if it is set in any requests. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '1200s'.
1800s
Topic Name or Full Format
string
/ Required
topicNameOrFullFormat
Select if the provided topic input is a full format topic name including project, for example: 'projects/projectId/topics/topicName' or just the topic name, for example: 'topicName'
True

Create Topic

Creates the given topic with the given name. | key: createTopic

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
KMS Key Name
string
kmsKeyName
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.
projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}
Labels
code
labels
The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
Message Retention Duration
string
messageRetentionDuration
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 messageRetentionDuration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to messageRetentionDuration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '1200s'.
1800s
Message Storage Policy
code
messageStoragePolicy
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Satisfies PZS
boolean
satisfiesPzs
false
Output only. Reserved for future use.
true
Schema Settings
code
schemaSettings
Settings for validating messages published against a schema.
Topic
string
/ Required
topic
Name of the new topic
ATopicName or /projects/{projectId}/topics/ATopicName

Create Webhook Subscription

Creates a webhook subscription to a given topic. | key: createWebhookSubscription

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Subscription Name
string
/ Required
subscription
The name of the subscription to create.
ASubscriptionName
Topic
string
/ Required
topic
The name of the topic to get.
ATopicName or /projects/{projectId}/topics/ATopicName
Topic Name or Full Format
string
/ Required
topicNameOrFullFormat
Select if the provided topic input is a full format topic name including project, for example: 'projects/projectId/topics/topicName' or just the topic name, for example: 'topicName'
True
Webhook URL
string
/ Required
webhookUrl
The URL of the endpoint to which messages are sent. This is typically the webhook URL of a sibling flow.
 

Delete Subscription

Deletes an existing subscription. | key: deleteSubscription

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Subscription
string
/ Required
subscription
The name of the subscription to get.
ASubscriptionName or /projects/{projectId}/subscriptions/ASubscriptionName
Subscription Name or Full Format
string
/ Required
subscriptionNameOrFullFormat
Select if the provided subscription input is a full format subscription name including project, for example: 'projects/projectId/subscriptions/subscriptionName' or just the topic name, for example: 'subscriptionName'
True

Delete Topic

Deletes the topic with the given name. | key: deleteTopic

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Topic
string
/ Required
topic
The name of the topic to get.
ATopicName or /projects/{projectId}/topics/ATopicName
Topic Name or Full Format
string
/ Required
topicNameOrFullFormat
Select if the provided topic input is a full format topic name including project, for example: 'projects/projectId/topics/topicName' or just the topic name, for example: 'topicName'
True

Get Policy

Gets the access control policy for a resource. | key: getPolicy

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Requested Policy Version
string
requestedPolicyVersion
The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.
3
Resource
string
/ Required
resource
The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
projects/{project}/topics/{topic}

Get Subscription

Gets the configuration details of a subscription. | key: getSubscription

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Subscription
string
/ Required
subscription
The name of the subscription to get.
ASubscriptionName or /projects/{projectId}/subscriptions/ASubscriptionName
Subscription Name or Full Format
string
/ Required
subscriptionNameOrFullFormat
Select if the provided subscription input is a full format subscription name including project, for example: 'projects/projectId/subscriptions/subscriptionName' or just the topic name, for example: 'subscriptionName'
True

Get Topic

Gets the configuration of a topic. | key: getTopic

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Topic
string
/ Required
topic
The name of the topic to get.
ATopicName or /projects/{projectId}/topics/ATopicName
Topic Name or Full Format
string
/ Required
topicNameOrFullFormat
Select if the provided topic input is a full format topic name including project, for example: 'projects/projectId/topics/topicName' or just the topic name, for example: 'topicName'
True

List Subscriptions

Lists matching Subscriptions. | key: listSubscriptions

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Page Size
string
pageSize
The value returned by the last ListSubscriptionsResponse; indicates that this is a continuation of a prior subscriptions.list call, and that the system should return the next page of data.
3
Page Token
string
pageToken
Maximum number of subscriptions to return.
DBsPVgscdHRpdWhSGwQLQVd-
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example

List Topics

Lists matching topics. | key: listTopics

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Page Size
string
pageSize
Optional. The value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior topics.list call, and that the system should return the next page of data.
3
Page Token
string
pageToken
Page token, returned by a previous call, to request the next page of results
DBsPVgscdHRpdWhSGwQLQVd-
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example

Pull Messages

Pulls messages from the server. | key: pullMessages

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
Max Messages
string
/ Required
maxMessages
The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified.
10
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Return Immediately
boolean
returnImmediately
false
If this field set to true, the system will respond immediately even if it there are no messages available to return in the subscriptions.pull response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to true is discouraged because it adversely impacts the performance of subscriptions.pull operations. We recommend that users do not set this field.
true
Subscription
string
/ Required
subscription
The name of the subscription to get.
ASubscriptionName or /projects/{projectId}/subscriptions/ASubscriptionName
Subscription Name or Full Format
string
/ Required
subscriptionNameOrFullFormat
Select if the provided subscription input is a full format subscription name including project, for example: 'projects/projectId/subscriptions/subscriptionName' or just the topic name, for example: 'subscriptionName'
True

Raw Request

Send raw HTTP request to Google Cloud Pub/Sub | key: rawRequest

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
Debug Request
boolean
debugRequest
false
Enabling this flag will log out the current request.
 
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt.
 
Method
string
/ Required
method
The HTTP method to use.
 
Query Parameter
string
Key Value List
queryParams
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
url
Input the path only (/projects/{projectId}/topics), The base URL is already included (https://pubsub.googleapis.com/{version}). For example, to connect to https://pubsub.googleapis.com/v1/projects/{projectId}/topics, only /projects/{projectId}/topics is entered in this field.
/projects/{projectId}/topics
Use Exponential Backoff
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries.
 
API Version
string
version
v1
The API version to use. This is used to construct the base URL for the request.
v1

Set Gmail IAM Policy for Topic

Configure a topic to allow publish notifications from Gmail. | key: setTopicIamPolicy

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Topic
string
/ Required
topic
The full name of the topic to set the IAM policy for
/topics/PROJECT-NAME/topics/TOPIC-NAME

Set Policy

Sets the access control policy on the specified resource. | key: setPolicy

InputNotesExample
Connection
connection
/ Required
connectionInput
 
 
Policy
code
/ Required
policy
The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.
Resource
string
/ Required
resource
The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
projects/{project}/topics/{topic}

Update Push Config

This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. | key: updatePushConfig

InputNotesExample
Attributes
code
attributes
Endpoint configuration attributes that can be used to control different aspects of the message delivery. The only currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The only supported values for the x-goog-version attribute are: - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
Connection
connection
/ Required
connectionInput
 
 
Oidc Token
code
oidcToken
If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Push Endpoint
string
pushEndpoint
A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use https://example.com/push.
https://example.com/push
Subscription
string
/ Required
subscription
The name of the subscription to get.
ASubscriptionName or /projects/{projectId}/subscriptions/ASubscriptionName
Subscription Name or Full Format
string
/ Required
subscriptionNameOrFullFormat
Select if the provided subscription input is a full format subscription name including project, for example: 'projects/projectId/subscriptions/subscriptionName' or just the topic name, for example: 'subscriptionName'
True

Update Subscription

Updates an existing subscription. | key: updateSubscription

InputDefaultNotesExample
Ack Deadline Seconds
string
ackDeadlineSeconds
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 subscriptions.modifyAckDeadline with the corresponding ackId if using non-streaming pull or send the ackId in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used.
10
BigQuery Config
code
bigqueryConfig
If delivery to BigQuery is used with this subscription, this field is used to configure it.
Connection
connection
/ Required
connectionInput
 
 
 
Dead Letter Policy
code
deadLetterPolicy
A policy that specifies the conditions for dead lettering messages in this subscription. If deadLetterPolicy is not set, dead lettering is disabled.
Detached
boolean
detached
false
Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. subscriptions.pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.
true
Enable Exactly Once Delivery
boolean
enableExactlyOnceDelivery
false
If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this subscription: - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. - An acknowledged message will not be resent to a subscriber.
true
Enable Message Ordering
boolean
enableMessageOrdering
false
If true, messages published with the same orderingKey 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.
true
Expiration Policy
code
expirationPolicy
A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. The minimum allowed value for expirationPolicy.ttl is 1 day. If expirationPolicy is set, but expirationPolicy.ttl is not set, the subscription never expires.
Filter
string
filter
An expression written in the Pub/Sub filter language. If non-empty, then only PubsubMessages whose attributes field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.
attributes.myattr = "value"
Labels
code
labels
The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
Message Retention Duration
string
messageRetentionDuration
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 messageRetentionDuration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to messageRetentionDuration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '1200s'.
1800s
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Push Config
code
pushConfig
If push delivery is used with this subscription, this field is used to configure it.
Retain Acked Messages
boolean
retainAckedMessages
false
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 messageRetentionDuration window. This must be true if you would like to subscriptions.seek to a timestamp in the past to replay previously-acknowledged messages.
true
Retry Policy
code
retryPolicy
A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.
State
string
state
Output only. An output-only field indicating whether or not the subscription can receive messages.
ACTIVE
Subscription
string
/ Required
subscription
The name of the subscription to get.
ASubscriptionName or /projects/{projectId}/subscriptions/ASubscriptionName
Subscription Name or Full Format
string
/ Required
subscriptionNameOrFullFormat
Select if the provided subscription input is a full format subscription name including project, for example: 'projects/projectId/subscriptions/subscriptionName' or just the topic name, for example: 'subscriptionName'
True
Topic
string
/ Required
topic
The name of the topic from which this subscription is receiving messages. The value of this field will be _deleted-topic_ if the topic has been deleted.
ATopicName or /projects/{projectId}/topics/ATopicName
Topic Message Retention Duration
string
topicMessageRetentionDuration
Output 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 topicMessageRetentionDuration are always available to subscribers. See the messageRetentionDuration field in Topic. This field is set only in responses from the server; it is ignored if it is set in any requests. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '1200s'.
1800s
Update Mask
string
/ Required
updateMask
Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if updateMask contains 'messageStoragePolicy' but the messageStoragePolicy is not set in the topic provided above, then the updated value is determined by the policy configured at the project or organization level. This is a comma-separated list of fully qualified names of fields. Example: 'user.displayName,photo'.
satisfies_pzs

Update Topic

Updates an existing topic. | key: updateTopic

InputDefaultNotesExample
Connection
connection
/ Required
connectionInput
 
 
 
KMS Key Name
string
kmsKeyName
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.
projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}
Labels
code
labels
The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
Message Retention Duration
string
messageRetentionDuration
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 messageRetentionDuration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to messageRetentionDuration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '1200s'.
1800s
Message Storage Policy
code
messageStoragePolicy
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
Project ID
string
/ Required
projectId
Project ID of the datasets to be listed
a-project-id-example
Satisfies PZS
boolean
satisfiesPzs
false
Output only. Reserved for future use.
true
Schema Settings
code
schemaSettings
Settings for validating messages published against a schema.
Topic
string
/ Required
topic
Name of the topic
ATopicName or /projects/{projectId}/topics/ATopicName
Topic Name or Full Format
string
/ Required
topicNameOrFullFormat
Select if the provided topic input is a full format topic name including project, for example: 'projects/projectId/topics/topicName' or just the topic name, for example: 'topicName'
True
Update Mask
string
/ Required
updateMask
Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if updateMask contains 'messageStoragePolicy' but the messageStoragePolicy is not set in the topic provided above, then the updated value is determined by the policy configured at the project or organization level. This is a comma-separated list of fully qualified names of fields. Example: 'user.displayName,photo'.
satisfies_pzs