blob: 95efa026deeda5b40b9150860743d71f97200c0d [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;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 -0800178 # used to configure it. An empty `pushConfig` signifies that the subscriber
179 # will pull and ack messages using API methods.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700180 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
181 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800183 #
184 # Every endpoint has a set of API supported attributes that can be used to
185 # control different aspects of the message delivery.
186 #
187 # The currently supported attribute is `x-goog-version`, which you can
188 # use to change the format of the push message. This attribute
189 # indicates the version of the data expected by the endpoint. This
190 # controls the shape of the envelope (i.e. its fields and metadata).
191 # The endpoint version is based on the version of the Pub/Sub
192 # API.
193 #
194 # If not present during the `CreateSubscription` call, it will default to
195 # the version of the API used to make such call. If not present during a
196 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
197 # calls will always return a valid version, even if the subscription was
198 # created without this attribute.
199 #
200 # The possible values for this attribute are:
201 #
202 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
203 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800205 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
207 # `Authorization` header in the HTTP request for every pushed message.
208 # [OpenID Connect
209 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
211 # email](https://cloud.google.com/iam/docs/service-accounts)
212 # to be used for generating the OIDC token. The caller (for
213 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
214 # have the iam.serviceAccounts.actAs permission for the service account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
216 # identifies the recipients that the JWT is intended for. The audience
217 # value is a single case-sensitive string. Having multiple values (array)
218 # for the audience field is not supported. More info about the OIDC JWT
219 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
220 # Note: if not specified, the Push endpoint URL will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 },
Craig Citroe633be12015-03-02 13:40:36 -0800222 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700223 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
224 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
225 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
226 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
227 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
228 # in length, and it must not start with `&quot;goog&quot;`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700229 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
230 # before the subscriber should acknowledge the message. After message
231 # delivery but before the ack deadline expires and before the message is
232 # acknowledged, it is an outstanding message and will not be delivered
233 # again during that time (on a best-effort basis).
234 #
235 # For pull subscriptions, this value is used as the initial value for the ack
236 # deadline. To override this value for a given message, call
237 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
238 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
239 #
240 # For push delivery, this value is also used to set the request timeout for
241 # the call to the push endpoint.
242 #
243 # If the subscriber never acknowledges the message, the Pub/Sub
244 # system will eventually redeliver the message.
245 #
246 # If this parameter is 0, a default value of 10 seconds is used.
247 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
248 # The value of this field will be `_deleted-topic_` if the topic has been
249 # deleted.
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.
261 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
262 # used to configure it. An empty `pushConfig` signifies that the subscriber
263 # will pull and ack messages using API methods.
264 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
265 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
266 &quot;attributes&quot;: { # Endpoint configuration attributes.
267 #
268 # Every endpoint has a set of API supported attributes that can be used to
269 # control different aspects of the message delivery.
270 #
271 # The currently supported attribute is `x-goog-version`, which you can
272 # use to change the format of the push message. This attribute
273 # indicates the version of the data expected by the endpoint. This
274 # controls the shape of the envelope (i.e. its fields and metadata).
275 # The endpoint version is based on the version of the Pub/Sub
276 # API.
277 #
278 # If not present during the `CreateSubscription` call, it will default to
279 # the version of the API used to make such call. If not present during a
280 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
281 # calls will always return a valid version, even if the subscription was
282 # created without this attribute.
283 #
284 # The possible values for this attribute are:
285 #
286 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
287 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
288 &quot;a_key&quot;: &quot;A String&quot;,
289 },
290 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
291 # `Authorization` header in the HTTP request for every pushed message.
292 # [OpenID Connect
293 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
294 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
295 # email](https://cloud.google.com/iam/docs/service-accounts)
296 # to be used for generating the OIDC token. The caller (for
297 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
298 # have the iam.serviceAccounts.actAs permission for the service account.
299 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
300 # identifies the recipients that the JWT is intended for. The audience
301 # value is a single case-sensitive string. Having multiple values (array)
302 # for the audience field is not supported. More info about the OIDC JWT
303 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
304 # Note: if not specified, the Push endpoint URL will be used.
305 },
306 },
307 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
308 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
309 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
310 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
311 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
312 # in length, and it must not start with `&quot;goog&quot;`.
313 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
314 # before the subscriber should acknowledge the message. After message
315 # delivery but before the ack deadline expires and before the message is
316 # acknowledged, it is an outstanding message and will not be delivered
317 # again during that time (on a best-effort basis).
318 #
319 # For pull subscriptions, this value is used as the initial value for the ack
320 # deadline. To override this value for a given message, call
321 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
322 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
323 #
324 # For push delivery, this value is also used to set the request timeout for
325 # the call to the push endpoint.
326 #
327 # If the subscriber never acknowledges the message, the Pub/Sub
328 # system will eventually redeliver the message.
329 #
330 # If this parameter is 0, a default value of 10 seconds is used.
331 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
332 # The value of this field will be `_deleted-topic_` if the topic has been
333 # deleted.
334 }</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 Kimd059ad82020-07-22 17:02:09 -0700382 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
383 # used to configure it. An empty `pushConfig` signifies that the subscriber
384 # will pull and ack messages using API methods.
385 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
386 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
387 &quot;attributes&quot;: { # Endpoint configuration attributes.
388 #
389 # Every endpoint has a set of API supported attributes that can be used to
390 # control different aspects of the message delivery.
391 #
392 # The currently supported attribute is `x-goog-version`, which you can
393 # use to change the format of the push message. This attribute
394 # indicates the version of the data expected by the endpoint. This
395 # controls the shape of the envelope (i.e. its fields and metadata).
396 # The endpoint version is based on the version of the Pub/Sub
397 # API.
398 #
399 # If not present during the `CreateSubscription` call, it will default to
400 # the version of the API used to make such call. If not present during a
401 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
402 # calls will always return a valid version, even if the subscription was
403 # created without this attribute.
404 #
405 # The possible values for this attribute are:
406 #
407 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
408 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
409 &quot;a_key&quot;: &quot;A String&quot;,
410 },
411 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
412 # `Authorization` header in the HTTP request for every pushed message.
413 # [OpenID Connect
414 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
415 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
416 # email](https://cloud.google.com/iam/docs/service-accounts)
417 # to be used for generating the OIDC token. The caller (for
418 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
419 # have the iam.serviceAccounts.actAs permission for the service account.
420 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
421 # identifies the recipients that the JWT is intended for. The audience
422 # value is a single case-sensitive string. Having multiple values (array)
423 # for the audience field is not supported. More info about the OIDC JWT
424 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
425 # Note: if not specified, the Push endpoint URL will be used.
426 },
Craig Citroe633be12015-03-02 13:40:36 -0800427 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700428 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
429 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
430 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
431 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
432 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
433 # in length, and it must not start with `&quot;goog&quot;`.
434 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
435 # before the subscriber should acknowledge the message. After message
436 # delivery but before the ack deadline expires and before the message is
437 # acknowledged, it is an outstanding message and will not be delivered
438 # again during that time (on a best-effort basis).
439 #
440 # For pull subscriptions, this value is used as the initial value for the ack
441 # deadline. To override this value for a given message, call
442 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
443 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
444 #
445 # For push delivery, this value is also used to set the request timeout for
446 # the call to the push endpoint.
447 #
448 # If the subscriber never acknowledges the message, the Pub/Sub
449 # system will eventually redeliver the message.
450 #
451 # If this parameter is 0, a default value of 10 seconds is used.
452 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
453 # The value of this field will be `_deleted-topic_` if the topic has been
454 # deleted.
455 }</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;version&quot;: 42, # Specifies the format of the policy.
555 #
556 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
557 # are rejected.
558 #
559 # Any operation that affects conditional role bindings must specify version
560 # `3`. This requirement applies to the following operations:
561 #
562 # * Getting a policy that includes a conditional role binding
563 # * Adding a conditional role binding to a policy
564 # * Changing a conditional role binding in a policy
565 # * Removing any role binding, with or without a condition, from a policy
566 # that includes conditions
567 #
568 # **Important:** If you use IAM Conditions, you must include the `etag` field
569 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
570 # you to overwrite a version `3` policy with a version `1` policy, and all of
571 # the conditions in the version `3` policy are lost.
572 #
573 # If a policy does not include any conditions, operations on that policy may
574 # specify any valid version or leave the field unset.
575 #
576 # To learn which resources support conditions in their IAM policies, see the
577 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700578 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
579 # prevent simultaneous updates of a policy from overwriting each other.
580 # It is strongly suggested that systems make use of the `etag` in the
581 # read-modify-write cycle to perform policy updates in order to avoid race
582 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
583 # systems are expected to put that etag in the request to `setIamPolicy` to
584 # ensure that their change will be applied to the same version of the policy.
585 #
586 # **Important:** If you use IAM Conditions, you must include the `etag` field
587 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
588 # you to overwrite a version `3` policy with a version `1` policy, and all of
589 # the conditions in the version `3` policy are lost.
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;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
639 # its purpose. This can be used e.g. in UIs which allow to enter the
640 # expression.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700641 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
642 # describes the expression, e.g. when hovered over it in a UI.
643 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
644 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700645 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
646 # reporting, e.g. a file name and a position in the file.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700717 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more subscriptions that match
718 # the request; this value should be passed in a new
719 # `ListSubscriptionsRequest` to get more subscriptions.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700720 &quot;subscriptions&quot;: [ # The subscriptions that match the request.
721 { # A subscription resource.
722 &quot;pushConfig&quot;: { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
723 # used to configure it. An empty `pushConfig` signifies that the subscriber
724 # will pull and ack messages using API methods.
725 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
726 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
727 &quot;attributes&quot;: { # Endpoint configuration attributes.
728 #
729 # Every endpoint has a set of API supported attributes that can be used to
730 # control different aspects of the message delivery.
731 #
732 # The currently supported attribute is `x-goog-version`, which you can
733 # use to change the format of the push message. This attribute
734 # indicates the version of the data expected by the endpoint. This
735 # controls the shape of the envelope (i.e. its fields and metadata).
736 # The endpoint version is based on the version of the Pub/Sub
737 # API.
738 #
739 # If not present during the `CreateSubscription` call, it will default to
740 # the version of the API used to make such call. If not present during a
741 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
742 # calls will always return a valid version, even if the subscription was
743 # created without this attribute.
744 #
745 # The possible values for this attribute are:
746 #
747 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
748 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
749 &quot;a_key&quot;: &quot;A String&quot;,
750 },
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;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
756 # email](https://cloud.google.com/iam/docs/service-accounts)
757 # to be used for generating the OIDC token. The caller (for
758 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
759 # have the iam.serviceAccounts.actAs permission for the service account.
760 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
761 # identifies the recipients that the JWT is intended for. The audience
762 # value is a single case-sensitive string. Having multiple values (array)
763 # for the audience field is not supported. More info about the OIDC JWT
764 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
765 # Note: if not specified, the Push endpoint URL will be used.
766 },
767 },
768 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
769 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
770 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
771 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
772 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
773 # in length, and it must not start with `&quot;goog&quot;`.
774 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
775 # before the subscriber should acknowledge the message. After message
776 # delivery but before the ack deadline expires and before the message is
777 # acknowledged, it is an outstanding message and will not be delivered
778 # again during that time (on a best-effort basis).
779 #
780 # For pull subscriptions, this value is used as the initial value for the ack
781 # deadline. To override this value for a given message, call
782 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
783 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
784 #
785 # For push delivery, this value is also used to set the request timeout for
786 # the call to the push endpoint.
787 #
788 # If the subscriber never acknowledges the message, the Pub/Sub
789 # system will eventually redeliver the message.
790 #
791 # If this parameter is 0, a default value of 10 seconds is used.
792 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this subscription is receiving messages.
793 # The value of this field will be `_deleted-topic_` if the topic has been
794 # deleted.
795 },
796 ],
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 Kimd059ad82020-07-22 17:02:09 -0700828 &quot;ackIds&quot;: [ # List of acknowledgment IDs.
829 &quot;A String&quot;,
830 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;ackId&quot;: &quot;A String&quot;, # The acknowledgment ID. Either this or ack_ids must be populated, but not
832 # both.
833 &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 -0700834 # 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 -0800835 # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
836 # was made. Specifying zero may immediately make the message available for
837 # another pull request.
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 Kimd059ad82020-07-22 17:02:09 -0700881 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
882 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700883 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800884 #
885 # Every endpoint has a set of API supported attributes that can be used to
886 # control different aspects of the message delivery.
887 #
888 # The currently supported attribute is `x-goog-version`, which you can
889 # use to change the format of the push message. This attribute
890 # indicates the version of the data expected by the endpoint. This
891 # controls the shape of the envelope (i.e. its fields and metadata).
892 # The endpoint version is based on the version of the Pub/Sub
893 # API.
894 #
895 # If not present during the `CreateSubscription` call, it will default to
896 # the version of the API used to make such call. If not present during a
897 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
898 # calls will always return a valid version, even if the subscription was
899 # created without this attribute.
900 #
901 # The possible values for this attribute are:
902 #
903 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
904 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800906 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &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).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700911 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
912 # email](https://cloud.google.com/iam/docs/service-accounts)
913 # to be used for generating the OIDC token. The caller (for
914 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
915 # have the iam.serviceAccounts.actAs permission for the service account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
917 # identifies the recipients that the JWT is intended for. The audience
918 # value is a single case-sensitive string. Having multiple values (array)
919 # for the audience field is not supported. More info about the OIDC JWT
920 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
921 # Note: if not specified, the Push endpoint URL will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 },
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 Kimd059ad82020-07-22 17:02:09 -0700990 &quot;data&quot;: &quot;A String&quot;, # The message payload. For JSON requests, the value of this field must be
991 # [base64-encoded](https://tools.ietf.org/html/rfc4648).
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 &quot;publishTime&quot;: &quot;A String&quot;, # The time at which the message was published, populated by the server when
993 # it receives the `Publish` call. It must not be populated by the
994 # publisher in a `Publish` call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700995 &quot;attributes&quot;: { # Optional attributes for this message.
996 &quot;a_key&quot;: &quot;A String&quot;,
997 },
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;version&quot;: 42, # Specifies the format of the policy.
1090 #
1091 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1092 # are rejected.
1093 #
1094 # Any operation that affects conditional role bindings must specify version
1095 # `3`. This requirement applies to the following operations:
1096 #
1097 # * Getting a policy that includes a conditional role binding
1098 # * Adding a conditional role binding to a policy
1099 # * Changing a conditional role binding in a policy
1100 # * Removing any role binding, with or without a condition, from a policy
1101 # that includes conditions
1102 #
1103 # **Important:** If you use IAM Conditions, you must include the `etag` field
1104 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1105 # you to overwrite a version `3` policy with a version `1` policy, and all of
1106 # the conditions in the version `3` policy are lost.
1107 #
1108 # If a policy does not include any conditions, operations on that policy may
1109 # specify any valid version or leave the field unset.
1110 #
1111 # To learn which resources support conditions in their IAM policies, see the
1112 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001113 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1114 # prevent simultaneous updates of a policy from overwriting each other.
1115 # It is strongly suggested that systems make use of the `etag` in the
1116 # read-modify-write cycle to perform policy updates in order to avoid race
1117 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1118 # systems are expected to put that etag in the request to `setIamPolicy` to
1119 # ensure that their change will be applied to the same version of the policy.
1120 #
1121 # **Important:** If you use IAM Conditions, you must include the `etag` field
1122 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1123 # you to overwrite a version `3` policy with a version `1` policy, and all of
1124 # the conditions in the version `3` policy are lost.
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;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1174 # its purpose. This can be used e.g. in UIs which allow to enter the
1175 # expression.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001176 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1177 # describes the expression, e.g. when hovered over it in a UI.
1178 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1179 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001180 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1181 # reporting, e.g. a file name and a position in the file.
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;version&quot;: 42, # Specifies the format of the policy.
1309 #
1310 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1311 # are rejected.
1312 #
1313 # Any operation that affects conditional role bindings must specify version
1314 # `3`. This requirement applies to the following operations:
1315 #
1316 # * Getting a policy that includes a conditional role binding
1317 # * Adding a conditional role binding to a policy
1318 # * Changing a conditional role binding in a policy
1319 # * Removing any role binding, with or without a condition, from a policy
1320 # that includes conditions
1321 #
1322 # **Important:** If you use IAM Conditions, you must include the `etag` field
1323 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1324 # you to overwrite a version `3` policy with a version `1` policy, and all of
1325 # the conditions in the version `3` policy are lost.
1326 #
1327 # If a policy does not include any conditions, operations on that policy may
1328 # specify any valid version or leave the field unset.
1329 #
1330 # To learn which resources support conditions in their IAM policies, see the
1331 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001332 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1333 # prevent simultaneous updates of a policy from overwriting each other.
1334 # It is strongly suggested that systems make use of the `etag` in the
1335 # read-modify-write cycle to perform policy updates in order to avoid race
1336 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1337 # systems are expected to put that etag in the request to `setIamPolicy` to
1338 # ensure that their change will be applied to the same version of the policy.
1339 #
1340 # **Important:** If you use IAM Conditions, you must include the `etag` field
1341 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1342 # you to overwrite a version `3` policy with a version `1` policy, and all of
1343 # the conditions in the version `3` policy are lost.
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;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1393 # its purpose. This can be used e.g. in UIs which allow to enter the
1394 # expression.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001395 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1396 # describes the expression, e.g. when hovered over it in a UI.
1397 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1398 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001399 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1400 # reporting, e.g. a file name and a position in the file.
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>