blob: b59e31e1bbd25f73a1446c69671c202d9d472482 [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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="pubsub_v1beta1a.html">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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#acknowledge">acknowledge(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Acknowledges a particular received message: the Pub/Sub system can remove</p>
Craig Citro065b5302014-08-14 00:47:23 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Creates a subscription on a given topic for a given subscriber.</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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Deletes an existing subscription. All pending messages in the subscription</p>
Craig Citro065b5302014-08-14 00:47:23 -070086<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">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070090 <code><a href="#list">list(pageToken=None, maxResults=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">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#modifyAckDeadline">modifyAckDeadline(body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#modifyPushConfig">modifyPushConfig(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800100<p class="firstline">Modifies the <code>PushConfig</code> for a specified subscription.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#pull">pull(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800103<p class="firstline">Pulls a single message from the server.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#pullBatch">pullBatch(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p>
Craig Citro065b5302014-08-14 00:47:23 -0700107<h3>Method Details</h3>
108<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code class="details" id="acknowledge">acknowledge(body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800110 <pre>Acknowledges a particular received message: the Pub/Sub system can remove
111the given message from the subscription. Acknowledging a message whose
112Ack deadline has expired may succeed, but the message could have been
113already redelivered. Acknowledging a message more than once will not
114result in an error. This is only used for messages received via pull.
Craig Citro065b5302014-08-14 00:47:23 -0700115
116Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700118 The object takes the form of:
119
Craig Citroe633be12015-03-02 13:40:36 -0800120{ # Request for the Acknowledge method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;subscription&quot;: &quot;A String&quot;, # The subscription whose message is being acknowledged.
122 &quot;ackId&quot;: [ # The acknowledgment ID for the message being acknowledged. This was
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800123 # returned by the Pub/Sub system in the Pull response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -0700125 ],
Craig Citro065b5302014-08-14 00:47:23 -0700126 }
127
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700128 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800129 Allowed values
130 1 - v1 error format
131 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132
133Returns:
134 An object of the form:
135
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800136 { # An empty message that you can re-use to avoid defining duplicated empty
137 # messages in your project. A typical example is to use it as argument or the
138 # return value of a service API. For instance:
139 #
140 # service Foo {
141 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
142 # };
143 #
144 # BEGIN GOOGLE-INTERNAL
145 # The difference between this one and net/rpc/empty-message.proto is that
146 # 1) The generated message here is in proto2 C++ API.
147 # 2) The proto2.Empty has minimum dependencies
148 # (no message_set or net/rpc dependencies)
149 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700150 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700151</div>
152
153<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800155 <pre>Creates a subscription on a given topic for a given subscriber.
156If the subscription already exists, returns ALREADY_EXISTS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157If the corresponding topic doesn&#x27;t exist, returns NOT_FOUND.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800158
159If the name is not provided in the request, the server will assign a random
160name for this subscription on the same project as the topic.
Craig Citroe633be12015-03-02 13:40:36 -0800161
Craig Citro065b5302014-08-14 00:47:23 -0700162Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700164 The object takes the form of:
165
166{ # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 &quot;ackDeadlineSeconds&quot;: 42, # For either push or pull delivery, the value is the maximum time after a
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 # subscriber receives a message before the subscriber should acknowledge or
169 # Nack the message. If the Ack deadline for a message passes without an
170 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
171 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
172 # accept the Ack, but it is possible that the message has been already
173 # delivered again. Multiple Acks to the message are allowed and will
174 # succeed.
175 #
176 # For push delivery, this value is used to set the request timeout for
177 # the call to the push endpoint.
178 #
179 # For pull delivery, this value is used as the initial value for the Ack
180 # deadline. It may be overridden for each message using its corresponding
181 # ack_id with &lt;code&gt;ModifyAckDeadline&lt;/code&gt;.
182 # While a message is outstanding (i.e. it has been delivered to a pull
183 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
184 # system will not deliver that message to another pull subscriber
185 # (on a best-effort basis).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700186 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
187 # used to configure it.
188 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
189 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
190 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700191 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
192 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dan O'Mearadd494642020-05-01 07:42:23 -0700193}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700194
195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
199
200Returns:
201 An object of the form:
202
203 { # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &quot;ackDeadlineSeconds&quot;: 42, # For either push or pull delivery, the value is the maximum time after a
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 # subscriber receives a message before the subscriber should acknowledge or
206 # Nack the message. If the Ack deadline for a message passes without an
207 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
208 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
209 # accept the Ack, but it is possible that the message has been already
210 # delivered again. Multiple Acks to the message are allowed and will
211 # succeed.
212 #
213 # For push delivery, this value is used to set the request timeout for
214 # the call to the push endpoint.
215 #
216 # For pull delivery, this value is used as the initial value for the Ack
217 # deadline. It may be overridden for each message using its corresponding
218 # ack_id with &lt;code&gt;ModifyAckDeadline&lt;/code&gt;.
219 # While a message is outstanding (i.e. it has been delivered to a pull
220 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
221 # system will not deliver that message to another pull subscriber
222 # (on a best-effort basis).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700223 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
224 # used to configure it.
225 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
226 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
227 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700228 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
229 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700231</div>
232
233<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800235 <pre>Deletes an existing subscription. All pending messages in the subscription
236are immediately dropped. Calls to Pull after deletion will return
237NOT_FOUND.
Craig Citro065b5302014-08-14 00:47:23 -0700238
239Args:
240 subscription: string, The subscription to delete. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700245
246Returns:
247 An object of the form:
248
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800249 { # An empty message that you can re-use to avoid defining duplicated empty
250 # messages in your project. A typical example is to use it as argument or the
251 # return value of a service API. For instance:
252 #
253 # service Foo {
254 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
255 # };
256 #
257 # BEGIN GOOGLE-INTERNAL
258 # The difference between this one and net/rpc/empty-message.proto is that
259 # 1) The generated message here is in proto2 C++ API.
260 # 2) The proto2.Empty has minimum dependencies
261 # (no message_set or net/rpc dependencies)
262 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700263 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700264</div>
265
266<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700267 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700268 <pre>Gets the configuration details of a subscription.
269
270Args:
271 subscription: string, The name of the subscription to get. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700272 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800273 Allowed values
274 1 - v1 error format
275 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700276
277Returns:
278 An object of the form:
279
280 { # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;ackDeadlineSeconds&quot;: 42, # For either push or pull delivery, the value is the maximum time after a
Dan O'Mearadd494642020-05-01 07:42:23 -0700282 # subscriber receives a message before the subscriber should acknowledge or
283 # Nack the message. If the Ack deadline for a message passes without an
284 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
285 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
286 # accept the Ack, but it is possible that the message has been already
287 # delivered again. Multiple Acks to the message are allowed and will
288 # succeed.
289 #
290 # For push delivery, this value is used to set the request timeout for
291 # the call to the push endpoint.
292 #
293 # For pull delivery, this value is used as the initial value for the Ack
294 # deadline. It may be overridden for each message using its corresponding
295 # ack_id with &lt;code&gt;ModifyAckDeadline&lt;/code&gt;.
296 # While a message is outstanding (i.e. it has been delivered to a pull
297 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
298 # system will not deliver that message to another pull subscriber
299 # (on a best-effort basis).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700300 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
301 # used to configure it.
302 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
303 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
304 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700305 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
306 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dan O'Mearadd494642020-05-01 07:42:23 -0700307 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700308</div>
309
310<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700311 <code class="details" id="list">list(pageToken=None, maxResults=None, query=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700312 <pre>Lists matching subscriptions.
313
314Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700315 pageToken: string, The value obtained in the last &lt;code&gt;ListSubscriptionsResponse&lt;/code&gt;
316for continuation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700317 maxResults: integer, Maximum number of subscriptions to return.
318 query: string, A valid label query expression.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800320 Allowed values
321 1 - v1 error format
322 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700323
324Returns:
325 An object of the form:
326
Craig Citroe633be12015-03-02 13:40:36 -0800327 { # Response for the ListSubscriptions method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 &quot;subscription&quot;: [ # The subscriptions that match the request.
Craig Citro065b5302014-08-14 00:47:23 -0700329 { # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 &quot;ackDeadlineSeconds&quot;: 42, # For either push or pull delivery, the value is the maximum time after a
Dan O'Mearadd494642020-05-01 07:42:23 -0700331 # subscriber receives a message before the subscriber should acknowledge or
332 # Nack the message. If the Ack deadline for a message passes without an
333 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
334 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
335 # accept the Ack, but it is possible that the message has been already
336 # delivered again. Multiple Acks to the message are allowed and will
337 # succeed.
338 #
339 # For push delivery, this value is used to set the request timeout for
340 # the call to the push endpoint.
341 #
342 # For pull delivery, this value is used as the initial value for the Ack
343 # deadline. It may be overridden for each message using its corresponding
344 # ack_id with &lt;code&gt;ModifyAckDeadline&lt;/code&gt;.
345 # While a message is outstanding (i.e. it has been delivered to a pull
346 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
347 # system will not deliver that message to another pull subscriber
348 # (on a best-effort basis).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700349 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
350 # used to configure it.
351 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
352 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
353 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700354 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
355 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 },
Craig Citro065b5302014-08-14 00:47:23 -0700357 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700358 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there are more subscriptions that match the
359 # request and this value should be passed to the next
360 # &lt;code&gt;ListSubscriptionsRequest&lt;/code&gt; to continue.
Craig Citro065b5302014-08-14 00:47:23 -0700361 }</pre>
362</div>
363
364<div class="method">
365 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
366 <pre>Retrieves the next page of results.
367
368Args:
369 previous_request: The request for the previous page. (required)
370 previous_response: The response from the request for the previous page. (required)
371
372Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citro065b5302014-08-14 00:47:23 -0700374 page. Returns None if there are no more items in the collection.
375 </pre>
376</div>
377
378<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 <code class="details" id="modifyAckDeadline">modifyAckDeadline(body=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700380 <pre>Modifies the Ack deadline for a message received from a pull request.
381
382Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700383 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700384 The object takes the form of:
385
Craig Citroe633be12015-03-02 13:40:36 -0800386{ # Request for the ModifyAckDeadline method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 &quot;ackId&quot;: &quot;A String&quot;, # The acknowledgment ID. Either this or ack_ids must be populated,
388 # not both.
389 &quot;ackDeadlineSeconds&quot;: 42, # The new ack deadline with respect to the time this request was sent to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 # Pub/Sub system. Must be &gt;= 0. For example, if the value is 10, the new ack
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800391 # deadline will expire 10 seconds after the ModifyAckDeadline call was made.
392 # Specifying zero may immediately make the message available for another pull
393 # request.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700394 &quot;subscription&quot;: &quot;A String&quot;, # Next Index: 5
395 # The name of the subscription from which messages are being pulled.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 &quot;ackIds&quot;: [ # List of acknowledgment IDs. Either this field or ack_id
397 # should be populated, not both.
398 &quot;A String&quot;,
399 ],
Craig Citro065b5302014-08-14 00:47:23 -0700400 }
401
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700402 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800403 Allowed values
404 1 - v1 error format
405 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406
407Returns:
408 An object of the form:
409
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800410 { # An empty message that you can re-use to avoid defining duplicated empty
411 # messages in your project. A typical example is to use it as argument or the
412 # return value of a service API. For instance:
413 #
414 # service Foo {
415 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
416 # };
417 #
418 # BEGIN GOOGLE-INTERNAL
419 # The difference between this one and net/rpc/empty-message.proto is that
420 # 1) The generated message here is in proto2 C++ API.
421 # 2) The proto2.Empty has minimum dependencies
422 # (no message_set or net/rpc dependencies)
423 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700424 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700425</div>
426
427<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 <code class="details" id="modifyPushConfig">modifyPushConfig(body=None, x__xgafv=None)</code>
429 <pre>Modifies the &lt;code&gt;PushConfig&lt;/code&gt; for a specified subscription.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800430This method can be used to suspend the flow of messages to an endpoint
Dan O'Mearadd494642020-05-01 07:42:23 -0700431by clearing the &lt;code&gt;PushConfig&lt;/code&gt; field in the request. Messages
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800432will be accumulated for delivery even if no push configuration is
433defined or while the configuration is modified.
Craig Citro065b5302014-08-14 00:47:23 -0700434
435Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700437 The object takes the form of:
438
Craig Citroe633be12015-03-02 13:40:36 -0800439{ # Request for the ModifyPushConfig method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # An empty &lt;code&gt;push_config&lt;/code&gt; indicates that the Pub/Sub system should
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800441 # pause pushing messages from the given subscription.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
443 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
Craig Citro065b5302014-08-14 00:47:23 -0700444 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700445 &quot;subscription&quot;: &quot;A String&quot;, # The name of the subscription.
Craig Citro065b5302014-08-14 00:47:23 -0700446 }
447
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700448 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 Allowed values
450 1 - v1 error format
451 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700452
453Returns:
454 An object of the form:
455
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800456 { # An empty message that you can re-use to avoid defining duplicated empty
457 # messages in your project. A typical example is to use it as argument or the
458 # return value of a service API. For instance:
459 #
460 # service Foo {
461 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
462 # };
463 #
464 # BEGIN GOOGLE-INTERNAL
465 # The difference between this one and net/rpc/empty-message.proto is that
466 # 1) The generated message here is in proto2 C++ API.
467 # 2) The proto2.Empty has minimum dependencies
468 # (no message_set or net/rpc dependencies)
469 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700470 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700471</div>
472
473<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 <code class="details" id="pull">pull(body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800475 <pre>Pulls a single message from the server.
476If return_immediately is true, and no messages are available in the
477subscription, this method returns FAILED_PRECONDITION. The system is free
478to return an UNAVAILABLE error if no messages are available in a
479reasonable amount of time (to reduce system load).
Craig Citro065b5302014-08-14 00:47:23 -0700480
481Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700483 The object takes the form of:
484
Craig Citroe633be12015-03-02 13:40:36 -0800485{ # Request for the Pull method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &quot;returnImmediately&quot;: True or False, # If this is specified as true the system will respond immediately even if
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800487 # it is not able to return a message in the Pull response. Otherwise the
488 # system is allowed to wait until at least one message is available rather
489 # than returning FAILED_PRECONDITION. The client may cancel the request if
490 # it does not wish to wait any longer for the response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700491 &quot;subscription&quot;: &quot;A String&quot;, # The subscription from which a message should be pulled.
Craig Citro065b5302014-08-14 00:47:23 -0700492 }
493
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700494 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800495 Allowed values
496 1 - v1 error format
497 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700498
499Returns:
500 An object of the form:
501
Dan O'Mearadd494642020-05-01 07:42:23 -0700502 { # Either a &lt;code&gt;PubsubMessage&lt;/code&gt; or a truncation event. One of these two
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800503 # must be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;pubsubEvent&quot;: { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700505 &quot;subscription&quot;: &quot;A String&quot;, # The subscription that received the event.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700506 &quot;deleted&quot;: True or False, # Indicates that this subscription has been deleted. (Note that pull
507 # subscribers will always receive NOT_FOUND in response in their pull
508 # request on the subscription, rather than seeing this boolean.)
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;message&quot;: { # A message data and its labels. # A received message.
510 &quot;messageId&quot;: &quot;A String&quot;, # ID of this message assigned by the server at publication time. Guaranteed
511 # to be unique within the topic. This value may be read by a subscriber
512 # that receives a PubsubMessage via a Pull call or a push delivery. It must
513 # not be populated by a publisher in a Publish call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700514 &quot;data&quot;: &quot;A String&quot;, # The message payload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published.
516 # The time is milliseconds since the UNIX epoch.
517 &quot;label&quot;: [ # Optional list of labels for this message. Keys in this collection must
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800518 # be unique.
Craig Citro065b5302014-08-14 00:47:23 -0700519 { # A key-value pair applied to a given object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 &quot;key&quot;: &quot;A String&quot;, # The key of a label is a syntactically valid URL (as per RFC 1738) with
521 # the &quot;scheme&quot; and initial slashes omitted and with the additional
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800522 # restrictions noted below. Each key should be globally unique. The
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 # &quot;host&quot; portion is called the &quot;namespace&quot; and is not necessarily
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800524 # resolvable to a network endpoint. Instead, the namespace indicates what
525 # system or entity defines the semantics of the label. Namespaces do not
526 # restrict the set of objects to which a label may be associated.
527 #
528 # Keys are defined by the following grammar:
529 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 # key = hostname &quot;/&quot; kpath
531 # kpath = ksegment *[ &quot;/&quot; ksegment ]
532 # ksegment = alphadigit | *[ alphadigit | &quot;-&quot; | &quot;_&quot; | &quot;.&quot; ]
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800533 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 # where &quot;hostname&quot; and &quot;alphadigit&quot; are defined as in RFC 1738.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800535 #
536 # Example key:
537 # spanner.google.com/universe
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700538 &quot;strValue&quot;: &quot;A String&quot;, # A string value.
539 &quot;numValue&quot;: &quot;A String&quot;, # An integer value.
Craig Citro065b5302014-08-14 00:47:23 -0700540 },
541 ],
542 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700543 &quot;truncated&quot;: True or False, # Indicates that this subscription has been truncated.
Craig Citro065b5302014-08-14 00:47:23 -0700544 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700545 &quot;ackId&quot;: &quot;A String&quot;, # This ID must be used to acknowledge the received event or message.
Craig Citro065b5302014-08-14 00:47:23 -0700546 }</pre>
547</div>
548
Craig Citroe633be12015-03-02 13:40:36 -0800549<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 <code class="details" id="pullBatch">pullBatch(body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800551 <pre>Pulls messages from the server. Returns an empty list if there are no
552messages available in the backlog. The system is free to return UNAVAILABLE
553if there are too many pull requests outstanding for the given subscription.
Craig Citroe633be12015-03-02 13:40:36 -0800554
555Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700556 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800557 The object takes the form of:
558
559{ # Request for the PullBatch method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;subscription&quot;: &quot;A String&quot;, # The subscription from which messages should be pulled.
561 &quot;returnImmediately&quot;: True or False, # If this is specified as true the system will respond immediately even if
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800562 # it is not able to return a message in the Pull response. Otherwise the
563 # system is allowed to wait until at least one message is available rather
564 # than returning no messages. The client may cancel the request if it does
565 # not wish to wait any longer for the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 &quot;maxEvents&quot;: 42, # The maximum number of PubsubEvents returned for this request. The Pub/Sub
567 # system may return fewer than the number of events specified.
Craig Citroe633be12015-03-02 13:40:36 -0800568 }
569
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700570 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800571 Allowed values
572 1 - v1 error format
573 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800574
575Returns:
576 An object of the form:
577
578 { # Response for the PullBatch method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 &quot;pullResponses&quot;: [ # Received Pub/Sub messages or status events. The Pub/Sub system will return
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800580 # zero messages if there are no more messages available in the backlog. The
581 # Pub/Sub system may return fewer than the max_events requested even if
582 # there are more messages available in the backlog.
Dan O'Mearadd494642020-05-01 07:42:23 -0700583 { # Either a &lt;code&gt;PubsubMessage&lt;/code&gt; or a truncation event. One of these two
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800584 # must be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 &quot;pubsubEvent&quot;: { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700586 &quot;subscription&quot;: &quot;A String&quot;, # The subscription that received the event.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700587 &quot;deleted&quot;: True or False, # Indicates that this subscription has been deleted. (Note that pull
588 # subscribers will always receive NOT_FOUND in response in their pull
589 # request on the subscription, rather than seeing this boolean.)
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 &quot;message&quot;: { # A message data and its labels. # A received message.
591 &quot;messageId&quot;: &quot;A String&quot;, # ID of this message assigned by the server at publication time. Guaranteed
592 # to be unique within the topic. This value may be read by a subscriber
593 # that receives a PubsubMessage via a Pull call or a push delivery. It must
594 # not be populated by a publisher in a Publish call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700595 &quot;data&quot;: &quot;A String&quot;, # The message payload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published.
597 # The time is milliseconds since the UNIX epoch.
598 &quot;label&quot;: [ # Optional list of labels for this message. Keys in this collection must
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800599 # be unique.
Craig Citroe633be12015-03-02 13:40:36 -0800600 { # A key-value pair applied to a given object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 &quot;key&quot;: &quot;A String&quot;, # The key of a label is a syntactically valid URL (as per RFC 1738) with
602 # the &quot;scheme&quot; and initial slashes omitted and with the additional
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800603 # restrictions noted below. Each key should be globally unique. The
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 # &quot;host&quot; portion is called the &quot;namespace&quot; and is not necessarily
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800605 # resolvable to a network endpoint. Instead, the namespace indicates what
606 # system or entity defines the semantics of the label. Namespaces do not
607 # restrict the set of objects to which a label may be associated.
608 #
609 # Keys are defined by the following grammar:
610 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 # key = hostname &quot;/&quot; kpath
612 # kpath = ksegment *[ &quot;/&quot; ksegment ]
613 # ksegment = alphadigit | *[ alphadigit | &quot;-&quot; | &quot;_&quot; | &quot;.&quot; ]
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800614 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 # where &quot;hostname&quot; and &quot;alphadigit&quot; are defined as in RFC 1738.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800616 #
617 # Example key:
618 # spanner.google.com/universe
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700619 &quot;strValue&quot;: &quot;A String&quot;, # A string value.
620 &quot;numValue&quot;: &quot;A String&quot;, # An integer value.
Craig Citroe633be12015-03-02 13:40:36 -0800621 },
622 ],
623 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700624 &quot;truncated&quot;: True or False, # Indicates that this subscription has been truncated.
Craig Citroe633be12015-03-02 13:40:36 -0800625 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700626 &quot;ackId&quot;: &quot;A String&quot;, # This ID must be used to acknowledge the received event or message.
Craig Citroe633be12015-03-02 13:40:36 -0800627 },
628 ],
629 }</pre>
630</div>
631
Craig Citro065b5302014-08-14 00:47:23 -0700632</body></html>