blob: 5aa9d852cf53bb9e160a2601975ee23a97158f4a [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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -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">
81 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
Craig Citro065b5302014-08-14 00:47:23 -070083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<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 -070086<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<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>
Craig Citro065b5302014-08-14 00:47:23 -070089<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="firstline">Gets the configuration details of a subscription.</p>
92<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#list">list(query=None, pageToken=None, maxResults=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070094<p class="firstline">Lists matching subscriptions.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#modifyAckDeadline">modifyAckDeadline(body=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700100<p class="firstline">Modifies the Ack deadline for a message received from a pull request.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#modifyPushConfig">modifyPushConfig(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<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 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#pull">pull(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106<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 -0800107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#pullBatch">pullBatch(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109<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 -0700110<h3>Method Details</h3>
111<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 <code class="details" id="acknowledge">acknowledge(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700113 <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.
Craig Citro065b5302014-08-14 00:47:23 -0700114
115Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700117 The object takes the form of:
118
Craig Citroe633be12015-03-02 13:40:36 -0800119{ # Request for the Acknowledge method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 &quot;ackId&quot;: [ # The acknowledgment ID for the message being acknowledged. This was returned by the Pub/Sub system in the Pull response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -0700122 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 &quot;subscription&quot;: &quot;A String&quot;, # The subscription whose message is being acknowledged.
Craig Citro065b5302014-08-14 00:47:23 -0700124 }
125
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700126 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800127 Allowed values
128 1 - v1 error format
129 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130
131Returns:
132 An object of the form:
133
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700134 { # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700135 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700136</div>
137
138<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139 <code class="details" id="close">close()</code>
140 <pre>Close httplib2 connections.</pre>
141</div>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800142
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700143<div class="method">
144 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
145 <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&#x27;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 -0800146
Craig Citro065b5302014-08-14 00:47:23 -0700147Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700149 The object takes the form of:
150
151{ # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700152 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
153 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700154 &quot;ackDeadlineSeconds&quot;: 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).
155 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
156 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
157 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700158}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700159
160 x__xgafv: string, V1 error format.
161 Allowed values
162 1 - v1 error format
163 2 - v2 error format
164
165Returns:
166 An object of the form:
167
168 { # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700169 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
170 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700171 &quot;ackDeadlineSeconds&quot;: 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).
172 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
173 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
174 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700175 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700176</div>
177
178<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700179 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700180 <pre>Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.
Craig Citro065b5302014-08-14 00:47:23 -0700181
182Args:
183 subscription: string, The subscription to delete. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700184 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800185 Allowed values
186 1 - v1 error format
187 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188
189Returns:
190 An object of the form:
191
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700192 { # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700193 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700194</div>
195
196<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700197 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700198 <pre>Gets the configuration details of a subscription.
199
200Args:
201 subscription: string, The name of the subscription to get. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800203 Allowed values
204 1 - v1 error format
205 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700206
207Returns:
208 An object of the form:
209
210 { # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700211 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
212 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 &quot;ackDeadlineSeconds&quot;: 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).
214 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
215 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
216 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700218</div>
219
220<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700221 <code class="details" id="list">list(query=None, pageToken=None, maxResults=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700222 <pre>Lists matching subscriptions.
223
224Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700225 query: string, A valid label query expression.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700226 pageToken: string, The value obtained in the last ListSubscriptionsResponse for continuation.
227 maxResults: integer, Maximum number of subscriptions to return.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700228 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800229 Allowed values
230 1 - v1 error format
231 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700232
233Returns:
234 An object of the form:
235
Craig Citroe633be12015-03-02 13:40:36 -0800236 { # Response for the ListSubscriptions method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;subscription&quot;: [ # The subscriptions that match the request.
Craig Citro065b5302014-08-14 00:47:23 -0700238 { # A subscription resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700239 &quot;name&quot;: &quot;A String&quot;, # Name of the subscription.
240 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700241 &quot;ackDeadlineSeconds&quot;: 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).
242 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it.
243 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
244 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700245 },
Craig Citro065b5302014-08-14 00:47:23 -0700246 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700247 &quot;nextPageToken&quot;: &quot;A String&quot;, # 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.
Craig Citro065b5302014-08-14 00:47:23 -0700248 }</pre>
249</div>
250
251<div class="method">
252 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
253 <pre>Retrieves the next page of results.
254
255Args:
256 previous_request: The request for the previous page. (required)
257 previous_response: The response from the request for the previous page. (required)
258
259Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citro065b5302014-08-14 00:47:23 -0700261 page. Returns None if there are no more items in the collection.
262 </pre>
263</div>
264
265<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 <code class="details" id="modifyAckDeadline">modifyAckDeadline(body=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700267 <pre>Modifies the Ack deadline for a message received from a pull request.
268
269Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700271 The object takes the form of:
272
Craig Citroe633be12015-03-02 13:40:36 -0800273{ # Request for the ModifyAckDeadline method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700274 &quot;ackId&quot;: &quot;A String&quot;, # The acknowledgment ID. Either this or ack_ids must be populated, not both.
275 &quot;subscription&quot;: &quot;A String&quot;, # Next Index: 5 The name of the subscription from which messages are being pulled.
276 &quot;ackIds&quot;: [ # List of acknowledgment IDs. Either this field or ack_id should be populated, not both.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700277 &quot;A String&quot;,
278 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700279 &quot;ackDeadlineSeconds&quot;: 42, # The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be &gt;= 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.
Craig Citro065b5302014-08-14 00:47:23 -0700280 }
281
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700282 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800283 Allowed values
284 1 - v1 error format
285 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700286
287Returns:
288 An object of the form:
289
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700290 { # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700291 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700292</div>
293
294<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700295 <code class="details" id="modifyPushConfig">modifyPushConfig(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700296 <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 -0700297
298Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700299 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700300 The object takes the form of:
301
Craig Citroe633be12015-03-02 13:40:36 -0800302{ # Request for the ModifyPushConfig method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700303 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # An empty push_config indicates that the Pub/Sub system should pause pushing messages from the given subscription.
304 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
Craig Citro065b5302014-08-14 00:47:23 -0700305 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &quot;subscription&quot;: &quot;A String&quot;, # The name of the subscription.
Craig Citro065b5302014-08-14 00:47:23 -0700307 }
308
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700309 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800310 Allowed values
311 1 - v1 error format
312 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700313
314Returns:
315 An object of the form:
316
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700317 { # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700318 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700319</div>
320
321<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700322 <code class="details" id="pull">pull(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700323 <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).
Craig Citro065b5302014-08-14 00:47:23 -0700324
325Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700326 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700327 The object takes the form of:
328
Craig Citroe633be12015-03-02 13:40:36 -0800329{ # Request for the Pull method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700330 &quot;subscription&quot;: &quot;A String&quot;, # The subscription from which a message should be pulled.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700331 &quot;returnImmediately&quot;: 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.
Craig Citro065b5302014-08-14 00:47:23 -0700332 }
333
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700334 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800335 Allowed values
336 1 - v1 error format
337 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700338
339Returns:
340 An object of the form:
341
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 { # Either a PubsubMessage or a truncation event. One of these two must be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;pubsubEvent&quot;: { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
344 &quot;message&quot;: { # A message data and its labels. # A received message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700345 &quot;data&quot;: &quot;A String&quot;, # The message payload.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700346 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published. The time is milliseconds since the UNIX epoch.
347 &quot;messageId&quot;: &quot;A String&quot;, # 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.
348 &quot;label&quot;: [ # Optional list of labels for this message. Keys in this collection must be unique.
Craig Citro065b5302014-08-14 00:47:23 -0700349 { # A key-value pair applied to a given object.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700350 &quot;key&quot;: &quot;A String&quot;, # The key of a label is a syntactically valid URL (as per RFC 1738) with the &quot;scheme&quot; and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The &quot;host&quot; portion is called the &quot;namespace&quot; 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 &quot;/&quot; kpath kpath = ksegment *[ &quot;/&quot; ksegment ] ksegment = alphadigit | *[ alphadigit | &quot;-&quot; | &quot;_&quot; | &quot;.&quot; ] where &quot;hostname&quot; and &quot;alphadigit&quot; are defined as in RFC 1738. Example key: spanner.google.com/universe
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700351 &quot;strValue&quot;: &quot;A String&quot;, # A string value.
352 &quot;numValue&quot;: &quot;A String&quot;, # An integer value.
Craig Citro065b5302014-08-14 00:47:23 -0700353 },
354 ],
355 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700356 &quot;truncated&quot;: True or False, # Indicates that this subscription has been truncated.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700357 &quot;deleted&quot;: 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.)
358 &quot;subscription&quot;: &quot;A String&quot;, # The subscription that received the event.
Craig Citro065b5302014-08-14 00:47:23 -0700359 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 &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 -0700361 }</pre>
362</div>
363
Craig Citroe633be12015-03-02 13:40:36 -0800364<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 <code class="details" id="pullBatch">pullBatch(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700366 <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.
Craig Citroe633be12015-03-02 13:40:36 -0800367
368Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800370 The object takes the form of:
371
372{ # Request for the PullBatch method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700373 &quot;maxEvents&quot;: 42, # The maximum number of PubsubEvents returned for this request. The Pub/Sub system may return fewer than the number of events specified.
374 &quot;returnImmediately&quot;: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 &quot;subscription&quot;: &quot;A String&quot;, # The subscription from which messages should be pulled.
Craig Citroe633be12015-03-02 13:40:36 -0800376 }
377
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700378 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800379 Allowed values
380 1 - v1 error format
381 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800382
383Returns:
384 An object of the form:
385
386 { # Response for the PullBatch method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700387 &quot;pullResponses&quot;: [ # 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.
388 { # Either a PubsubMessage or a truncation event. One of these two must be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700389 &quot;pubsubEvent&quot;: { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
390 &quot;message&quot;: { # A message data and its labels. # A received message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700391 &quot;data&quot;: &quot;A String&quot;, # The message payload.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700392 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published. The time is milliseconds since the UNIX epoch.
393 &quot;messageId&quot;: &quot;A String&quot;, # 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.
394 &quot;label&quot;: [ # Optional list of labels for this message. Keys in this collection must be unique.
Craig Citroe633be12015-03-02 13:40:36 -0800395 { # A key-value pair applied to a given object.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 &quot;key&quot;: &quot;A String&quot;, # The key of a label is a syntactically valid URL (as per RFC 1738) with the &quot;scheme&quot; and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The &quot;host&quot; portion is called the &quot;namespace&quot; 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 &quot;/&quot; kpath kpath = ksegment *[ &quot;/&quot; ksegment ] ksegment = alphadigit | *[ alphadigit | &quot;-&quot; | &quot;_&quot; | &quot;.&quot; ] where &quot;hostname&quot; and &quot;alphadigit&quot; are defined as in RFC 1738. Example key: spanner.google.com/universe
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700397 &quot;strValue&quot;: &quot;A String&quot;, # A string value.
398 &quot;numValue&quot;: &quot;A String&quot;, # An integer value.
Craig Citroe633be12015-03-02 13:40:36 -0800399 },
400 ],
401 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700402 &quot;truncated&quot;: True or False, # Indicates that this subscription has been truncated.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700403 &quot;deleted&quot;: 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.)
404 &quot;subscription&quot;: &quot;A String&quot;, # The subscription that received the event.
Craig Citroe633be12015-03-02 13:40:36 -0800405 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700406 &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 -0800407 },
408 ],
409 }</pre>
410</div>
411
Craig Citro065b5302014-08-14 00:47:23 -0700412</body></html>