blob: 4f9b35567c4f71d68611a212b30871192d35a817 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<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_v1beta2.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000078 <code><a href="#acknowledge">acknowledge(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Acknowledges the messages associated with the `ack_ids` in the</p>
Craig Citroe633be12015-03-02 13:40:36 -080080<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Creates a subscription to a given topic.</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000084 <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 Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000087 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Gets the configuration details of a subscription.</p>
89<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080091<p class="firstline">Gets the access control policy for a resource.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000092<p class="toc_element">
93 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080094<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">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000099 <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800100<p class="firstline">Modifies the ack deadline for a specific message. This method is useful</p>
Craig Citroe633be12015-03-02 13:40:36 -0800101<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000102 <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800103<p class="firstline">Modifies the `PushConfig` for a specified subscription.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000105 <code><a href="#pull">pull(subscription, body, 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>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000107<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700108 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800109<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000110<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700111 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800113<h3>Method Details</h3>
114<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000115 <code class="details" id="acknowledge">acknowledge(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800116 <pre>Acknowledges the messages associated with the `ack_ids` in the
117`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
118from the subscription.
119
120Acknowledging a message whose ack deadline has expired may succeed,
121but such a message may be redelivered later. Acknowledging a message more
122than once will not result in an error.
Craig Citroe633be12015-03-02 13:40:36 -0800123
124Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000125 subscription: string, The subscription whose message is being acknowledged. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800126 body: object, The request body. (required)
127 The object takes the form of:
128
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000129{ # Request for the Acknowledge method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800130 "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned
131 # by the Pub/Sub system in the `Pull` response. Must not be empty.
Craig Citroe633be12015-03-02 13:40:36 -0800132 "A String",
133 ],
134 }
135
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000136 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800137 Allowed values
138 1 - v1 error format
139 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800140
141Returns:
142 An object of the form:
143
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800144 { # A generic empty message that you can re-use to avoid defining duplicated
145 # empty messages in your APIs. A typical example is to use it as the request
146 # or the response type of an API method. For instance:
147 #
148 # service Foo {
149 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
150 # }
151 #
152 # The JSON representation for `Empty` is empty JSON object `{}`.
Craig Citroe633be12015-03-02 13:40:36 -0800153 }</pre>
154</div>
155
156<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700157 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800158 <pre>Creates a subscription to a given topic.
159If the subscription already exists, returns `ALREADY_EXISTS`.
160If the corresponding topic doesn't exist, returns `NOT_FOUND`.
161
162If the name is not provided in the request, the server will assign a random
163name for this subscription on the same project as the topic. Note that
164for REST API requests, you must specify a name.
Craig Citroe633be12015-03-02 13:40:36 -0800165
166Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800167 name: string, The name of the subscription. It must have the format
168`"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
169start with a letter, and contain only letters (`[A-Za-z]`), numbers
170(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
171plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
172in length, and it must not start with `"goog"`. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800173 body: object, The request body. (required)
174 The object takes the form of:
175
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000176{ # A subscription resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400177 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
178 # before the subscriber should acknowledge the message. After message
179 # delivery but before the ack deadline expires and before the message is
180 # acknowledged, it is an outstanding message and will not be delivered
181 # again during that time (on a best-effort basis).
182 #
183 # For pull subscriptions, this value is used as the initial value for the ack
184 # deadline. To override this value for a given message, call
185 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
186 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
187 #
188 # For push delivery, this value is also used to set the request timeout for
189 # the call to the push endpoint.
190 #
191 # If the subscriber never acknowledges the message, the Pub/Sub
192 # system will eventually redeliver the message.
193 #
194 # If this parameter is 0, a default value of 10 seconds is used.
195 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
196 # The value of this field will be `_deleted-topic_` if the topic has been
197 # deleted.
198 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
199 # used to configure it. An empty `pushConfig` signifies that the subscriber
200 # will pull and ack messages using API methods.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
202 # `Authorization` header in the HTTP request for every pushed message.
203 # [OpenID Connect
204 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
205 "audience": "A String", # Audience to be used when generating OIDC token. The audience claim
206 # identifies the recipients that the JWT is intended for. The audience
207 # value is a single case-sensitive string. Having multiple values (array)
208 # for the audience field is not supported. More info about the OIDC JWT
209 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
210 # Note: if not specified, the Push endpoint URL will be used.
211 "serviceAccountEmail": "A String", # [Service account
212 # email](https://cloud.google.com/iam/docs/service-accounts)
213 # to be used for generating the OIDC token. The caller (for
214 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
215 # have the iam.serviceAccounts.actAs permission for the service account.
216 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400217 "attributes": { # Endpoint configuration attributes.
218 #
219 # Every endpoint has a set of API supported attributes that can be used to
220 # control different aspects of the message delivery.
221 #
222 # The currently supported attribute is `x-goog-version`, which you can
223 # use to change the format of the push message. This attribute
224 # indicates the version of the data expected by the endpoint. This
225 # controls the shape of the envelope (i.e. its fields and metadata).
226 # The endpoint version is based on the version of the Pub/Sub
227 # API.
228 #
229 # If not present during the `CreateSubscription` call, it will default to
230 # the version of the API used to make such call. If not present during a
231 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
232 # calls will always return a valid version, even if the subscription was
233 # created without this attribute.
234 #
235 # The possible values for this attribute are:
236 #
237 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
238 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
239 "a_key": "A String",
240 },
241 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
242 # For example, a Webhook endpoint might use "https://example.com/push".
243 },
244 "name": "A String", # The name of the subscription. It must have the format
245 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
246 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
247 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
248 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
249 # in length, and it must not start with `"goog"`.
250}
251
252 x__xgafv: string, V1 error format.
253 Allowed values
254 1 - v1 error format
255 2 - v2 error format
256
257Returns:
258 An object of the form:
259
260 { # A subscription resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800261 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
262 # before the subscriber should acknowledge the message. After message
263 # delivery but before the ack deadline expires and before the message is
264 # acknowledged, it is an outstanding message and will not be delivered
265 # again during that time (on a best-effort basis).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400266 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800267 # For pull subscriptions, this value is used as the initial value for the ack
268 # deadline. To override this value for a given message, call
269 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
270 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400271 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800272 # For push delivery, this value is also used to set the request timeout for
273 # the call to the push endpoint.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400274 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800275 # If the subscriber never acknowledges the message, the Pub/Sub
276 # system will eventually redeliver the message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400277 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800278 # If this parameter is 0, a default value of 10 seconds is used.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400279 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
280 # The value of this field will be `_deleted-topic_` if the topic has been
281 # deleted.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800282 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
283 # used to configure it. An empty `pushConfig` signifies that the subscriber
284 # will pull and ack messages using API methods.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700285 "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
286 # `Authorization` header in the HTTP request for every pushed message.
287 # [OpenID Connect
288 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
289 "audience": "A String", # Audience to be used when generating OIDC token. The audience claim
290 # identifies the recipients that the JWT is intended for. The audience
291 # value is a single case-sensitive string. Having multiple values (array)
292 # for the audience field is not supported. More info about the OIDC JWT
293 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
294 # Note: if not specified, the Push endpoint URL will be used.
295 "serviceAccountEmail": "A String", # [Service account
296 # email](https://cloud.google.com/iam/docs/service-accounts)
297 # to be used for generating the OIDC token. The caller (for
298 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
299 # have the iam.serviceAccounts.actAs permission for the service account.
300 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800301 "attributes": { # Endpoint configuration attributes.
302 #
303 # Every endpoint has a set of API supported attributes that can be used to
304 # control different aspects of the message delivery.
305 #
306 # The currently supported attribute is `x-goog-version`, which you can
307 # use to change the format of the push message. This attribute
308 # indicates the version of the data expected by the endpoint. This
309 # controls the shape of the envelope (i.e. its fields and metadata).
310 # The endpoint version is based on the version of the Pub/Sub
311 # API.
312 #
313 # If not present during the `CreateSubscription` call, it will default to
314 # the version of the API used to make such call. If not present during a
315 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
316 # calls will always return a valid version, even if the subscription was
317 # created without this attribute.
318 #
319 # The possible values for this attribute are:
320 #
321 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
322 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800323 "a_key": "A String",
324 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800325 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
326 # For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800327 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800328 "name": "A String", # The name of the subscription. It must have the format
329 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
330 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
331 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
332 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
333 # in length, and it must not start with `"goog"`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400334 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800335</div>
336
337<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000338 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800339 <pre>Deletes an existing subscription. All pending messages in the subscription
340are immediately dropped. Calls to `Pull` after deletion will return
341`NOT_FOUND`. After a subscription is deleted, a new one may be created with
342the same name, but the new one has no association with the old
343subscription, or its topic unless the same topic is specified.
Craig Citroe633be12015-03-02 13:40:36 -0800344
345Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000346 subscription: string, The subscription to delete. (required)
347 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800348 Allowed values
349 1 - v1 error format
350 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800351
352Returns:
353 An object of the form:
354
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800355 { # A generic empty message that you can re-use to avoid defining duplicated
356 # empty messages in your APIs. A typical example is to use it as the request
357 # or the response type of an API method. For instance:
358 #
359 # service Foo {
360 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
361 # }
362 #
363 # The JSON representation for `Empty` is empty JSON object `{}`.
Craig Citroe633be12015-03-02 13:40:36 -0800364 }</pre>
365</div>
366
367<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000368 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800369 <pre>Gets the configuration details of a subscription.
370
371Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000372 subscription: string, The name of the subscription to get. (required)
373 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800374 Allowed values
375 1 - v1 error format
376 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800377
378Returns:
379 An object of the form:
380
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000381 { # A subscription resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400382 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
383 # before the subscriber should acknowledge the message. After message
384 # delivery but before the ack deadline expires and before the message is
385 # acknowledged, it is an outstanding message and will not be delivered
386 # again during that time (on a best-effort basis).
387 #
388 # For pull subscriptions, this value is used as the initial value for the ack
389 # deadline. To override this value for a given message, call
390 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
391 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
392 #
393 # For push delivery, this value is also used to set the request timeout for
394 # the call to the push endpoint.
395 #
396 # If the subscriber never acknowledges the message, the Pub/Sub
397 # system will eventually redeliver the message.
398 #
399 # If this parameter is 0, a default value of 10 seconds is used.
400 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
401 # The value of this field will be `_deleted-topic_` if the topic has been
402 # deleted.
403 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
404 # used to configure it. An empty `pushConfig` signifies that the subscriber
405 # will pull and ack messages using API methods.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
407 # `Authorization` header in the HTTP request for every pushed message.
408 # [OpenID Connect
409 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
410 "audience": "A String", # Audience to be used when generating OIDC token. The audience claim
411 # identifies the recipients that the JWT is intended for. The audience
412 # value is a single case-sensitive string. Having multiple values (array)
413 # for the audience field is not supported. More info about the OIDC JWT
414 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
415 # Note: if not specified, the Push endpoint URL will be used.
416 "serviceAccountEmail": "A String", # [Service account
417 # email](https://cloud.google.com/iam/docs/service-accounts)
418 # to be used for generating the OIDC token. The caller (for
419 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
420 # have the iam.serviceAccounts.actAs permission for the service account.
421 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400422 "attributes": { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800423 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400424 # Every endpoint has a set of API supported attributes that can be used to
425 # control different aspects of the message delivery.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800426 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400427 # The currently supported attribute is `x-goog-version`, which you can
428 # use to change the format of the push message. This attribute
429 # indicates the version of the data expected by the endpoint. This
430 # controls the shape of the envelope (i.e. its fields and metadata).
431 # The endpoint version is based on the version of the Pub/Sub
432 # API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800433 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400434 # If not present during the `CreateSubscription` call, it will default to
435 # the version of the API used to make such call. If not present during a
436 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
437 # calls will always return a valid version, even if the subscription was
438 # created without this attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800439 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400440 # The possible values for this attribute are:
441 #
442 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
443 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
444 "a_key": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800445 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400446 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
447 # For example, a Webhook endpoint might use "https://example.com/push".
448 },
449 "name": "A String", # The name of the subscription. It must have the format
450 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
451 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
452 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
453 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
454 # in length, and it must not start with `"goog"`.
455 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800456</div>
457
458<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700459 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800460 <pre>Gets the access control policy for a resource.
461Returns an empty policy if the resource exists and does not have a policy
462set.
Craig Citroe633be12015-03-02 13:40:36 -0800463
464Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800465 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700466See the operation documentation for the appropriate value for this field. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000467 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800471
472Returns:
473 An object of the form:
474
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800475 { # Defines an Identity and Access Management (IAM) policy. It is used to
476 # specify access control policies for Cloud Platform resources.
477 #
478 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800480 # `members` to a `role`, where the members can be user accounts, Google groups,
481 # Google domains, and service accounts. A `role` is a named list of permissions
482 # defined by IAM.
483 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800485 #
486 # {
487 # "bindings": [
488 # {
489 # "role": "roles/owner",
490 # "members": [
491 # "user:mike@example.com",
492 # "group:admins@example.com",
493 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800495 # ]
496 # },
497 # {
498 # "role": "roles/viewer",
499 # "members": ["user:sean@example.com"]
500 # }
501 # ]
502 # }
503 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 # **YAML Example**
505 #
506 # bindings:
507 # - members:
508 # - user:mike@example.com
509 # - group:admins@example.com
510 # - domain:google.com
511 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
512 # role: roles/owner
513 # - members:
514 # - user:sean@example.com
515 # role: roles/viewer
516 #
517 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800518 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700519 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800520 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800521 # `bindings` with no members will result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700522 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800523 "role": "A String", # Role that is assigned to `members`.
524 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
526 # NOTE: An unsatisfied condition will not allow user access via current
527 # binding. Different bindings, including their conditions, are examined
528 # independently.
529 #
530 # title: "User account presence"
531 # description: "Determines whether the request has a user account"
532 # expression: "size(request.user) > 0"
533 "description": "A String", # An optional description of the expression. This is a longer text which
534 # describes the expression, e.g. when hovered over it in a UI.
535 "expression": "A String", # Textual representation of an expression in
536 # Common Expression Language syntax.
537 #
538 # The application context of the containing message determines which
539 # well-known feature set of CEL is supported.
540 "location": "A String", # An optional string indicating the location of the expression for error
541 # reporting, e.g. a file name and a position in the file.
542 "title": "A String", # An optional title for the expression, i.e. a short string describing
543 # its purpose. This can be used e.g. in UIs which allow to enter the
544 # expression.
545 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800546 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
547 # `members` can have the following values:
548 #
549 # * `allUsers`: A special identifier that represents anyone who is
550 # on the internet; with or without a Google account.
551 #
552 # * `allAuthenticatedUsers`: A special identifier that represents anyone
553 # who is authenticated with a Google account or a service account.
554 #
555 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800557 #
558 #
559 # * `serviceAccount:{emailid}`: An email address that represents a service
560 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
561 #
562 # * `group:{emailid}`: An email address that represents a Google group.
563 # For example, `admins@example.com`.
564 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 #
566 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800567 # users of that domain. For example, `google.com` or `example.com`.
568 #
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000569 "A String",
570 ],
571 },
572 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800573 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
574 # prevent simultaneous updates of a policy from overwriting each other.
575 # It is strongly suggested that systems make use of the `etag` in the
576 # read-modify-write cycle to perform policy updates in order to avoid race
577 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
578 # systems are expected to put that etag in the request to `setIamPolicy` to
579 # ensure that their change will be applied to the same version of the policy.
580 #
581 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
582 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 "version": 42, # Deprecated.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000584 }</pre>
585</div>
586
587<div class="method">
588 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
589 <pre>Lists matching subscriptions.
590
591Args:
592 project: string, The name of the cloud project that subscriptions belong to. (required)
593 pageSize: integer, Maximum number of subscriptions to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800594 pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that
595this is a continuation of a prior `ListSubscriptions` call, and that the
596system should return the next page of data.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000597 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800598 Allowed values
599 1 - v1 error format
600 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000601
602Returns:
603 An object of the form:
604
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700605 { # Response for the `ListSubscriptions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800606 "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match
607 # the request; this value should be passed in a new
608 # `ListSubscriptionsRequest` to get more subscriptions.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000609 "subscriptions": [ # The subscriptions that match the request.
610 { # A subscription resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400611 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message
612 # before the subscriber should acknowledge the message. After message
613 # delivery but before the ack deadline expires and before the message is
614 # acknowledged, it is an outstanding message and will not be delivered
615 # again during that time (on a best-effort basis).
616 #
617 # For pull subscriptions, this value is used as the initial value for the ack
618 # deadline. To override this value for a given message, call
619 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
620 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
621 #
622 # For push delivery, this value is also used to set the request timeout for
623 # the call to the push endpoint.
624 #
625 # If the subscriber never acknowledges the message, the Pub/Sub
626 # system will eventually redeliver the message.
627 #
628 # If this parameter is 0, a default value of 10 seconds is used.
629 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
630 # The value of this field will be `_deleted-topic_` if the topic has been
631 # deleted.
632 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
633 # used to configure it. An empty `pushConfig` signifies that the subscriber
634 # will pull and ack messages using API methods.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
636 # `Authorization` header in the HTTP request for every pushed message.
637 # [OpenID Connect
638 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
639 "audience": "A String", # Audience to be used when generating OIDC token. The audience claim
640 # identifies the recipients that the JWT is intended for. The audience
641 # value is a single case-sensitive string. Having multiple values (array)
642 # for the audience field is not supported. More info about the OIDC JWT
643 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
644 # Note: if not specified, the Push endpoint URL will be used.
645 "serviceAccountEmail": "A String", # [Service account
646 # email](https://cloud.google.com/iam/docs/service-accounts)
647 # to be used for generating the OIDC token. The caller (for
648 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
649 # have the iam.serviceAccounts.actAs permission for the service account.
650 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400651 "attributes": { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800652 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400653 # Every endpoint has a set of API supported attributes that can be used to
654 # control different aspects of the message delivery.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800655 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400656 # The currently supported attribute is `x-goog-version`, which you can
657 # use to change the format of the push message. This attribute
658 # indicates the version of the data expected by the endpoint. This
659 # controls the shape of the envelope (i.e. its fields and metadata).
660 # The endpoint version is based on the version of the Pub/Sub
661 # API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800662 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400663 # If not present during the `CreateSubscription` call, it will default to
664 # the version of the API used to make such call. If not present during a
665 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
666 # calls will always return a valid version, even if the subscription was
667 # created without this attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800668 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400669 # The possible values for this attribute are:
670 #
671 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
672 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
673 "a_key": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800674 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400675 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
676 # For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800677 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400678 "name": "A String", # The name of the subscription. It must have the format
679 # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
680 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
681 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
682 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
683 # in length, and it must not start with `"goog"`.
684 },
Craig Citroe633be12015-03-02 13:40:36 -0800685 ],
686 }</pre>
687</div>
688
689<div class="method">
690 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
691 <pre>Retrieves the next page of results.
692
693Args:
694 previous_request: The request for the previous page. (required)
695 previous_response: The response from the request for the previous page. (required)
696
697Returns:
698 A request object that you can call 'execute()' on to request the next
699 page. Returns None if there are no more items in the collection.
700 </pre>
701</div>
702
703<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000704 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800705 <pre>Modifies the ack deadline for a specific message. This method is useful
706to indicate that more time is needed to process a message by the
707subscriber, or to make the message available for redelivery if the
708processing was interrupted. Note that this does not modify the
709subscription-level `ackDeadlineSeconds` used for subsequent messages.
Craig Citroe633be12015-03-02 13:40:36 -0800710
711Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000712 subscription: string, The name of the subscription. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800713 body: object, The request body. (required)
714 The object takes the form of:
715
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000716{ # Request for the ModifyAckDeadline method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800717 "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to
718 # the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new
719 # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
720 # was made. Specifying zero may immediately make the message available for
721 # another pull request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated, but not
723 # both.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000724 "ackIds": [ # List of acknowledgment IDs.
725 "A String",
726 ],
Craig Citroe633be12015-03-02 13:40:36 -0800727 }
728
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000729 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800730 Allowed values
731 1 - v1 error format
732 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800733
734Returns:
735 An object of the form:
736
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800737 { # A generic empty message that you can re-use to avoid defining duplicated
738 # empty messages in your APIs. A typical example is to use it as the request
739 # or the response type of an API method. For instance:
740 #
741 # service Foo {
742 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
743 # }
744 #
745 # The JSON representation for `Empty` is empty JSON object `{}`.
Craig Citroe633be12015-03-02 13:40:36 -0800746 }</pre>
747</div>
748
749<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000750 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800751 <pre>Modifies the `PushConfig` for a specified subscription.
752
753This may be used to change a push subscription to a pull one (signified by
754an empty `PushConfig`) or vice versa, or change the endpoint URL and other
755attributes of a push subscription. Messages will accumulate for delivery
756continuously through the call regardless of changes to the `PushConfig`.
Craig Citroe633be12015-03-02 13:40:36 -0800757
758Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000759 subscription: string, The name of the subscription. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800760 body: object, The request body. (required)
761 The object takes the form of:
762
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000763{ # Request for the ModifyPushConfig method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800764 "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries.
765 #
766 # An empty `pushConfig` indicates that the Pub/Sub system should
767 # stop pushing messages from the given subscription and allow
768 # messages to be pulled and acknowledged - effectively pausing
769 # the subscription if `Pull` is not called.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700770 "oidcToken": { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
771 # `Authorization` header in the HTTP request for every pushed message.
772 # [OpenID Connect
773 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
774 "audience": "A String", # Audience to be used when generating OIDC token. The audience claim
775 # identifies the recipients that the JWT is intended for. The audience
776 # value is a single case-sensitive string. Having multiple values (array)
777 # for the audience field is not supported. More info about the OIDC JWT
778 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
779 # Note: if not specified, the Push endpoint URL will be used.
780 "serviceAccountEmail": "A String", # [Service account
781 # email](https://cloud.google.com/iam/docs/service-accounts)
782 # to be used for generating the OIDC token. The caller (for
783 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
784 # have the iam.serviceAccounts.actAs permission for the service account.
785 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800786 "attributes": { # Endpoint configuration attributes.
787 #
788 # Every endpoint has a set of API supported attributes that can be used to
789 # control different aspects of the message delivery.
790 #
791 # The currently supported attribute is `x-goog-version`, which you can
792 # use to change the format of the push message. This attribute
793 # indicates the version of the data expected by the endpoint. This
794 # controls the shape of the envelope (i.e. its fields and metadata).
795 # The endpoint version is based on the version of the Pub/Sub
796 # API.
797 #
798 # If not present during the `CreateSubscription` call, it will default to
799 # the version of the API used to make such call. If not present during a
800 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
801 # calls will always return a valid version, even if the subscription was
802 # created without this attribute.
803 #
804 # The possible values for this attribute are:
805 #
806 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
807 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800808 "a_key": "A String",
809 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800810 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
811 # For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800812 },
813 }
814
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000815 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800816 Allowed values
817 1 - v1 error format
818 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800819
820Returns:
821 An object of the form:
822
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800823 { # A generic empty message that you can re-use to avoid defining duplicated
824 # empty messages in your APIs. A typical example is to use it as the request
825 # or the response type of an API method. For instance:
826 #
827 # service Foo {
828 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
829 # }
830 #
831 # The JSON representation for `Empty` is empty JSON object `{}`.
Craig Citroe633be12015-03-02 13:40:36 -0800832 }</pre>
833</div>
834
835<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000836 <code class="details" id="pull">pull(subscription, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800837 <pre>Pulls messages from the server. Returns an empty list if there are no
838messages available in the backlog. The server may return `UNAVAILABLE` if
839there are too many concurrent pull requests pending for the given
840subscription.
Craig Citroe633be12015-03-02 13:40:36 -0800841
842Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000843 subscription: string, The subscription from which messages should be pulled. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800844 body: object, The request body. (required)
845 The object takes the form of:
846
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700847{ # Request for the `Pull` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800848 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if
849 # it is not able to return a message in the `Pull` response. Otherwise the
850 # system is allowed to wait until at least one message is available rather
851 # than returning no messages. The client may cancel the request if it does
852 # not wish to wait any longer for the response.
853 "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub
854 # system may return fewer than the number specified.
Craig Citroe633be12015-03-02 13:40:36 -0800855 }
856
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000857 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800858 Allowed values
859 1 - v1 error format
860 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800861
862Returns:
863 An object of the form:
864
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700865 { # Response for the `Pull` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800866 "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if
867 # there are no more available in the backlog. The Pub/Sub system may return
868 # fewer than the `maxMessages` requested even if there are more messages
869 # available in the backlog.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000870 { # A message and its corresponding acknowledgment ID.
871 "ackId": "A String", # This ID can be used to acknowledge the received message.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800872 "message": { # A message data and its attributes. The message payload must not be empty; # The message.
873 # it must contain either a non-empty data field, or at least one attribute.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000874 "attributes": { # Optional attributes for this message.
Craig Citroe633be12015-03-02 13:40:36 -0800875 "a_key": "A String",
876 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800877 "data": "A String", # The message payload. For JSON requests, the value of this field must be
878 # [base64-encoded](https://tools.ietf.org/html/rfc4648).
879 "publishTime": "A String", # The time at which the message was published, populated by the server when
880 # it receives the `Publish` call. It must not be populated by the
881 # publisher in a `Publish` call.
882 "messageId": "A String", # ID of this message, assigned by the server when the message is published.
883 # Guaranteed to be unique within the topic. This value may be read by a
884 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
885 # delivery. It must not be populated by the publisher in a `Publish` call.
Craig Citroe633be12015-03-02 13:40:36 -0800886 },
887 },
888 ],
889 }</pre>
890</div>
891
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000892<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700893 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800894 <pre>Sets the access control policy on the specified resource. Replaces any
895existing policy.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000896
897Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800898 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700899See the operation documentation for the appropriate value for this field. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000900 body: object, The request body. (required)
901 The object takes the form of:
902
903{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800904 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
905 # the policy is limited to a few 10s of KB. An empty policy is a
906 # valid policy but certain Cloud Platform services (such as Projects)
907 # might reject them.
908 # specify access control policies for Cloud Platform resources.
909 #
910 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800912 # `members` to a `role`, where the members can be user accounts, Google groups,
913 # Google domains, and service accounts. A `role` is a named list of permissions
914 # defined by IAM.
915 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800917 #
918 # {
919 # "bindings": [
920 # {
921 # "role": "roles/owner",
922 # "members": [
923 # "user:mike@example.com",
924 # "group:admins@example.com",
925 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800927 # ]
928 # },
929 # {
930 # "role": "roles/viewer",
931 # "members": ["user:sean@example.com"]
932 # }
933 # ]
934 # }
935 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700936 # **YAML Example**
937 #
938 # bindings:
939 # - members:
940 # - user:mike@example.com
941 # - group:admins@example.com
942 # - domain:google.com
943 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
944 # role: roles/owner
945 # - members:
946 # - user:sean@example.com
947 # role: roles/viewer
948 #
949 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800950 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800952 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800953 # `bindings` with no members will result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700954 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800955 "role": "A String", # Role that is assigned to `members`.
956 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
958 # NOTE: An unsatisfied condition will not allow user access via current
959 # binding. Different bindings, including their conditions, are examined
960 # independently.
961 #
962 # title: "User account presence"
963 # description: "Determines whether the request has a user account"
964 # expression: "size(request.user) > 0"
965 "description": "A String", # An optional description of the expression. This is a longer text which
966 # describes the expression, e.g. when hovered over it in a UI.
967 "expression": "A String", # Textual representation of an expression in
968 # Common Expression Language syntax.
969 #
970 # The application context of the containing message determines which
971 # well-known feature set of CEL is supported.
972 "location": "A String", # An optional string indicating the location of the expression for error
973 # reporting, e.g. a file name and a position in the file.
974 "title": "A String", # An optional title for the expression, i.e. a short string describing
975 # its purpose. This can be used e.g. in UIs which allow to enter the
976 # expression.
977 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800978 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
979 # `members` can have the following values:
980 #
981 # * `allUsers`: A special identifier that represents anyone who is
982 # on the internet; with or without a Google account.
983 #
984 # * `allAuthenticatedUsers`: A special identifier that represents anyone
985 # who is authenticated with a Google account or a service account.
986 #
987 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700988 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800989 #
990 #
991 # * `serviceAccount:{emailid}`: An email address that represents a service
992 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
993 #
994 # * `group:{emailid}`: An email address that represents a Google group.
995 # For example, `admins@example.com`.
996 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 #
998 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800999 # users of that domain. For example, `google.com` or `example.com`.
1000 #
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001001 "A String",
1002 ],
1003 },
1004 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001005 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1006 # prevent simultaneous updates of a policy from overwriting each other.
1007 # It is strongly suggested that systems make use of the `etag` in the
1008 # read-modify-write cycle to perform policy updates in order to avoid race
1009 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1010 # systems are expected to put that etag in the request to `setIamPolicy` to
1011 # ensure that their change will be applied to the same version of the policy.
1012 #
1013 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
1014 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 "version": 42, # Deprecated.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001016 },
1017 }
1018
1019 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001020 Allowed values
1021 1 - v1 error format
1022 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001023
1024Returns:
1025 An object of the form:
1026
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001027 { # Defines an Identity and Access Management (IAM) policy. It is used to
1028 # specify access control policies for Cloud Platform resources.
1029 #
1030 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001031 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001032 # `members` to a `role`, where the members can be user accounts, Google groups,
1033 # Google domains, and service accounts. A `role` is a named list of permissions
1034 # defined by IAM.
1035 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001037 #
1038 # {
1039 # "bindings": [
1040 # {
1041 # "role": "roles/owner",
1042 # "members": [
1043 # "user:mike@example.com",
1044 # "group:admins@example.com",
1045 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001047 # ]
1048 # },
1049 # {
1050 # "role": "roles/viewer",
1051 # "members": ["user:sean@example.com"]
1052 # }
1053 # ]
1054 # }
1055 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001056 # **YAML Example**
1057 #
1058 # bindings:
1059 # - members:
1060 # - user:mike@example.com
1061 # - group:admins@example.com
1062 # - domain:google.com
1063 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
1064 # role: roles/owner
1065 # - members:
1066 # - user:sean@example.com
1067 # role: roles/viewer
1068 #
1069 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001070 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001072 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001073 # `bindings` with no members will result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001074 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001075 "role": "A String", # Role that is assigned to `members`.
1076 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001077 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
1078 # NOTE: An unsatisfied condition will not allow user access via current
1079 # binding. Different bindings, including their conditions, are examined
1080 # independently.
1081 #
1082 # title: "User account presence"
1083 # description: "Determines whether the request has a user account"
1084 # expression: "size(request.user) > 0"
1085 "description": "A String", # An optional description of the expression. This is a longer text which
1086 # describes the expression, e.g. when hovered over it in a UI.
1087 "expression": "A String", # Textual representation of an expression in
1088 # Common Expression Language syntax.
1089 #
1090 # The application context of the containing message determines which
1091 # well-known feature set of CEL is supported.
1092 "location": "A String", # An optional string indicating the location of the expression for error
1093 # reporting, e.g. a file name and a position in the file.
1094 "title": "A String", # An optional title for the expression, i.e. a short string describing
1095 # its purpose. This can be used e.g. in UIs which allow to enter the
1096 # expression.
1097 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001098 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1099 # `members` can have the following values:
1100 #
1101 # * `allUsers`: A special identifier that represents anyone who is
1102 # on the internet; with or without a Google account.
1103 #
1104 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1105 # who is authenticated with a Google account or a service account.
1106 #
1107 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001108 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001109 #
1110 #
1111 # * `serviceAccount:{emailid}`: An email address that represents a service
1112 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1113 #
1114 # * `group:{emailid}`: An email address that represents a Google group.
1115 # For example, `admins@example.com`.
1116 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001117 #
1118 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001119 # users of that domain. For example, `google.com` or `example.com`.
1120 #
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001121 "A String",
1122 ],
1123 },
1124 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001125 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1126 # prevent simultaneous updates of a policy from overwriting each other.
1127 # It is strongly suggested that systems make use of the `etag` in the
1128 # read-modify-write cycle to perform policy updates in order to avoid race
1129 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1130 # systems are expected to put that etag in the request to `setIamPolicy` to
1131 # ensure that their change will be applied to the same version of the policy.
1132 #
1133 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
1134 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 "version": 42, # Deprecated.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001136 }</pre>
1137</div>
1138
1139<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -07001140 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001141 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001142If the resource does not exist, this will return an empty set of
1143permissions, not a NOT_FOUND error.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001144
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001145Note: This operation is designed to be used for building permission-aware
1146UIs and command-line tools, not for authorization checking. This operation
1147may "fail open" without warning.
1148
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001149Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001150 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001151See the operation documentation for the appropriate value for this field. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001152 body: object, The request body. (required)
1153 The object takes the form of:
1154
1155{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001156 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
1157 # wildcards (such as '*' or 'storage.*') are not allowed. For more
1158 # information see
1159 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001160 "A String",
1161 ],
1162 }
1163
1164 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001165 Allowed values
1166 1 - v1 error format
1167 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001168
1169Returns:
1170 An object of the form:
1171
1172 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001173 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1174 # allowed.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001175 "A String",
1176 ],
1177 }</pre>
1178</div>
1179
Craig Citroe633be12015-03-02 13:40:36 -08001180</body></html>