google.pubsub. v1
Abstract types
AcknowledgeRequest
Request for the Acknowledge method.
Properties
Parameter |
|
---|---|
subscription |
string The subscription whose message is being acknowledged. Format is |
ackIds |
Array of string The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the |
CreateSnapshotRequest
Request for the CreateSnapshot
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
name |
string Optional 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. Format is |
subscription |
string 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
|
labels |
Object with string properties |
DeleteSnapshotRequest
Request for the DeleteSnapshot
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Property
Parameter |
|
---|---|
snapshot |
string The name of the snapshot to delete. Format is |
DeleteSubscriptionRequest
Request for the DeleteSubscription method.
Property
Parameter |
|
---|---|
subscription |
string The subscription to delete. Format is |
DeleteTopicRequest
Request for the DeleteTopic
method.
Property
Parameter |
|
---|---|
topic |
string Name of the topic to delete. Format is |
ExpirationPolicy
A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).
Property
Parameter |
|
---|---|
ttl |
Object Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of This object should have the same structure as Duration |
GetSnapshotRequest
Request for the GetSnapshot method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Property
Parameter |
|
---|---|
snapshot |
string The name of the snapshot to get. Format is |
GetSubscriptionRequest
Request for the GetSubscription method.
Property
Parameter |
|
---|---|
subscription |
string The name of the subscription to get. Format is |
GetTopicRequest
Request for the GetTopic method.
Property
Parameter |
|
---|---|
topic |
string The name of the topic to get. Format is |
ListSnapshotsRequest
Request for the ListSnapshots
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
project |
string The name of the project in which to list snapshots. Format is |
pageSize |
number Maximum number of snapshots to return. |
pageToken |
string The value returned by the last |
ListSnapshotsResponse
Response for the ListSnapshots
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
snapshots |
Array of Object The resulting snapshots. This object should have the same structure as Snapshot |
nextPageToken |
string If not empty, indicates that there may be more snapshot that match the request; this value should be passed in a new |
ListSubscriptionsRequest
Request for the ListSubscriptions
method.
Properties
Parameter |
|
---|---|
project |
string The name of the project in which to list subscriptions. Format is |
pageSize |
number Maximum number of subscriptions to return. |
pageToken |
string The value returned by the last |
ListSubscriptionsResponse
Response for the ListSubscriptions
method.
Properties
Parameter |
|
---|---|
subscriptions |
Array of Object The subscriptions that match the request. This object should have the same structure as Subscription |
nextPageToken |
string If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new
|
ListTopicSnapshotsRequest
Request for the ListTopicSnapshots
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
topic |
string The name of the topic that snapshots are attached to. Format is |
pageSize |
number Maximum number of snapshot names to return. |
pageToken |
string The value returned by the last |
ListTopicSnapshotsResponse
Response for the ListTopicSnapshots
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
snapshots |
Array of string The names of the snapshots that match the request. |
nextPageToken |
string If not empty, indicates that there may be more snapshots that match the request; this value should be passed in a new
|
ListTopicsRequest
Request for the ListTopics
method.
Properties
Parameter |
|
---|---|
project |
string The name of the project in which to list topics. Format is |
pageSize |
number Maximum number of topics to return. |
pageToken |
string The value returned by the last |
ListTopicsResponse
Response for the ListTopics
method.
Properties
Parameter |
|
---|---|
topics |
Array of Object The resulting topics. This object should have the same structure as Topic |
nextPageToken |
string If not empty, indicates that there may be more topics that match the request; this value should be passed in a new |
ListTopicSubscriptionsRequest
Request for the ListTopicSubscriptions
method.
Properties
Parameter |
|
---|---|
topic |
string The name of the topic that subscriptions are attached to. Format is |
pageSize |
number Maximum number of subscription names to return. |
pageToken |
string The value returned by the last |
ListTopicSubscriptionsResponse
Response for the ListTopicSubscriptions
method.
Properties
Parameter |
|
---|---|
subscriptions |
Array of string The names of the subscriptions that match the request. |
nextPageToken |
string If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new
|
MessageStoragePolicy
Property
Parameter |
|
---|---|
allowedPersistenceRegions |
Array of string The list of GCP region IDs where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list indicates a misconfiguration at the project or organization level, which will result in all Publish operations failing. |
ModifyAckDeadlineRequest
Request for the ModifyAckDeadline method.
Properties
Parameter |
|
---|---|
subscription |
string The name of the subscription. Format is |
ackIds |
Array of string List of acknowledgment IDs. |
ackDeadlineSeconds |
number The new ack deadline with respect to the time this request was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will expire 10 seconds after the |
ModifyPushConfigRequest
Request for the ModifyPushConfig method.
Properties
Parameter |
|
---|---|
subscription |
string The name of the subscription. Format is |
pushConfig |
Object The push configuration for future deliveries. An empty This object should have the same structure as PushConfig |
PublishRequest
Request for the Publish method.
Properties
Parameter |
|
---|---|
topic |
string The messages in the request will be published on this topic. Format is |
messages |
Array of Object The messages to publish. This object should have the same structure as PubsubMessage |
PublishResponse
Response for the Publish
method.
Property
Parameter |
|
---|---|
messageIds |
Array of string The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic. |
PubsubMessage
A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding client library documentation for more information. See Quotas and limits for more information about message limits.
Properties
Parameter |
|
---|---|
data |
string The message data field. If this field is empty, the message must contain at least one attribute. |
attributes |
Object with string properties Optional attributes for this message. |
messageId |
string ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a |
publishTime |
Object The time at which the message was published, populated by the server when it receives the This object should have the same structure as Timestamp |
PullRequest
Request for the Pull
method.
Properties
Parameter |
|
---|---|
subscription |
string The subscription from which messages should be pulled. Format is |
returnImmediately |
boolean If this field set to true, the system will respond immediately even if it there are no messages available to return in the |
maxMessages |
number The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified. |
PullResponse
Response for the Pull
method.
Property
Parameter |
|
---|---|
receivedMessages |
Array of Object Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the This object should have the same structure as ReceivedMessage |
PushConfig
Configuration for a push delivery endpoint.
Properties
Parameter |
|
---|---|
pushEndpoint |
string A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". |
attributes |
Object with string properties
Endpoint configuration attributes.
Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.
The currently supported attribute is
If not present during the
The possible values for this attribute are:
|
ReceivedMessage
A message and its corresponding acknowledgment ID.
Properties
Parameter |
|
---|---|
ackId |
string This ID can be used to acknowledge the received message. |
message |
Object The message. This object should have the same structure as PubsubMessage |
SeekRequest
Request for the Seek
method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
subscription |
string The subscription to affect. |
time |
Object The time to seek to. Messages retained in the subscription that were published before this time are marked as acknowledged, and messages retained in the subscription that were published after this time are marked as unacknowledged.
Note that this operation affects only those messages retained in the subscription (configured by the combination of
This object should have the same structure as Timestamp |
snapshot |
string The snapshot to seek to. The snapshot's topic must be the same as that of the provided subscription. Format is |
SeekResponse
Response for the Seek
method (this response is empty).
Snapshot
A snapshot resource. Snapshots are used in
Seek 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.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
name |
string The name of the snapshot. |
topic |
string The name of the topic from which this snapshot is retaining messages. |
expireTime |
Object The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription.
Specifically, the lifetime of the snapshot is This object should have the same structure as Timestamp |
labels |
Object with string properties |
StreamingPullRequest
Request for the StreamingPull
streaming RPC method. This request is used to establish the initial stream as well as to stream acknowledgements and ack deadline modifications from the client to the server.
Properties
Parameter |
|
---|---|
subscription |
string The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. Format is |
ackIds |
Array of string List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more
than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status |
modifyDeadlineSeconds |
Array of number The list of new ack deadlines for the IDs listed in
|
modifyDeadlineAckIds |
Array of string List of acknowledgement IDs whose deadline will be modified based on the corresponding element in |
streamAckDeadlineSeconds |
number The ack deadline to use for the stream. This must be provided in the first request on the stream, but it can also be updated on subsequent requests from client to server. The minimum deadline you can specify is 10 seconds. The maximum deadline you can specify is 600 seconds (10 minutes). |
StreamingPullResponse
Response for the StreamingPull
method. This response is used to stream messages from the server to the client.
Property
Parameter |
|
---|---|
receivedMessages |
Array of Object Received Pub/Sub messages. This will not be empty. This object should have the same structure as ReceivedMessage |
Subscription
A subscription resource.
Properties
Parameter |
|
---|---|
name |
string The name of the subscription. It must have the format
|
topic |
string The name of the topic from which this subscription is receiving messages. Format is |
pushConfig |
Object If push delivery is used with this subscription, this field is used to configure it. An empty This object should have the same structure as PushConfig |
ackDeadlineSeconds |
number 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
For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. |
retainAckedMessages |
boolean 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 |
Object How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If This object should have the same structure as Duration |
labels |
Object with string properties |
expirationPolicy |
Object 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 This object should have the same structure as ExpirationPolicy |
Topic
A topic resource.
Properties
Parameter |
|
---|---|
name |
string The name of the topic. It must have the format
|
labels |
Object with string properties |
messageStoragePolicy |
Object Policy constraining how messages published to the topic may be stored. It is determined when the topic is created based on the policy configured at the project level. It must not be set by the caller in the request to CreateTopic or to UpdateTopic. This field will be populated in the responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the response, then no constraints are in effect. This object should have the same structure as MessageStoragePolicy |
UpdateSnapshotRequest
Request for the UpdateSnapshot method.
BETA: This feature is part of a beta release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Properties
Parameter |
|
---|---|
snapshot |
Object The updated snapshot object. This object should have the same structure as Snapshot |
updateMask |
Object Indicates which fields in the provided snapshot to update. Must be specified and non-empty. This object should have the same structure as FieldMask |
UpdateSubscriptionRequest
Request for the UpdateSubscription method.
Properties
Parameter |
|
---|---|
subscription |
Object The updated subscription object. This object should have the same structure as Subscription |
updateMask |
Object Indicates which fields in the provided subscription to update. Must be specified and non-empty. This object should have the same structure as FieldMask |
UpdateTopicRequest
Request for the UpdateTopic method.
Properties
Parameter |
|
---|---|
topic |
Object The updated topic object. This object should have the same structure as Topic |
updateMask |
Object Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if This object should have the same structure as FieldMask |