blob: 91012a40de61ed7da67adc5d39000502c6b8c860 [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#acknowledge">acknowledge(subscription, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(name, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, 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">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(project, pageToken=None, pageSize=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">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#pull">pull(subscription, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code class="details" id="acknowledge">acknowledge(subscription, body=None, 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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800127 The object takes the form of:
128
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000129{ # Request for the Acknowledge method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;ackIds&quot;: [ # The acknowledgment ID for the messages being acknowledged that was returned
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800131 # by the Pub/Sub system in the `Pull` response. Must not be empty.
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800133 ],
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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 <code class="details" id="create">create(name, body=None, 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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700160If the corresponding topic doesn&#x27;t exist, returns `NOT_FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800161
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
Bu Sun Kim65020912020-05-20 12:08:20 -0700168`&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800169start 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
Bu Sun Kim65020912020-05-20 12:08:20 -0700172in length, and it must not start with `&quot;goog&quot;`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800174 The object takes the form of:
175
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000176{ # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400178 # The value of this field will be `_deleted-topic_` if the topic has been
179 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400181 # used to configure it. An empty `pushConfig` signifies that the subscriber
182 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;attributes&quot;: { # Endpoint configuration attributes.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400184 #
185 # Every endpoint has a set of API supported attributes that can be used to
186 # control different aspects of the message delivery.
187 #
188 # The currently supported attribute is `x-goog-version`, which you can
189 # use to change the format of the push message. This attribute
190 # indicates the version of the data expected by the endpoint. This
191 # controls the shape of the envelope (i.e. its fields and metadata).
192 # The endpoint version is based on the version of the Pub/Sub
193 # API.
194 #
195 # If not present during the `CreateSubscription` call, it will default to
196 # the version of the API used to make such call. If not present during a
197 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
198 # calls will always return a valid version, even if the subscription was
199 # created without this attribute.
200 #
201 # The possible values for this attribute are:
202 #
203 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
204 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700205 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400206 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
208 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
209 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
210 # `Authorization` header in the HTTP request for every pushed message.
211 # [OpenID Connect
212 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
213 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
214 # identifies the recipients that the JWT is intended for. The audience
215 # value is a single case-sensitive string. Having multiple values (array)
216 # for the audience field is not supported. More info about the OIDC JWT
217 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
218 # Note: if not specified, the Push endpoint URL will be used.
219 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
220 # email](https://cloud.google.com/iam/docs/service-accounts)
221 # to be used for generating the OIDC token. The caller (for
222 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
223 # have the iam.serviceAccounts.actAs permission for the service account.
224 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400225 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700226 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
227 # before the subscriber should acknowledge the message. After message
228 # delivery but before the ack deadline expires and before the message is
229 # acknowledged, it is an outstanding message and will not be delivered
230 # again during that time (on a best-effort basis).
231 #
232 # For pull subscriptions, this value is used as the initial value for the ack
233 # deadline. To override this value for a given message, call
234 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
235 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
236 #
237 # For push delivery, this value is also used to set the request timeout for
238 # the call to the push endpoint.
239 #
240 # If the subscriber never acknowledges the message, the Pub/Sub
241 # system will eventually redeliver the message.
242 #
243 # If this parameter is 0, a default value of 10 seconds is used.
244 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
245 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400250}
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400262 # The value of this field will be `_deleted-topic_` if the topic has been
263 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800265 # used to configure it. An empty `pushConfig` signifies that the subscriber
266 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800268 #
269 # Every endpoint has a set of API supported attributes that can be used to
270 # control different aspects of the message delivery.
271 #
272 # The currently supported attribute is `x-goog-version`, which you can
273 # use to change the format of the push message. This attribute
274 # indicates the version of the data expected by the endpoint. This
275 # controls the shape of the envelope (i.e. its fields and metadata).
276 # The endpoint version is based on the version of the Pub/Sub
277 # API.
278 #
279 # If not present during the `CreateSubscription` call, it will default to
280 # the version of the API used to make such call. If not present during a
281 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
282 # calls will always return a valid version, even if the subscription was
283 # created without this attribute.
284 #
285 # The possible values for this attribute are:
286 #
287 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
288 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800290 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
292 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
293 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
294 # `Authorization` header in the HTTP request for every pushed message.
295 # [OpenID Connect
296 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
297 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
298 # identifies the recipients that the JWT is intended for. The audience
299 # value is a single case-sensitive string. Having multiple values (array)
300 # for the audience field is not supported. More info about the OIDC JWT
301 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
302 # Note: if not specified, the Push endpoint URL will be used.
303 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
304 # email](https://cloud.google.com/iam/docs/service-accounts)
305 # to be used for generating the OIDC token. The caller (for
306 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
307 # have the iam.serviceAccounts.actAs permission for the service account.
308 },
Craig Citroe633be12015-03-02 13:40:36 -0800309 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700310 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
311 # before the subscriber should acknowledge the message. After message
312 # delivery but before the ack deadline expires and before the message is
313 # acknowledged, it is an outstanding message and will not be delivered
314 # again during that time (on a best-effort basis).
315 #
316 # For pull subscriptions, this value is used as the initial value for the ack
317 # deadline. To override this value for a given message, call
318 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
319 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
320 #
321 # For push delivery, this value is also used to set the request timeout for
322 # the call to the push endpoint.
323 #
324 # If the subscriber never acknowledges the message, the Pub/Sub
325 # system will eventually redeliver the message.
326 #
327 # If this parameter is 0, a default value of 10 seconds is used.
328 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
329 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400383 # The value of this field will be `_deleted-topic_` if the topic has been
384 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400386 # used to configure it. An empty `pushConfig` signifies that the subscriber
387 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800389 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400390 # Every endpoint has a set of API supported attributes that can be used to
391 # control different aspects of the message delivery.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800392 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400393 # The currently supported attribute is `x-goog-version`, which you can
394 # use to change the format of the push message. This attribute
395 # indicates the version of the data expected by the endpoint. This
396 # controls the shape of the envelope (i.e. its fields and metadata).
397 # The endpoint version is based on the version of the Pub/Sub
398 # API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800399 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400400 # If not present during the `CreateSubscription` call, it will default to
401 # the version of the API used to make such call. If not present during a
402 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
403 # calls will always return a valid version, even if the subscription was
404 # created without this attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800405 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400406 # The possible values for this attribute are:
407 #
408 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
409 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800411 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
413 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
414 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
415 # `Authorization` header in the HTTP request for every pushed message.
416 # [OpenID Connect
417 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
418 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
419 # identifies the recipients that the JWT is intended for. The audience
420 # value is a single case-sensitive string. Having multiple values (array)
421 # for the audience field is not supported. More info about the OIDC JWT
422 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
423 # Note: if not specified, the Push endpoint URL will be used.
424 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
425 # email](https://cloud.google.com/iam/docs/service-accounts)
426 # to be used for generating the OIDC token. The caller (for
427 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
428 # have the iam.serviceAccounts.actAs permission for the service account.
429 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400430 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700431 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
432 # before the subscriber should acknowledge the message. After message
433 # delivery but before the ack deadline expires and before the message is
434 # acknowledged, it is an outstanding message and will not be delivered
435 # again during that time (on a best-effort basis).
436 #
437 # For pull subscriptions, this value is used as the initial value for the ack
438 # deadline. To override this value for a given message, call
439 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
440 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
441 #
442 # For push delivery, this value is also used to set the request timeout for
443 # the call to the push endpoint.
444 #
445 # If the subscriber never acknowledges the message, the Pub/Sub
446 # system will eventually redeliver the message.
447 #
448 # If this parameter is 0, a default value of 10 seconds is used.
449 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
450 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{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 `&quot;goog&quot;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400455 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800456</div>
457
458<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, 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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
468
469Valid values are 0, 1, and 3. Requests specifying an invalid value will be
470rejected.
471
472Requests for policies with any conditional bindings must specify version 3.
473Policies without any conditional bindings may specify any valid value or
474leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700475
476To learn which resources support conditions in their IAM policies, see the
477[IAM
478documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000479 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800480 Allowed values
481 1 - v1 error format
482 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800483
484Returns:
485 An object of the form:
486
Dan O'Mearadd494642020-05-01 07:42:23 -0700487 { # An Identity and Access Management (IAM) policy, which specifies access
488 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800489 #
490 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700491 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
492 # `members` to a single `role`. Members can be user accounts, service accounts,
493 # Google groups, and domains (such as G Suite). A `role` is a named list of
494 # permissions; each `role` can be an IAM predefined role or a user-created
495 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800496 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 # For some types of Google Cloud resources, a `binding` can also specify a
498 # `condition`, which is a logical expression that allows access to a resource
499 # only if the expression evaluates to `true`. A condition can add constraints
500 # based on attributes of the request, the resource, or both. To learn which
501 # resources support conditions in their IAM policies, see the
502 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700503 #
504 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800505 #
506 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800508 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
510 # &quot;members&quot;: [
511 # &quot;user:mike@example.com&quot;,
512 # &quot;group:admins@example.com&quot;,
513 # &quot;domain:google.com&quot;,
514 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800515 # ]
516 # },
517 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700518 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
519 # &quot;members&quot;: [
520 # &quot;user:eve@example.com&quot;
521 # ],
522 # &quot;condition&quot;: {
523 # &quot;title&quot;: &quot;expirable access&quot;,
524 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
525 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800527 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700528 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
530 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800531 # }
532 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700533 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 #
535 # bindings:
536 # - members:
537 # - user:mike@example.com
538 # - group:admins@example.com
539 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
541 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 # - user:eve@example.com
544 # role: roles/resourcemanager.organizationViewer
545 # condition:
546 # title: expirable access
547 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700549 # - etag: BwWWja0YfJA=
550 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800552 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700554 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
555 # prevent simultaneous updates of a policy from overwriting each other.
556 # It is strongly suggested that systems make use of the `etag` in the
557 # read-modify-write cycle to perform policy updates in order to avoid race
558 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
559 # systems are expected to put that etag in the request to `setIamPolicy` to
560 # ensure that their change will be applied to the same version of the policy.
561 #
562 # **Important:** If you use IAM Conditions, you must include the `etag` field
563 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
564 # you to overwrite a version `3` policy with a version `1` policy, and all of
565 # the conditions in the version `3` policy are lost.
566 &quot;version&quot;: 42, # Specifies the format of the policy.
567 #
568 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
569 # are rejected.
570 #
571 # Any operation that affects conditional role bindings must specify version
572 # `3`. This requirement applies to the following operations:
573 #
574 # * Getting a policy that includes a conditional role binding
575 # * Adding a conditional role binding to a policy
576 # * Changing a conditional role binding in a policy
577 # * Removing any role binding, with or without a condition, from a policy
578 # that includes conditions
579 #
580 # **Important:** If you use IAM Conditions, you must include the `etag` field
581 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
582 # you to overwrite a version `3` policy with a version `1` policy, and all of
583 # the conditions in the version `3` policy are lost.
584 #
585 # If a policy does not include any conditions, operations on that policy may
586 # specify any valid version or leave the field unset.
587 #
588 # To learn which resources support conditions in their IAM policies, see the
589 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 # `condition` that determines how and when the `bindings` are applied. Each
592 # of the `bindings` must contain at least one member.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700593 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800595 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
597 #
598 # If the condition evaluates to `true`, then this binding applies to the
599 # current request.
600 #
601 # If the condition evaluates to `false`, then this binding does not apply to
602 # the current request. However, a different role binding might grant the same
603 # role to one or more of the members in this binding.
604 #
605 # To learn which resources support conditions in their IAM policies, see the
606 # [IAM
607 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
608 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
609 # are documented at https://github.com/google/cel-spec.
610 #
611 # Example (Comparison):
612 #
613 # title: &quot;Summary size limit&quot;
614 # description: &quot;Determines if a summary is less than 100 chars&quot;
615 # expression: &quot;document.summary.size() &lt; 100&quot;
616 #
617 # Example (Equality):
618 #
619 # title: &quot;Requestor is owner&quot;
620 # description: &quot;Determines if requestor is the document owner&quot;
621 # expression: &quot;document.owner == request.auth.claims.email&quot;
622 #
623 # Example (Logic):
624 #
625 # title: &quot;Public documents&quot;
626 # description: &quot;Determine whether the document should be publicly visible&quot;
627 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
628 #
629 # Example (Data Manipulation):
630 #
631 # title: &quot;Notification string&quot;
632 # description: &quot;Create a notification string with a timestamp.&quot;
633 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
634 #
635 # The exact variables and functions that may be referenced within an expression
636 # are determined by the service that evaluates it. See the service
637 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
639 # reporting, e.g. a file name and a position in the file.
640 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
641 # its purpose. This can be used e.g. in UIs which allow to enter the
642 # expression.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700643 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
644 # describes the expression, e.g. when hovered over it in a UI.
645 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
646 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 },
648 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800649 # `members` can have the following values:
650 #
651 # * `allUsers`: A special identifier that represents anyone who is
652 # on the internet; with or without a Google account.
653 #
654 # * `allAuthenticatedUsers`: A special identifier that represents anyone
655 # who is authenticated with a Google account or a service account.
656 #
657 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800659 #
660 #
661 # * `serviceAccount:{emailid}`: An email address that represents a service
662 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
663 #
664 # * `group:{emailid}`: An email address that represents a Google group.
665 # For example, `admins@example.com`.
666 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
668 # identifier) representing a user that has been recently deleted. For
669 # example, `alice@example.com?uid=123456789012345678901`. If the user is
670 # recovered, this value reverts to `user:{emailid}` and the recovered user
671 # retains the role in the binding.
672 #
673 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
674 # unique identifier) representing a service account that has been recently
675 # deleted. For example,
676 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
677 # If the service account is undeleted, this value reverts to
678 # `serviceAccount:{emailid}` and the undeleted service account retains the
679 # role in the binding.
680 #
681 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
682 # identifier) representing a Google group that has been recently
683 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
684 # the group is recovered, this value reverts to `group:{emailid}` and the
685 # recovered group retains the role in the binding.
686 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700687 #
688 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800689 # users of that domain. For example, `google.com` or `example.com`.
690 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700691 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000692 ],
693 },
694 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000695 }</pre>
696</div>
697
698<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 <code class="details" id="list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000700 <pre>Lists matching subscriptions.
701
702Args:
703 project: string, The name of the cloud project that subscriptions belong to. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800704 pageToken: string, The value returned by the last `ListSubscriptionsResponse`; indicates that
705this is a continuation of a prior `ListSubscriptions` call, and that the
706system should return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 pageSize: integer, Maximum number of subscriptions to return.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000708 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800709 Allowed values
710 1 - v1 error format
711 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000712
713Returns:
714 An object of the form:
715
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700716 { # Response for the `ListSubscriptions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;subscriptions&quot;: [ # The subscriptions that match the request.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000718 { # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400720 # The value of this field will be `_deleted-topic_` if the topic has been
721 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400723 # used to configure it. An empty `pushConfig` signifies that the subscriber
724 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800726 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400727 # Every endpoint has a set of API supported attributes that can be used to
728 # control different aspects of the message delivery.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800729 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400730 # The currently supported attribute is `x-goog-version`, which you can
731 # use to change the format of the push message. This attribute
732 # indicates the version of the data expected by the endpoint. This
733 # controls the shape of the envelope (i.e. its fields and metadata).
734 # The endpoint version is based on the version of the Pub/Sub
735 # API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800736 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400737 # If not present during the `CreateSubscription` call, it will default to
738 # the version of the API used to make such call. If not present during a
739 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
740 # calls will always return a valid version, even if the subscription was
741 # created without this attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800742 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400743 # The possible values for this attribute are:
744 #
745 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
746 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800748 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
750 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
751 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
752 # `Authorization` header in the HTTP request for every pushed message.
753 # [OpenID Connect
754 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
755 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
756 # identifies the recipients that the JWT is intended for. The audience
757 # value is a single case-sensitive string. Having multiple values (array)
758 # for the audience field is not supported. More info about the OIDC JWT
759 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
760 # Note: if not specified, the Push endpoint URL will be used.
761 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
762 # email](https://cloud.google.com/iam/docs/service-accounts)
763 # to be used for generating the OIDC token. The caller (for
764 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
765 # have the iam.serviceAccounts.actAs permission for the service account.
766 },
Craig Citroe633be12015-03-02 13:40:36 -0800767 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700768 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
769 # before the subscriber should acknowledge the message. After message
770 # delivery but before the ack deadline expires and before the message is
771 # acknowledged, it is an outstanding message and will not be delivered
772 # again during that time (on a best-effort basis).
773 #
774 # For pull subscriptions, this value is used as the initial value for the ack
775 # deadline. To override this value for a given message, call
776 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
777 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
778 #
779 # For push delivery, this value is also used to set the request timeout for
780 # the call to the push endpoint.
781 #
782 # If the subscriber never acknowledges the message, the Pub/Sub
783 # system will eventually redeliver the message.
784 #
785 # If this parameter is 0, a default value of 10 seconds is used.
786 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
787 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
788 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
789 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
790 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
791 # in length, and it must not start with `&quot;goog&quot;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400792 },
Craig Citroe633be12015-03-02 13:40:36 -0800793 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700794 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more subscriptions that match
795 # the request; this value should be passed in a new
796 # `ListSubscriptionsRequest` to get more subscriptions.
Craig Citroe633be12015-03-02 13:40:36 -0800797 }</pre>
798</div>
799
800<div class="method">
801 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
802 <pre>Retrieves the next page of results.
803
804Args:
805 previous_request: The request for the previous page. (required)
806 previous_response: The response from the request for the previous page. (required)
807
808Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800810 page. Returns None if there are no more items in the collection.
811 </pre>
812</div>
813
814<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700815 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800816 <pre>Modifies the ack deadline for a specific message. This method is useful
817to indicate that more time is needed to process a message by the
818subscriber, or to make the message available for redelivery if the
819processing was interrupted. Note that this does not modify the
820subscription-level `ackDeadlineSeconds` used for subsequent messages.
Craig Citroe633be12015-03-02 13:40:36 -0800821
822Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000823 subscription: string, The name of the subscription. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700824 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800825 The object takes the form of:
826
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000827{ # Request for the ModifyAckDeadline method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700828 &quot;ackId&quot;: &quot;A String&quot;, # The acknowledgment ID. Either this or ack_ids must be populated, but not
829 # both.
830 &quot;ackDeadlineSeconds&quot;: 42, # The new ack deadline with respect to the time this request was sent to
Dan O'Mearadd494642020-05-01 07:42:23 -0700831 # the Pub/Sub system. Must be &gt;= 0. For example, if the value is 10, the new
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800832 # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
833 # was made. Specifying zero may immediately make the message available for
834 # another pull request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 &quot;ackIds&quot;: [ # List of acknowledgment IDs.
836 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000837 ],
Craig Citroe633be12015-03-02 13:40:36 -0800838 }
839
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000840 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800841 Allowed values
842 1 - v1 error format
843 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800844
845Returns:
846 An object of the form:
847
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800848 { # A generic empty message that you can re-use to avoid defining duplicated
849 # empty messages in your APIs. A typical example is to use it as the request
850 # or the response type of an API method. For instance:
851 #
852 # service Foo {
853 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
854 # }
855 #
856 # The JSON representation for `Empty` is empty JSON object `{}`.
Craig Citroe633be12015-03-02 13:40:36 -0800857 }</pre>
858</div>
859
860<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800862 <pre>Modifies the `PushConfig` for a specified subscription.
863
864This may be used to change a push subscription to a pull one (signified by
865an empty `PushConfig`) or vice versa, or change the endpoint URL and other
866attributes of a push subscription. Messages will accumulate for delivery
867continuously through the call regardless of changes to the `PushConfig`.
Craig Citroe633be12015-03-02 13:40:36 -0800868
869Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000870 subscription: string, The name of the subscription. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700871 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800872 The object takes the form of:
873
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000874{ # Request for the ModifyPushConfig method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # The push configuration for future deliveries.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800876 #
877 # An empty `pushConfig` indicates that the Pub/Sub system should
878 # stop pushing messages from the given subscription and allow
879 # messages to be pulled and acknowledged - effectively pausing
880 # the subscription if `Pull` is not called.
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800882 #
883 # Every endpoint has a set of API supported attributes that can be used to
884 # control different aspects of the message delivery.
885 #
886 # The currently supported attribute is `x-goog-version`, which you can
887 # use to change the format of the push message. This attribute
888 # indicates the version of the data expected by the endpoint. This
889 # controls the shape of the envelope (i.e. its fields and metadata).
890 # The endpoint version is based on the version of the Pub/Sub
891 # API.
892 #
893 # If not present during the `CreateSubscription` call, it will default to
894 # the version of the API used to make such call. If not present during a
895 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
896 # calls will always return a valid version, even if the subscription was
897 # created without this attribute.
898 #
899 # The possible values for this attribute are:
900 #
901 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
902 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800904 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
906 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
907 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
908 # `Authorization` header in the HTTP request for every pushed message.
909 # [OpenID Connect
910 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
911 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
912 # identifies the recipients that the JWT is intended for. The audience
913 # value is a single case-sensitive string. Having multiple values (array)
914 # for the audience field is not supported. More info about the OIDC JWT
915 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
916 # Note: if not specified, the Push endpoint URL will be used.
917 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
918 # email](https://cloud.google.com/iam/docs/service-accounts)
919 # to be used for generating the OIDC token. The caller (for
920 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
921 # have the iam.serviceAccounts.actAs permission for the service account.
922 },
Craig Citroe633be12015-03-02 13:40:36 -0800923 },
924 }
925
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000926 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800927 Allowed values
928 1 - v1 error format
929 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800930
931Returns:
932 An object of the form:
933
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800934 { # A generic empty message that you can re-use to avoid defining duplicated
935 # empty messages in your APIs. A typical example is to use it as the request
936 # or the response type of an API method. For instance:
937 #
938 # service Foo {
939 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
940 # }
941 #
942 # The JSON representation for `Empty` is empty JSON object `{}`.
Craig Citroe633be12015-03-02 13:40:36 -0800943 }</pre>
944</div>
945
946<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 <code class="details" id="pull">pull(subscription, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800948 <pre>Pulls messages from the server. Returns an empty list if there are no
949messages available in the backlog. The server may return `UNAVAILABLE` if
950there are too many concurrent pull requests pending for the given
951subscription.
Craig Citroe633be12015-03-02 13:40:36 -0800952
953Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000954 subscription: string, The subscription from which messages should be pulled. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700955 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800956 The object takes the form of:
957
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700958{ # Request for the `Pull` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;returnImmediately&quot;: True or False, # Optional. If this is specified as true the system will respond immediately even if
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800960 # it is not able to return a message in the `Pull` response. Otherwise the
961 # system is allowed to wait until at least one message is available rather
962 # than returning no messages. The client may cancel the request if it does
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 # not wish to wait any longer for the response. Warning: setting this field
964 # to `true` is discouraged because it adversely impacts the performance of
965 # `Pull` operations. We recommend that users do not set this field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;maxMessages&quot;: 42, # The maximum number of messages returned for this request. The Pub/Sub
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800967 # system may return fewer than the number specified.
Craig Citroe633be12015-03-02 13:40:36 -0800968 }
969
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000970 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800971 Allowed values
972 1 - v1 error format
973 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800974
975Returns:
976 An object of the form:
977
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700978 { # Response for the `Pull` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &quot;receivedMessages&quot;: [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800980 # there are no more available in the backlog. The Pub/Sub system may return
981 # fewer than the `maxMessages` requested even if there are more messages
982 # available in the backlog.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000983 { # A message and its corresponding acknowledgment ID.
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 &quot;message&quot;: { # A message data and its attributes. The message payload must not be empty; # The message.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800985 # it must contain either a non-empty data field, or at least one attribute.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &quot;messageId&quot;: &quot;A String&quot;, # ID of this message, assigned by the server when the message is published.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800987 # Guaranteed to be unique within the topic. This value may be read by a
988 # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
989 # delivery. It must not be populated by the publisher in a `Publish` call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700990 &quot;attributes&quot;: { # Optional attributes for this message.
991 &quot;a_key&quot;: &quot;A String&quot;,
992 },
993 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published, populated by the server when
994 # it receives the `Publish` call. It must not be populated by the
995 # publisher in a `Publish` call.
996 &quot;data&quot;: &quot;A String&quot;, # The message payload. For JSON requests, the value of this field must be
997 # [base64-encoded](https://tools.ietf.org/html/rfc4648).
Craig Citroe633be12015-03-02 13:40:36 -0800998 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 &quot;ackId&quot;: &quot;A String&quot;, # This ID can be used to acknowledge the received message.
Craig Citroe633be12015-03-02 13:40:36 -08001000 },
1001 ],
1002 }</pre>
1003</div>
1004
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001005<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001007 <pre>Sets the access control policy on the specified resource. Replaces any
1008existing policy.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001009
Bu Sun Kim65020912020-05-20 12:08:20 -07001010Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -07001011
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001012Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001013 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001014See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001015 body: object, The request body.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001016 The object takes the form of:
1017
1018{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001019 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001020 # the policy is limited to a few 10s of KB. An empty policy is a
1021 # valid policy but certain Cloud Platform services (such as Projects)
1022 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001023 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001024 #
1025 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1027 # `members` to a single `role`. Members can be user accounts, service accounts,
1028 # Google groups, and domains (such as G Suite). A `role` is a named list of
1029 # permissions; each `role` can be an IAM predefined role or a user-created
1030 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001031 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 # For some types of Google Cloud resources, a `binding` can also specify a
1033 # `condition`, which is a logical expression that allows access to a resource
1034 # only if the expression evaluates to `true`. A condition can add constraints
1035 # based on attributes of the request, the resource, or both. To learn which
1036 # resources support conditions in their IAM policies, see the
1037 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001038 #
1039 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001040 #
1041 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001042 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001043 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1045 # &quot;members&quot;: [
1046 # &quot;user:mike@example.com&quot;,
1047 # &quot;group:admins@example.com&quot;,
1048 # &quot;domain:google.com&quot;,
1049 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001050 # ]
1051 # },
1052 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1054 # &quot;members&quot;: [
1055 # &quot;user:eve@example.com&quot;
1056 # ],
1057 # &quot;condition&quot;: {
1058 # &quot;title&quot;: &quot;expirable access&quot;,
1059 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1060 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001062 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1065 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001066 # }
1067 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001068 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001069 #
1070 # bindings:
1071 # - members:
1072 # - user:mike@example.com
1073 # - group:admins@example.com
1074 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1076 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001077 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001078 # - user:eve@example.com
1079 # role: roles/resourcemanager.organizationViewer
1080 # condition:
1081 # title: expirable access
1082 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 # - etag: BwWWja0YfJA=
1085 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001087 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001089 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1090 # prevent simultaneous updates of a policy from overwriting each other.
1091 # It is strongly suggested that systems make use of the `etag` in the
1092 # read-modify-write cycle to perform policy updates in order to avoid race
1093 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1094 # systems are expected to put that etag in the request to `setIamPolicy` to
1095 # ensure that their change will be applied to the same version of the policy.
1096 #
1097 # **Important:** If you use IAM Conditions, you must include the `etag` field
1098 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1099 # you to overwrite a version `3` policy with a version `1` policy, and all of
1100 # the conditions in the version `3` policy are lost.
1101 &quot;version&quot;: 42, # Specifies the format of the policy.
1102 #
1103 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1104 # are rejected.
1105 #
1106 # Any operation that affects conditional role bindings must specify version
1107 # `3`. This requirement applies to the following operations:
1108 #
1109 # * Getting a policy that includes a conditional role binding
1110 # * Adding a conditional role binding to a policy
1111 # * Changing a conditional role binding in a policy
1112 # * Removing any role binding, with or without a condition, from a policy
1113 # that includes conditions
1114 #
1115 # **Important:** If you use IAM Conditions, you must include the `etag` field
1116 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1117 # you to overwrite a version `3` policy with a version `1` policy, and all of
1118 # the conditions in the version `3` policy are lost.
1119 #
1120 # If a policy does not include any conditions, operations on that policy may
1121 # specify any valid version or leave the field unset.
1122 #
1123 # To learn which resources support conditions in their IAM policies, see the
1124 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001126 # `condition` that determines how and when the `bindings` are applied. Each
1127 # of the `bindings` must contain at least one member.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001128 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001130 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001131 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1132 #
1133 # If the condition evaluates to `true`, then this binding applies to the
1134 # current request.
1135 #
1136 # If the condition evaluates to `false`, then this binding does not apply to
1137 # the current request. However, a different role binding might grant the same
1138 # role to one or more of the members in this binding.
1139 #
1140 # To learn which resources support conditions in their IAM policies, see the
1141 # [IAM
1142 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1143 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1144 # are documented at https://github.com/google/cel-spec.
1145 #
1146 # Example (Comparison):
1147 #
1148 # title: &quot;Summary size limit&quot;
1149 # description: &quot;Determines if a summary is less than 100 chars&quot;
1150 # expression: &quot;document.summary.size() &lt; 100&quot;
1151 #
1152 # Example (Equality):
1153 #
1154 # title: &quot;Requestor is owner&quot;
1155 # description: &quot;Determines if requestor is the document owner&quot;
1156 # expression: &quot;document.owner == request.auth.claims.email&quot;
1157 #
1158 # Example (Logic):
1159 #
1160 # title: &quot;Public documents&quot;
1161 # description: &quot;Determine whether the document should be publicly visible&quot;
1162 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1163 #
1164 # Example (Data Manipulation):
1165 #
1166 # title: &quot;Notification string&quot;
1167 # description: &quot;Create a notification string with a timestamp.&quot;
1168 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1169 #
1170 # The exact variables and functions that may be referenced within an expression
1171 # are determined by the service that evaluates it. See the service
1172 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1174 # reporting, e.g. a file name and a position in the file.
1175 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1176 # its purpose. This can be used e.g. in UIs which allow to enter the
1177 # expression.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001178 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1179 # describes the expression, e.g. when hovered over it in a UI.
1180 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1181 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001182 },
1183 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001184 # `members` can have the following values:
1185 #
1186 # * `allUsers`: A special identifier that represents anyone who is
1187 # on the internet; with or without a Google account.
1188 #
1189 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1190 # who is authenticated with a Google account or a service account.
1191 #
1192 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001193 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001194 #
1195 #
1196 # * `serviceAccount:{emailid}`: An email address that represents a service
1197 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1198 #
1199 # * `group:{emailid}`: An email address that represents a Google group.
1200 # For example, `admins@example.com`.
1201 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001202 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1203 # identifier) representing a user that has been recently deleted. For
1204 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1205 # recovered, this value reverts to `user:{emailid}` and the recovered user
1206 # retains the role in the binding.
1207 #
1208 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1209 # unique identifier) representing a service account that has been recently
1210 # deleted. For example,
1211 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1212 # If the service account is undeleted, this value reverts to
1213 # `serviceAccount:{emailid}` and the undeleted service account retains the
1214 # role in the binding.
1215 #
1216 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1217 # identifier) representing a Google group that has been recently
1218 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1219 # the group is recovered, this value reverts to `group:{emailid}` and the
1220 # recovered group retains the role in the binding.
1221 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 #
1223 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001224 # users of that domain. For example, `google.com` or `example.com`.
1225 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001226 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001227 ],
1228 },
1229 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001230 },
1231 }
1232
1233 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001234 Allowed values
1235 1 - v1 error format
1236 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001237
1238Returns:
1239 An object of the form:
1240
Dan O'Mearadd494642020-05-01 07:42:23 -07001241 { # An Identity and Access Management (IAM) policy, which specifies access
1242 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001243 #
1244 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001245 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1246 # `members` to a single `role`. Members can be user accounts, service accounts,
1247 # Google groups, and domains (such as G Suite). A `role` is a named list of
1248 # permissions; each `role` can be an IAM predefined role or a user-created
1249 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001250 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001251 # For some types of Google Cloud resources, a `binding` can also specify a
1252 # `condition`, which is a logical expression that allows access to a resource
1253 # only if the expression evaluates to `true`. A condition can add constraints
1254 # based on attributes of the request, the resource, or both. To learn which
1255 # resources support conditions in their IAM policies, see the
1256 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001257 #
1258 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001259 #
1260 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001261 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001262 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001263 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1264 # &quot;members&quot;: [
1265 # &quot;user:mike@example.com&quot;,
1266 # &quot;group:admins@example.com&quot;,
1267 # &quot;domain:google.com&quot;,
1268 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001269 # ]
1270 # },
1271 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001272 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1273 # &quot;members&quot;: [
1274 # &quot;user:eve@example.com&quot;
1275 # ],
1276 # &quot;condition&quot;: {
1277 # &quot;title&quot;: &quot;expirable access&quot;,
1278 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1279 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001280 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001281 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001282 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1284 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001285 # }
1286 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001287 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001288 #
1289 # bindings:
1290 # - members:
1291 # - user:mike@example.com
1292 # - group:admins@example.com
1293 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001294 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1295 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001296 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001297 # - user:eve@example.com
1298 # role: roles/resourcemanager.organizationViewer
1299 # condition:
1300 # title: expirable access
1301 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001302 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001303 # - etag: BwWWja0YfJA=
1304 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001305 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001306 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001308 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1309 # prevent simultaneous updates of a policy from overwriting each other.
1310 # It is strongly suggested that systems make use of the `etag` in the
1311 # read-modify-write cycle to perform policy updates in order to avoid race
1312 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1313 # systems are expected to put that etag in the request to `setIamPolicy` to
1314 # ensure that their change will be applied to the same version of the policy.
1315 #
1316 # **Important:** If you use IAM Conditions, you must include the `etag` field
1317 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1318 # you to overwrite a version `3` policy with a version `1` policy, and all of
1319 # the conditions in the version `3` policy are lost.
1320 &quot;version&quot;: 42, # Specifies the format of the policy.
1321 #
1322 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1323 # are rejected.
1324 #
1325 # Any operation that affects conditional role bindings must specify version
1326 # `3`. This requirement applies to the following operations:
1327 #
1328 # * Getting a policy that includes a conditional role binding
1329 # * Adding a conditional role binding to a policy
1330 # * Changing a conditional role binding in a policy
1331 # * Removing any role binding, with or without a condition, from a policy
1332 # that includes conditions
1333 #
1334 # **Important:** If you use IAM Conditions, you must include the `etag` field
1335 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1336 # you to overwrite a version `3` policy with a version `1` policy, and all of
1337 # the conditions in the version `3` policy are lost.
1338 #
1339 # If a policy does not include any conditions, operations on that policy may
1340 # specify any valid version or leave the field unset.
1341 #
1342 # To learn which resources support conditions in their IAM policies, see the
1343 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001344 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001345 # `condition` that determines how and when the `bindings` are applied. Each
1346 # of the `bindings` must contain at least one member.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001347 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001349 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001350 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1351 #
1352 # If the condition evaluates to `true`, then this binding applies to the
1353 # current request.
1354 #
1355 # If the condition evaluates to `false`, then this binding does not apply to
1356 # the current request. However, a different role binding might grant the same
1357 # role to one or more of the members in this binding.
1358 #
1359 # To learn which resources support conditions in their IAM policies, see the
1360 # [IAM
1361 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1362 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1363 # are documented at https://github.com/google/cel-spec.
1364 #
1365 # Example (Comparison):
1366 #
1367 # title: &quot;Summary size limit&quot;
1368 # description: &quot;Determines if a summary is less than 100 chars&quot;
1369 # expression: &quot;document.summary.size() &lt; 100&quot;
1370 #
1371 # Example (Equality):
1372 #
1373 # title: &quot;Requestor is owner&quot;
1374 # description: &quot;Determines if requestor is the document owner&quot;
1375 # expression: &quot;document.owner == request.auth.claims.email&quot;
1376 #
1377 # Example (Logic):
1378 #
1379 # title: &quot;Public documents&quot;
1380 # description: &quot;Determine whether the document should be publicly visible&quot;
1381 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1382 #
1383 # Example (Data Manipulation):
1384 #
1385 # title: &quot;Notification string&quot;
1386 # description: &quot;Create a notification string with a timestamp.&quot;
1387 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1388 #
1389 # The exact variables and functions that may be referenced within an expression
1390 # are determined by the service that evaluates it. See the service
1391 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001392 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1393 # reporting, e.g. a file name and a position in the file.
1394 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1395 # its purpose. This can be used e.g. in UIs which allow to enter the
1396 # expression.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001397 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1398 # describes the expression, e.g. when hovered over it in a UI.
1399 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1400 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001401 },
1402 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001403 # `members` can have the following values:
1404 #
1405 # * `allUsers`: A special identifier that represents anyone who is
1406 # on the internet; with or without a Google account.
1407 #
1408 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1409 # who is authenticated with a Google account or a service account.
1410 #
1411 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001412 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001413 #
1414 #
1415 # * `serviceAccount:{emailid}`: An email address that represents a service
1416 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1417 #
1418 # * `group:{emailid}`: An email address that represents a Google group.
1419 # For example, `admins@example.com`.
1420 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001421 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1422 # identifier) representing a user that has been recently deleted. For
1423 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1424 # recovered, this value reverts to `user:{emailid}` and the recovered user
1425 # retains the role in the binding.
1426 #
1427 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1428 # unique identifier) representing a service account that has been recently
1429 # deleted. For example,
1430 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1431 # If the service account is undeleted, this value reverts to
1432 # `serviceAccount:{emailid}` and the undeleted service account retains the
1433 # role in the binding.
1434 #
1435 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1436 # identifier) representing a Google group that has been recently
1437 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1438 # the group is recovered, this value reverts to `group:{emailid}` and the
1439 # recovered group retains the role in the binding.
1440 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001441 #
1442 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001443 # users of that domain. For example, `google.com` or `example.com`.
1444 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001446 ],
1447 },
1448 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001449 }</pre>
1450</div>
1451
1452<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001453 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001454 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001455If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07001456permissions, not a `NOT_FOUND` error.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001457
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001458Note: This operation is designed to be used for building permission-aware
1459UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07001460may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001461
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001462Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001463 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001464See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001465 body: object, The request body.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001466 The object takes the form of:
1467
1468{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001469 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1470 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001471 # information see
1472 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001473 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001474 ],
1475 }
1476
1477 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001478 Allowed values
1479 1 - v1 error format
1480 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001481
1482Returns:
1483 An object of the form:
1484
1485 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001487 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001488 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001489 ],
1490 }</pre>
1491</div>
1492
Craig Citroe633be12015-03-02 13:40:36 -08001493</body></html>