Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 75 | <h1><a href="pubsub_v1beta1a.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta1a.subscriptions.html">subscriptions</a></h1> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 78 | <code><a href="#acknowledge">acknowledge(body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 79 | <p class="firstline">Acknowledges a particular received message: the Pub/Sub system can remove</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 81 | <code><a href="#create">create(body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 82 | <p class="firstline">Creates a subscription on a given topic for a given subscriber.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 84 | <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Deletes an existing subscription. All pending messages in the subscription</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 86 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 87 | <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 88 | <p class="firstline">Gets the configuration details of a subscription.</p> |
| 89 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 90 | <code><a href="#list">list(maxResults=None, pageToken=None, query=None, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 91 | <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 Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 96 | <code><a href="#modifyAckDeadline">modifyAckDeadline(body, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 97 | <p class="firstline">Modifies the Ack deadline for a message received from a pull request.</p> |
| 98 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 99 | <code><a href="#modifyPushConfig">modifyPushConfig(body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 100 | <p class="firstline">Modifies the <code>PushConfig</code> for a specified subscription.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 101 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 102 | <code><a href="#pull">pull(body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 103 | <p class="firstline">Pulls a single message from the server.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 104 | <p class="toc_element"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 105 | <code><a href="#pullBatch">pullBatch(body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 106 | <p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 107 | <h3>Method Details</h3> |
| 108 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 109 | <code class="details" id="acknowledge">acknowledge(body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 110 | <pre>Acknowledges a particular received message: the Pub/Sub system can remove |
| 111 | the given message from the subscription. Acknowledging a message whose |
| 112 | Ack deadline has expired may succeed, but the message could have been |
| 113 | already redelivered. Acknowledging a message more than once will not |
| 114 | result in an error. This is only used for messages received via pull. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 115 | |
| 116 | Args: |
| 117 | body: object, The request body. (required) |
| 118 | The object takes the form of: |
| 119 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 120 | { # Request for the Acknowledge method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 121 | "ackId": [ # The acknowledgment ID for the message being acknowledged. This was |
| 122 | # returned by the Pub/Sub system in the Pull response. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 123 | "A String", |
| 124 | ], |
| 125 | "subscription": "A String", # The subscription whose message is being acknowledged. |
| 126 | } |
| 127 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 128 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 129 | Allowed values |
| 130 | 1 - v1 error format |
| 131 | 2 - v2 error format |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 132 | |
| 133 | Returns: |
| 134 | An object of the form: |
| 135 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 136 | { # 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 Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 150 | }</pre> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 151 | </div> |
| 152 | |
| 153 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 154 | <code class="details" id="create">create(body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 155 | <pre>Creates a subscription on a given topic for a given subscriber. |
| 156 | If the subscription already exists, returns ALREADY_EXISTS. |
| 157 | If the corresponding topic doesn't exist, returns NOT_FOUND. |
| 158 | |
| 159 | If the name is not provided in the request, the server will assign a random |
| 160 | name for this subscription on the same project as the topic. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 161 | |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 162 | Args: |
| 163 | body: object, The request body. (required) |
| 164 | The object takes the form of: |
| 165 | |
| 166 | { # A subscription resource. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 167 | "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a |
| 168 | # 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 <code>ModifyAckDeadline</code>. |
| 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). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame^] | 186 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 187 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 188 | # used to configure it. |
| 189 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 190 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 191 | }, |
| 192 | "name": "A String", # Name of the subscription. |
| 193 | } |
| 194 | |
| 195 | x__xgafv: string, V1 error format. |
| 196 | Allowed values |
| 197 | 1 - v1 error format |
| 198 | 2 - v2 error format |
| 199 | |
| 200 | Returns: |
| 201 | An object of the form: |
| 202 | |
| 203 | { # A subscription resource. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 204 | "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a |
| 205 | # 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. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 212 | # |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 213 | # For push delivery, this value is used to set the request timeout for |
| 214 | # the call to the push endpoint. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 215 | # |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 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 <code>ModifyAckDeadline</code>. |
| 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). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame^] | 223 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 224 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 225 | # used to configure it. |
| 226 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 227 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 228 | }, |
| 229 | "name": "A String", # Name of the subscription. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 230 | }</pre> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 231 | </div> |
| 232 | |
| 233 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 234 | <code class="details" id="delete">delete(subscription, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 235 | <pre>Deletes an existing subscription. All pending messages in the subscription |
| 236 | are immediately dropped. Calls to Pull after deletion will return |
| 237 | NOT_FOUND. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 238 | |
| 239 | Args: |
| 240 | subscription: string, The subscription to delete. (required) |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 241 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 242 | Allowed values |
| 243 | 1 - v1 error format |
| 244 | 2 - v2 error format |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 245 | |
| 246 | Returns: |
| 247 | An object of the form: |
| 248 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 249 | { # 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 Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 263 | }</pre> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 264 | </div> |
| 265 | |
| 266 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 267 | <code class="details" id="get">get(subscription, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 268 | <pre>Gets the configuration details of a subscription. |
| 269 | |
| 270 | Args: |
| 271 | subscription: string, The name of the subscription to get. (required) |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 272 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 273 | Allowed values |
| 274 | 1 - v1 error format |
| 275 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 276 | |
| 277 | Returns: |
| 278 | An object of the form: |
| 279 | |
| 280 | { # A subscription resource. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 281 | "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a |
| 282 | # 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 <code>ModifyAckDeadline</code>. |
| 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). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame^] | 300 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 301 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 302 | # used to configure it. |
| 303 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 304 | # For example, a Webhook endpoint might use "https://example.com/push". |
| 305 | }, |
| 306 | "name": "A String", # Name of the subscription. |
| 307 | }</pre> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 308 | </div> |
| 309 | |
| 310 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 311 | <code class="details" id="list">list(maxResults=None, pageToken=None, query=None, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 312 | <pre>Lists matching subscriptions. |
| 313 | |
| 314 | Args: |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 315 | maxResults: integer, Maximum number of subscriptions to return. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 316 | pageToken: string, The value obtained in the last <code>ListSubscriptionsResponse</code> |
| 317 | for continuation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 318 | query: string, A valid label query expression. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 319 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 320 | Allowed values |
| 321 | 1 - v1 error format |
| 322 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 323 | |
| 324 | Returns: |
| 325 | An object of the form: |
| 326 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 327 | { # Response for the ListSubscriptions method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 328 | "nextPageToken": "A String", # If not empty, indicates that there are more subscriptions that match the |
| 329 | # request and this value should be passed to the next |
| 330 | # <code>ListSubscriptionsRequest</code> to continue. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 331 | "subscription": [ # The subscriptions that match the request. |
| 332 | { # A subscription resource. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 333 | "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a |
| 334 | # subscriber receives a message before the subscriber should acknowledge or |
| 335 | # Nack the message. If the Ack deadline for a message passes without an |
| 336 | # Ack or a Nack, the Pub/Sub system will eventually redeliver the message. |
| 337 | # If a subscriber acknowledges after the deadline, the Pub/Sub system may |
| 338 | # accept the Ack, but it is possible that the message has been already |
| 339 | # delivered again. Multiple Acks to the message are allowed and will |
| 340 | # succeed. |
| 341 | # |
| 342 | # For push delivery, this value is used to set the request timeout for |
| 343 | # the call to the push endpoint. |
| 344 | # |
| 345 | # For pull delivery, this value is used as the initial value for the Ack |
| 346 | # deadline. It may be overridden for each message using its corresponding |
| 347 | # ack_id with <code>ModifyAckDeadline</code>. |
| 348 | # While a message is outstanding (i.e. it has been delivered to a pull |
| 349 | # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub |
| 350 | # system will not deliver that message to another pull subscriber |
| 351 | # (on a best-effort basis). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame^] | 352 | "topic": "A String", # The name of the topic from which this subscription is receiving messages. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 353 | "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is |
| 354 | # used to configure it. |
| 355 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 356 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 357 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 358 | "name": "A String", # Name of the subscription. |
| 359 | }, |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 360 | ], |
| 361 | }</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 | |
| 368 | Args: |
| 369 | previous_request: The request for the previous page. (required) |
| 370 | previous_response: The response from the request for the previous page. (required) |
| 371 | |
| 372 | Returns: |
| 373 | A request object that you can call 'execute()' on to request the next |
| 374 | page. Returns None if there are no more items in the collection. |
| 375 | </pre> |
| 376 | </div> |
| 377 | |
| 378 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 379 | <code class="details" id="modifyAckDeadline">modifyAckDeadline(body, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 380 | <pre>Modifies the Ack deadline for a message received from a pull request. |
| 381 | |
| 382 | Args: |
| 383 | body: object, The request body. (required) |
| 384 | The object takes the form of: |
| 385 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 386 | { # Request for the ModifyAckDeadline method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 387 | "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to the |
| 388 | # Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack |
| 389 | # deadline will expire 10 seconds after the ModifyAckDeadline call was made. |
| 390 | # Specifying zero may immediately make the message available for another pull |
| 391 | # request. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 392 | "ackIds": [ # List of acknowledgment IDs. Either this field or ack_id |
| 393 | # should be populated, not both. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 394 | "A String", |
| 395 | ], |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 396 | "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, |
| 397 | # not both. |
| 398 | "subscription": "A String", # Next Index: 5 |
| 399 | # The name of the subscription from which messages are being pulled. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 400 | } |
| 401 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 402 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 403 | Allowed values |
| 404 | 1 - v1 error format |
| 405 | 2 - v2 error format |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 406 | |
| 407 | Returns: |
| 408 | An object of the form: |
| 409 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 410 | { # 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 Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 424 | }</pre> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 425 | </div> |
| 426 | |
| 427 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 428 | <code class="details" id="modifyPushConfig">modifyPushConfig(body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 429 | <pre>Modifies the <code>PushConfig</code> for a specified subscription. |
| 430 | This method can be used to suspend the flow of messages to an endpoint |
| 431 | by clearing the <code>PushConfig</code> field in the request. Messages |
| 432 | will be accumulated for delivery even if no push configuration is |
| 433 | defined or while the configuration is modified. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 434 | |
| 435 | Args: |
| 436 | body: object, The request body. (required) |
| 437 | The object takes the form of: |
| 438 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 439 | { # Request for the ModifyPushConfig method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 440 | "pushConfig": { # Configuration for a push delivery endpoint. # An empty <code>push_config</code> indicates that the Pub/Sub system should |
| 441 | # pause pushing messages from the given subscription. |
| 442 | "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. |
| 443 | # For example, a Webhook endpoint might use "https://example.com/push". |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 444 | }, |
| 445 | "subscription": "A String", # The name of the subscription. |
| 446 | } |
| 447 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 448 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 449 | Allowed values |
| 450 | 1 - v1 error format |
| 451 | 2 - v2 error format |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 452 | |
| 453 | Returns: |
| 454 | An object of the form: |
| 455 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 456 | { # 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 Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 470 | }</pre> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 471 | </div> |
| 472 | |
| 473 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 474 | <code class="details" id="pull">pull(body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 475 | <pre>Pulls a single message from the server. |
| 476 | If return_immediately is true, and no messages are available in the |
| 477 | subscription, this method returns FAILED_PRECONDITION. The system is free |
| 478 | to return an UNAVAILABLE error if no messages are available in a |
| 479 | reasonable amount of time (to reduce system load). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 480 | |
| 481 | Args: |
| 482 | body: object, The request body. (required) |
| 483 | The object takes the form of: |
| 484 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 485 | { # Request for the Pull method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 486 | "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if |
| 487 | # 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 491 | "subscription": "A String", # The subscription from which a message should be pulled. |
| 492 | } |
| 493 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 494 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 495 | Allowed values |
| 496 | 1 - v1 error format |
| 497 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 498 | |
| 499 | Returns: |
| 500 | An object of the form: |
| 501 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 502 | { # Either a <code>PubsubMessage</code> or a truncation event. One of these two |
| 503 | # must be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 504 | "pubsubEvent": { # An event indicating a received message or truncation event. # A pubsub message or truncation event. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 505 | "deleted": True or False, # Indicates that this subscription has been deleted. (Note that pull |
| 506 | # subscribers will always receive NOT_FOUND in response in their pull |
| 507 | # request on the subscription, rather than seeing this boolean.) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 508 | "message": { # A message data and its labels. # A received message. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 509 | "label": [ # Optional list of labels for this message. Keys in this collection must |
| 510 | # be unique. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 511 | { # A key-value pair applied to a given object. |
| 512 | "numValue": "A String", # An integer value. |
| 513 | "strValue": "A String", # A string value. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 514 | "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with |
| 515 | # the "scheme" and initial slashes omitted and with the additional |
| 516 | # restrictions noted below. Each key should be globally unique. The |
| 517 | # "host" portion is called the "namespace" and is not necessarily |
| 518 | # resolvable to a network endpoint. Instead, the namespace indicates what |
| 519 | # system or entity defines the semantics of the label. Namespaces do not |
| 520 | # restrict the set of objects to which a label may be associated. |
| 521 | # |
| 522 | # Keys are defined by the following grammar: |
| 523 | # |
| 524 | # key = hostname "/" kpath |
| 525 | # kpath = ksegment *[ "/" ksegment ] |
| 526 | # ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] |
| 527 | # |
| 528 | # where "hostname" and "alphadigit" are defined as in RFC 1738. |
| 529 | # |
| 530 | # Example key: |
| 531 | # spanner.google.com/universe |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 532 | }, |
| 533 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 534 | "data": "A String", # The message payload. |
| 535 | "publishTime": "A String", # The time at which the message was published. |
| 536 | # The time is milliseconds since the UNIX epoch. |
| 537 | "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed |
| 538 | # to be unique within the topic. This value may be read by a subscriber |
| 539 | # that receives a PubsubMessage via a Pull call or a push delivery. It must |
| 540 | # not be populated by a publisher in a Publish call. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 541 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 542 | "subscription": "A String", # The subscription that received the event. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame^] | 543 | "truncated": True or False, # Indicates that this subscription has been truncated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 544 | }, |
| 545 | "ackId": "A String", # This ID must be used to acknowledge the received event or message. |
| 546 | }</pre> |
| 547 | </div> |
| 548 | |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 549 | <div class="method"> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 550 | <code class="details" id="pullBatch">pullBatch(body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 551 | <pre>Pulls messages from the server. Returns an empty list if there are no |
| 552 | messages available in the backlog. The system is free to return UNAVAILABLE |
| 553 | if there are too many pull requests outstanding for the given subscription. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 554 | |
| 555 | Args: |
| 556 | body: object, The request body. (required) |
| 557 | The object takes the form of: |
| 558 | |
| 559 | { # Request for the PullBatch method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 560 | "maxEvents": 42, # The maximum number of PubsubEvents returned for this request. The Pub/Sub |
| 561 | # system may return fewer than the number of events specified. |
| 562 | "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if |
| 563 | # it is not able to return a message in the Pull response. Otherwise the |
| 564 | # system is allowed to wait until at least one message is available rather |
| 565 | # than returning no messages. The client may cancel the request if it does |
| 566 | # not wish to wait any longer for the response. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 567 | "subscription": "A String", # The subscription from which messages should be pulled. |
| 568 | } |
| 569 | |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 570 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 571 | Allowed values |
| 572 | 1 - v1 error format |
| 573 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 574 | |
| 575 | Returns: |
| 576 | An object of the form: |
| 577 | |
| 578 | { # Response for the PullBatch method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 579 | "pullResponses": [ # Received Pub/Sub messages or status events. The Pub/Sub system will return |
| 580 | # 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. |
| 583 | { # Either a <code>PubsubMessage</code> or a truncation event. One of these two |
| 584 | # must be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 585 | "pubsubEvent": { # An event indicating a received message or truncation event. # A pubsub message or truncation event. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 586 | "deleted": True or False, # Indicates that this subscription has been deleted. (Note that pull |
| 587 | # subscribers will always receive NOT_FOUND in response in their pull |
| 588 | # request on the subscription, rather than seeing this boolean.) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 589 | "message": { # A message data and its labels. # A received message. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 590 | "label": [ # Optional list of labels for this message. Keys in this collection must |
| 591 | # be unique. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 592 | { # A key-value pair applied to a given object. |
| 593 | "numValue": "A String", # An integer value. |
| 594 | "strValue": "A String", # A string value. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 595 | "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with |
| 596 | # the "scheme" and initial slashes omitted and with the additional |
| 597 | # restrictions noted below. Each key should be globally unique. The |
| 598 | # "host" portion is called the "namespace" and is not necessarily |
| 599 | # resolvable to a network endpoint. Instead, the namespace indicates what |
| 600 | # system or entity defines the semantics of the label. Namespaces do not |
| 601 | # restrict the set of objects to which a label may be associated. |
| 602 | # |
| 603 | # Keys are defined by the following grammar: |
| 604 | # |
| 605 | # key = hostname "/" kpath |
| 606 | # kpath = ksegment *[ "/" ksegment ] |
| 607 | # ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] |
| 608 | # |
| 609 | # where "hostname" and "alphadigit" are defined as in RFC 1738. |
| 610 | # |
| 611 | # Example key: |
| 612 | # spanner.google.com/universe |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 613 | }, |
| 614 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 615 | "data": "A String", # The message payload. |
| 616 | "publishTime": "A String", # The time at which the message was published. |
| 617 | # The time is milliseconds since the UNIX epoch. |
| 618 | "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed |
| 619 | # to be unique within the topic. This value may be read by a subscriber |
| 620 | # that receives a PubsubMessage via a Pull call or a push delivery. It must |
| 621 | # not be populated by a publisher in a Publish call. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 622 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 623 | "subscription": "A String", # The subscription that received the event. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame^] | 624 | "truncated": True or False, # Indicates that this subscription has been truncated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 625 | }, |
| 626 | "ackId": "A String", # This ID must be used to acknowledge the received event or message. |
| 627 | }, |
| 628 | ], |
| 629 | }</pre> |
| 630 | </div> |
| 631 | |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 632 | </body></html> |