blob: cdd1712f45cb50b087f2730efbf361f7eb97941b [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Sai Cheemalapatidf613972016-10-21 13:59:49 -070075<h1><a href="pubsub_v1beta1a.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta1a.subscriptions.html">subscriptions</a></h1>
Craig Citro065b5302014-08-14 00:47:23 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070078 <code><a href="#acknowledge">acknowledge(body, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070079<p class="firstline">Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull.</p>
80<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070081 <code><a href="#create">create(body, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.</p>
Craig Citro065b5302014-08-14 00:47:23 -070083<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070084 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070085<p class="firstline">Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.</p>
86<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070088<p class="firstline">Gets the configuration details of a subscription.</p>
89<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#list">list(maxResults=None, pageToken=None, query=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="firstline">Lists matching subscriptions.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070096 <code><a href="#modifyAckDeadline">modifyAckDeadline(body, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="firstline">Modifies the Ack deadline for a message received from a pull request.</p>
98<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070099 <code><a href="#modifyPushConfig">modifyPushConfig(body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800100<p class="firstline">Modifies the PushConfig for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700101<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700102 <code><a href="#pull">pull(body, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700103<p class="firstline">Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load).</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700105 <code><a href="#pullBatch">pullBatch(body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700107<h3>Method Details</h3>
108<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109 <code class="details" id="acknowledge">acknowledge(body, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700110 <pre>Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull.
111
112Args:
113 body: object, The request body. (required)
114 The object takes the form of:
115
Craig Citroe633be12015-03-02 13:40:36 -0800116{ # Request for the Acknowledge method.
117 "ackId": [ # The acknowledgment ID for the message being acknowledged. This was returned by the Pub/Sub system in the Pull response.
Craig Citro065b5302014-08-14 00:47:23 -0700118 "A String",
119 ],
120 "subscription": "A String", # The subscription whose message is being acknowledged.
121 }
122
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700123 x__xgafv: string, V1 error format.
124
125Returns:
126 An object of the form:
127
128 { # An empty message that you can re-use to avoid defining duplicated empty messages in your project. A typical example is to use it as argument or the return value of a service API. For instance: service Foo { rpc Bar (proto2.Empty) returns (proto2.Empty) { }; }; BEGIN GOOGLE-INTERNAL The difference between this one and net/rpc/empty-message.proto is that 1) The generated message here is in proto2 C++ API. 2) The proto2.Empty has minimum dependencies (no message_set or net/rpc dependencies) END GOOGLE-INTERNAL
129 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700130</div>
131
132<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133 <code class="details" id="create">create(body, x__xgafv=None)</code>
134 <pre>Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.
Craig Citroe633be12015-03-02 13:40:36 -0800135
Craig Citro065b5302014-08-14 00:47:23 -0700136Args:
137 body: object, The request body. (required)
138 The object takes the form of:
139
140{ # A subscription resource.
Craig Citro065b5302014-08-14 00:47:23 -0700141 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
Craig Citro065b5302014-08-14 00:47:23 -0700143 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
144 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
145 },
146 "name": "A String", # Name of the subscription.
147}
148
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700149 x__xgafv: string, V1 error format.
Craig Citro065b5302014-08-14 00:47:23 -0700150
151Returns:
152 An object of the form:
153
154 { # A subscription resource.
Craig Citro065b5302014-08-14 00:47:23 -0700155 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700156 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
Craig Citro065b5302014-08-14 00:47:23 -0700157 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
158 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
159 },
160 "name": "A String", # Name of the subscription.
161 }</pre>
162</div>
163
164<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700166 <pre>Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.
167
168Args:
169 subscription: string, The subscription to delete. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700170 x__xgafv: string, V1 error format.
171
172Returns:
173 An object of the form:
174
175 { # An empty message that you can re-use to avoid defining duplicated empty messages in your project. A typical example is to use it as argument or the return value of a service API. For instance: service Foo { rpc Bar (proto2.Empty) returns (proto2.Empty) { }; }; BEGIN GOOGLE-INTERNAL The difference between this one and net/rpc/empty-message.proto is that 1) The generated message here is in proto2 C++ API. 2) The proto2.Empty has minimum dependencies (no message_set or net/rpc dependencies) END GOOGLE-INTERNAL
176 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700177</div>
178
179<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700180 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700181 <pre>Gets the configuration details of a subscription.
182
183Args:
184 subscription: string, The name of the subscription to get. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185 x__xgafv: string, V1 error format.
Craig Citro065b5302014-08-14 00:47:23 -0700186
187Returns:
188 An object of the form:
189
190 { # A subscription resource.
Craig Citro065b5302014-08-14 00:47:23 -0700191 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700192 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
Craig Citro065b5302014-08-14 00:47:23 -0700193 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
194 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
195 },
196 "name": "A String", # Name of the subscription.
197 }</pre>
198</div>
199
200<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700201 <code class="details" id="list">list(maxResults=None, pageToken=None, query=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700202 <pre>Lists matching subscriptions.
203
204Args:
Craig Citro065b5302014-08-14 00:47:23 -0700205 maxResults: integer, Maximum number of subscriptions to return.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700206 pageToken: string, The value obtained in the last ListSubscriptionsResponse for continuation.
Craig Citro065b5302014-08-14 00:47:23 -0700207 query: string, A valid label query expression.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700208 x__xgafv: string, V1 error format.
Craig Citro065b5302014-08-14 00:47:23 -0700209
210Returns:
211 An object of the form:
212
Craig Citroe633be12015-03-02 13:40:36 -0800213 { # Response for the ListSubscriptions method.
Craig Citro065b5302014-08-14 00:47:23 -0700214 "nextPageToken": "A String", # If not empty, indicates that there are more subscriptions that match the request and this value should be passed to the next ListSubscriptionsRequest to continue.
215 "subscription": [ # The subscriptions that match the request.
216 { # A subscription resource.
Craig Citro065b5302014-08-14 00:47:23 -0700217 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700218 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
Craig Citro065b5302014-08-14 00:47:23 -0700219 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
220 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
221 },
222 "name": "A String", # Name of the subscription.
223 },
224 ],
225 }</pre>
226</div>
227
228<div class="method">
229 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
230 <pre>Retrieves the next page of results.
231
232Args:
233 previous_request: The request for the previous page. (required)
234 previous_response: The response from the request for the previous page. (required)
235
236Returns:
237 A request object that you can call 'execute()' on to request the next
238 page. Returns None if there are no more items in the collection.
239 </pre>
240</div>
241
242<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700243 <code class="details" id="modifyAckDeadline">modifyAckDeadline(body, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700244 <pre>Modifies the Ack deadline for a message received from a pull request.
245
246Args:
247 body: object, The request body. (required)
248 The object takes the form of:
249
Craig Citroe633be12015-03-02 13:40:36 -0800250{ # Request for the ModifyAckDeadline method.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000251 "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ModifyAckDeadline call was made. Specifying zero may immediately make the message available for another pull request.
252 "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, not both.
Takashi Matsuo06694102015-09-11 13:55:40 -0700253 "ackIds": [ # List of acknowledgment IDs. Either this field or ack_id should be populated, not both.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000254 "A String",
255 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700256 "subscription": "A String", # Next Index: 5 The name of the subscription from which messages are being pulled.
Craig Citro065b5302014-08-14 00:47:23 -0700257 }
258
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700259 x__xgafv: string, V1 error format.
260
261Returns:
262 An object of the form:
263
264 { # An empty message that you can re-use to avoid defining duplicated empty messages in your project. A typical example is to use it as argument or the return value of a service API. For instance: service Foo { rpc Bar (proto2.Empty) returns (proto2.Empty) { }; }; BEGIN GOOGLE-INTERNAL The difference between this one and net/rpc/empty-message.proto is that 1) The generated message here is in proto2 C++ API. 2) The proto2.Empty has minimum dependencies (no message_set or net/rpc dependencies) END GOOGLE-INTERNAL
265 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700266</div>
267
268<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269 <code class="details" id="modifyPushConfig">modifyPushConfig(body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800270 <pre>Modifies the PushConfig for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified.
Craig Citro065b5302014-08-14 00:47:23 -0700271
272Args:
273 body: object, The request body. (required)
274 The object takes the form of:
275
Craig Citroe633be12015-03-02 13:40:36 -0800276{ # Request for the ModifyPushConfig method.
Craig Citro065b5302014-08-14 00:47:23 -0700277 "pushConfig": { # Configuration for a push delivery endpoint. # An empty push_config indicates that the Pub/Sub system should pause pushing messages from the given subscription.
278 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
279 },
280 "subscription": "A String", # The name of the subscription.
281 }
282
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700283 x__xgafv: string, V1 error format.
284
285Returns:
286 An object of the form:
287
288 { # An empty message that you can re-use to avoid defining duplicated empty messages in your project. A typical example is to use it as argument or the return value of a service API. For instance: service Foo { rpc Bar (proto2.Empty) returns (proto2.Empty) { }; }; BEGIN GOOGLE-INTERNAL The difference between this one and net/rpc/empty-message.proto is that 1) The generated message here is in proto2 C++ API. 2) The proto2.Empty has minimum dependencies (no message_set or net/rpc dependencies) END GOOGLE-INTERNAL
289 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700290</div>
291
292<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700293 <code class="details" id="pull">pull(body, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700294 <pre>Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load).
295
296Args:
297 body: object, The request body. (required)
298 The object takes the form of:
299
Craig Citroe633be12015-03-02 13:40:36 -0800300{ # Request for the Pull method.
Craig Citro065b5302014-08-14 00:47:23 -0700301 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning FAILED_PRECONDITION. The client may cancel the request if it does not wish to wait any longer for the response.
302 "subscription": "A String", # The subscription from which a message should be pulled.
303 }
304
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700305 x__xgafv: string, V1 error format.
Craig Citro065b5302014-08-14 00:47:23 -0700306
307Returns:
308 An object of the form:
309
310 { # Either a PubsubMessage or a truncation event. One of these two must be populated.
311 "pubsubEvent": { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
312 "deleted": True or False, # Indicates that this subscription has been deleted. (Note that pull subscribers will always receive NOT_FOUND in response in their pull request on the subscription, rather than seeing this boolean.)
313 "message": { # A message data and its labels. # A received message.
Craig Citroe633be12015-03-02 13:40:36 -0800314 "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call.
Craig Citro065b5302014-08-14 00:47:23 -0700315 "data": "A String", # The message payload.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700316 "publishTime": "A String", # The time at which the message was published. The time is milliseconds since the UNIX epoch.
Craig Citro065b5302014-08-14 00:47:23 -0700317 "label": [ # Optional list of labels for this message. Keys in this collection must be unique.
318 { # A key-value pair applied to a given object.
319 "numValue": "A String", # An integer value.
320 "strValue": "A String", # A string value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700321 "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a network endpoint. Instead, the namespace indicates what system or entity defines the semantics of the label. Namespaces do not restrict the set of objects to which a label may be associated. Keys are defined by the following grammar: key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] where "hostname" and "alphadigit" are defined as in RFC 1738. Example key: spanner.google.com/universe
Craig Citro065b5302014-08-14 00:47:23 -0700322 },
323 ],
324 },
325 "truncated": True or False, # Indicates that this subscription has been truncated.
326 "subscription": "A String", # The subscription that received the event.
327 },
328 "ackId": "A String", # This ID must be used to acknowledge the received event or message.
329 }</pre>
330</div>
331
Craig Citroe633be12015-03-02 13:40:36 -0800332<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700333 <code class="details" id="pullBatch">pullBatch(body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800334 <pre>Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription.
335
336Args:
337 body: object, The request body. (required)
338 The object takes the form of:
339
340{ # Request for the PullBatch method.
341 "maxEvents": 42, # The maximum number of PubsubEvents returned for this request. The Pub/Sub system may return fewer than the number of events specified.
342 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response.
343 "subscription": "A String", # The subscription from which messages should be pulled.
344 }
345
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700346 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800347
348Returns:
349 An object of the form:
350
351 { # Response for the PullBatch method.
352 "pullResponses": [ # Received Pub/Sub messages or status events. The Pub/Sub system will return zero messages if there are no more messages available in the backlog. The Pub/Sub system may return fewer than the max_events requested even if there are more messages available in the backlog.
353 { # Either a PubsubMessage or a truncation event. One of these two must be populated.
354 "pubsubEvent": { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
355 "deleted": True or False, # Indicates that this subscription has been deleted. (Note that pull subscribers will always receive NOT_FOUND in response in their pull request on the subscription, rather than seeing this boolean.)
356 "message": { # A message data and its labels. # A received message.
357 "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call.
358 "data": "A String", # The message payload.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700359 "publishTime": "A String", # The time at which the message was published. The time is milliseconds since the UNIX epoch.
Craig Citroe633be12015-03-02 13:40:36 -0800360 "label": [ # Optional list of labels for this message. Keys in this collection must be unique.
361 { # A key-value pair applied to a given object.
362 "numValue": "A String", # An integer value.
363 "strValue": "A String", # A string value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700364 "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a network endpoint. Instead, the namespace indicates what system or entity defines the semantics of the label. Namespaces do not restrict the set of objects to which a label may be associated. Keys are defined by the following grammar: key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] where "hostname" and "alphadigit" are defined as in RFC 1738. Example key: spanner.google.com/universe
Craig Citroe633be12015-03-02 13:40:36 -0800365 },
366 ],
367 },
368 "truncated": True or False, # Indicates that this subscription has been truncated.
369 "subscription": "A String", # The subscription that received the event.
370 },
371 "ackId": "A String", # This ID must be used to acknowledge the received event or message.
372 },
373 ],
374 }</pre>
375</div>
376
Craig Citro065b5302014-08-14 00:47:23 -0700377</body></html>