blob: 3c1653220584bb10cb679cc2733290aa6bcdf1af [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;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400178 # before the subscriber should acknowledge the message. After message
179 # delivery but before the ack deadline expires and before the message is
180 # acknowledged, it is an outstanding message and will not be delivered
181 # again during that time (on a best-effort basis).
182 #
183 # For pull subscriptions, this value is used as the initial value for the ack
184 # deadline. To override this value for a given message, call
185 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
186 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
187 #
188 # For push delivery, this value is also used to set the request timeout for
189 # the call to the push endpoint.
190 #
191 # If the subscriber never acknowledges the message, the Pub/Sub
192 # system will eventually redeliver the message.
193 #
194 # If this parameter is 0, a default value of 10 seconds is used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
196 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
197 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
198 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
199 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
200 # in length, and it must not start with `&quot;goog&quot;`.
201 &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 -0400202 # The value of this field will be `_deleted-topic_` if the topic has been
203 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &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 -0400205 # used to configure it. An empty `pushConfig` signifies that the subscriber
206 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;attributes&quot;: { # Endpoint configuration attributes.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400208 #
209 # Every endpoint has a set of API supported attributes that can be used to
210 # control different aspects of the message delivery.
211 #
212 # The currently supported attribute is `x-goog-version`, which you can
213 # use to change the format of the push message. This attribute
214 # indicates the version of the data expected by the endpoint. This
215 # controls the shape of the envelope (i.e. its fields and metadata).
216 # The endpoint version is based on the version of the Pub/Sub
217 # API.
218 #
219 # If not present during the `CreateSubscription` call, it will default to
220 # the version of the API used to make such call. If not present during a
221 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
222 # calls will always return a valid version, even if the subscription was
223 # created without this attribute.
224 #
225 # The possible values for this attribute are:
226 #
227 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
228 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400230 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
232 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
233 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
234 # `Authorization` header in the HTTP request for every pushed message.
235 # [OpenID Connect
236 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
237 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
238 # identifies the recipients that the JWT is intended for. The audience
239 # value is a single case-sensitive string. Having multiple values (array)
240 # for the audience field is not supported. More info about the OIDC JWT
241 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
242 # Note: if not specified, the Push endpoint URL will be used.
243 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
244 # email](https://cloud.google.com/iam/docs/service-accounts)
245 # to be used for generating the OIDC token. The caller (for
246 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
247 # have the iam.serviceAccounts.actAs permission for the service account.
248 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400249 },
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;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800262 # before the subscriber should acknowledge the message. After message
263 # delivery but before the ack deadline expires and before the message is
264 # acknowledged, it is an outstanding message and will not be delivered
265 # again during that time (on a best-effort basis).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400266 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800267 # For pull subscriptions, this value is used as the initial value for the ack
268 # deadline. To override this value for a given message, call
269 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
270 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400271 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800272 # For push delivery, this value is also used to set the request timeout for
273 # the call to the push endpoint.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400274 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800275 # If the subscriber never acknowledges the message, the Pub/Sub
276 # system will eventually redeliver the message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400277 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800278 # If this parameter is 0, a default value of 10 seconds is used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
280 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
281 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
282 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
283 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
284 # in length, and it must not start with `&quot;goog&quot;`.
285 &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 -0400286 # The value of this field will be `_deleted-topic_` if the topic has been
287 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &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 -0800289 # used to configure it. An empty `pushConfig` signifies that the subscriber
290 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800292 #
293 # Every endpoint has a set of API supported attributes that can be used to
294 # control different aspects of the message delivery.
295 #
296 # The currently supported attribute is `x-goog-version`, which you can
297 # use to change the format of the push message. This attribute
298 # indicates the version of the data expected by the endpoint. This
299 # controls the shape of the envelope (i.e. its fields and metadata).
300 # The endpoint version is based on the version of the Pub/Sub
301 # API.
302 #
303 # If not present during the `CreateSubscription` call, it will default to
304 # the version of the API used to make such call. If not present during a
305 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
306 # calls will always return a valid version, even if the subscription was
307 # created without this attribute.
308 #
309 # The possible values for this attribute are:
310 #
311 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
312 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800314 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
316 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
317 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
318 # `Authorization` header in the HTTP request for every pushed message.
319 # [OpenID Connect
320 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
321 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
322 # identifies the recipients that the JWT is intended for. The audience
323 # value is a single case-sensitive string. Having multiple values (array)
324 # for the audience field is not supported. More info about the OIDC JWT
325 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
326 # Note: if not specified, the Push endpoint URL will be used.
327 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
328 # email](https://cloud.google.com/iam/docs/service-accounts)
329 # to be used for generating the OIDC token. The caller (for
330 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
331 # have the iam.serviceAccounts.actAs permission for the service account.
332 },
Craig Citroe633be12015-03-02 13:40:36 -0800333 },
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;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400383 # before the subscriber should acknowledge the message. After message
384 # delivery but before the ack deadline expires and before the message is
385 # acknowledged, it is an outstanding message and will not be delivered
386 # again during that time (on a best-effort basis).
387 #
388 # For pull subscriptions, this value is used as the initial value for the ack
389 # deadline. To override this value for a given message, call
390 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
391 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
392 #
393 # For push delivery, this value is also used to set the request timeout for
394 # the call to the push endpoint.
395 #
396 # If the subscriber never acknowledges the message, the Pub/Sub
397 # system will eventually redeliver the message.
398 #
399 # If this parameter is 0, a default value of 10 seconds is used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700400 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
401 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
402 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
403 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
404 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
405 # in length, and it must not start with `&quot;goog&quot;`.
406 &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 -0400407 # The value of this field will be `_deleted-topic_` if the topic has been
408 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &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 -0400410 # used to configure it. An empty `pushConfig` signifies that the subscriber
411 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800413 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400414 # Every endpoint has a set of API supported attributes that can be used to
415 # control different aspects of the message delivery.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800416 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400417 # The currently supported attribute is `x-goog-version`, which you can
418 # use to change the format of the push message. This attribute
419 # indicates the version of the data expected by the endpoint. This
420 # controls the shape of the envelope (i.e. its fields and metadata).
421 # The endpoint version is based on the version of the Pub/Sub
422 # API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800423 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400424 # If not present during the `CreateSubscription` call, it will default to
425 # the version of the API used to make such call. If not present during a
426 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
427 # calls will always return a valid version, even if the subscription was
428 # created without this attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800429 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400430 # The possible values for this attribute are:
431 #
432 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
433 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800435 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
437 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
438 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
439 # `Authorization` header in the HTTP request for every pushed message.
440 # [OpenID Connect
441 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
442 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
443 # identifies the recipients that the JWT is intended for. The audience
444 # value is a single case-sensitive string. Having multiple values (array)
445 # for the audience field is not supported. More info about the OIDC JWT
446 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
447 # Note: if not specified, the Push endpoint URL will be used.
448 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
449 # email](https://cloud.google.com/iam/docs/service-accounts)
450 # to be used for generating the OIDC token. The caller (for
451 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
452 # have the iam.serviceAccounts.actAs permission for the service account.
453 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400454 },
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 Kim65020912020-05-20 12:08:20 -0700554 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 # `condition` that determines how and when the `bindings` are applied. Each
556 # of the `bindings` must contain at least one member.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700557 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800559 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
561 #
562 # If the condition evaluates to `true`, then this binding applies to the
563 # current request.
564 #
565 # If the condition evaluates to `false`, then this binding does not apply to
566 # the current request. However, a different role binding might grant the same
567 # role to one or more of the members in this binding.
568 #
569 # To learn which resources support conditions in their IAM policies, see the
570 # [IAM
571 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
572 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
573 # are documented at https://github.com/google/cel-spec.
574 #
575 # Example (Comparison):
576 #
577 # title: &quot;Summary size limit&quot;
578 # description: &quot;Determines if a summary is less than 100 chars&quot;
579 # expression: &quot;document.summary.size() &lt; 100&quot;
580 #
581 # Example (Equality):
582 #
583 # title: &quot;Requestor is owner&quot;
584 # description: &quot;Determines if requestor is the document owner&quot;
585 # expression: &quot;document.owner == request.auth.claims.email&quot;
586 #
587 # Example (Logic):
588 #
589 # title: &quot;Public documents&quot;
590 # description: &quot;Determine whether the document should be publicly visible&quot;
591 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
592 #
593 # Example (Data Manipulation):
594 #
595 # title: &quot;Notification string&quot;
596 # description: &quot;Create a notification string with a timestamp.&quot;
597 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
598 #
599 # The exact variables and functions that may be referenced within an expression
600 # are determined by the service that evaluates it. See the service
601 # documentation for additional information.
602 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
603 # describes the expression, e.g. when hovered over it in a UI.
604 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
605 # syntax.
606 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
607 # reporting, e.g. a file name and a position in the file.
608 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
609 # its purpose. This can be used e.g. in UIs which allow to enter the
610 # expression.
611 },
612 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800613 # `members` can have the following values:
614 #
615 # * `allUsers`: A special identifier that represents anyone who is
616 # on the internet; with or without a Google account.
617 #
618 # * `allAuthenticatedUsers`: A special identifier that represents anyone
619 # who is authenticated with a Google account or a service account.
620 #
621 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700622 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800623 #
624 #
625 # * `serviceAccount:{emailid}`: An email address that represents a service
626 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
627 #
628 # * `group:{emailid}`: An email address that represents a Google group.
629 # For example, `admins@example.com`.
630 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
632 # identifier) representing a user that has been recently deleted. For
633 # example, `alice@example.com?uid=123456789012345678901`. If the user is
634 # recovered, this value reverts to `user:{emailid}` and the recovered user
635 # retains the role in the binding.
636 #
637 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
638 # unique identifier) representing a service account that has been recently
639 # deleted. For example,
640 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
641 # If the service account is undeleted, this value reverts to
642 # `serviceAccount:{emailid}` and the undeleted service account retains the
643 # role in the binding.
644 #
645 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
646 # identifier) representing a Google group that has been recently
647 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
648 # the group is recovered, this value reverts to `group:{emailid}` and the
649 # recovered group retains the role in the binding.
650 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700651 #
652 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800653 # users of that domain. For example, `google.com` or `example.com`.
654 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000656 ],
657 },
658 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800660 # prevent simultaneous updates of a policy from overwriting each other.
661 # It is strongly suggested that systems make use of the `etag` in the
662 # read-modify-write cycle to perform policy updates in order to avoid race
663 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
664 # systems are expected to put that etag in the request to `setIamPolicy` to
665 # ensure that their change will be applied to the same version of the policy.
666 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 # **Important:** If you use IAM Conditions, you must include the `etag` field
668 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
669 # you to overwrite a version `3` policy with a version `1` policy, and all of
670 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700671 &quot;version&quot;: 42, # Specifies the format of the policy.
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 #
673 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
674 # are rejected.
675 #
676 # Any operation that affects conditional role bindings must specify version
677 # `3`. This requirement applies to the following operations:
678 #
679 # * Getting a policy that includes a conditional role binding
680 # * Adding a conditional role binding to a policy
681 # * Changing a conditional role binding in a policy
682 # * Removing any role binding, with or without a condition, from a policy
683 # that includes conditions
684 #
685 # **Important:** If you use IAM Conditions, you must include the `etag` field
686 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
687 # you to overwrite a version `3` policy with a version `1` policy, and all of
688 # the conditions in the version `3` policy are lost.
689 #
690 # If a policy does not include any conditions, operations on that policy may
691 # specify any valid version or leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 #
693 # To learn which resources support conditions in their IAM policies, see the
694 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
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;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more subscriptions that match
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800718 # the request; this value should be passed in a new
719 # `ListSubscriptionsRequest` to get more subscriptions.
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;subscriptions&quot;: [ # The subscriptions that match the request.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000721 { # A subscription resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 &quot;ackDeadlineSeconds&quot;: 42, # This value is the maximum time after a subscriber receives a message
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400723 # before the subscriber should acknowledge the message. After message
724 # delivery but before the ack deadline expires and before the message is
725 # acknowledged, it is an outstanding message and will not be delivered
726 # again during that time (on a best-effort basis).
727 #
728 # For pull subscriptions, this value is used as the initial value for the ack
729 # deadline. To override this value for a given message, call
730 # `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
731 # The maximum custom deadline you can specify is 600 seconds (10 minutes).
732 #
733 # For push delivery, this value is also used to set the request timeout for
734 # the call to the push endpoint.
735 #
736 # If the subscriber never acknowledges the message, the Pub/Sub
737 # system will eventually redeliver the message.
738 #
739 # If this parameter is 0, a default value of 10 seconds is used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 &quot;name&quot;: &quot;A String&quot;, # The name of the subscription. It must have the format
741 # `&quot;projects/{project}/subscriptions/{subscription}&quot;`. `{subscription}` must
742 # start with a letter, and contain only letters (`[A-Za-z]`), numbers
743 # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
744 # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
745 # in length, and it must not start with `&quot;goog&quot;`.
746 &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 -0400747 # The value of this field will be `_deleted-topic_` if the topic has been
748 # deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &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 -0400750 # used to configure it. An empty `pushConfig` signifies that the subscriber
751 # will pull and ack messages using API methods.
Bu Sun Kim65020912020-05-20 12:08:20 -0700752 &quot;attributes&quot;: { # Endpoint configuration attributes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800753 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400754 # Every endpoint has a set of API supported attributes that can be used to
755 # control different aspects of the message delivery.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800756 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400757 # The currently supported attribute is `x-goog-version`, which you can
758 # use to change the format of the push message. This attribute
759 # indicates the version of the data expected by the endpoint. This
760 # controls the shape of the envelope (i.e. its fields and metadata).
761 # The endpoint version is based on the version of the Pub/Sub
762 # API.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800763 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400764 # If not present during the `CreateSubscription` call, it will default to
765 # the version of the API used to make such call. If not present during a
766 # `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
767 # calls will always return a valid version, even if the subscription was
768 # created without this attribute.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800769 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400770 # The possible values for this attribute are:
771 #
772 # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
773 # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 &quot;a_key&quot;: &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800775 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;pushEndpoint&quot;: &quot;A String&quot;, # A URL locating the endpoint to which messages should be pushed.
777 # For example, a Webhook endpoint might use &quot;https://example.com/push&quot;.
778 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
779 # `Authorization` header in the HTTP request for every pushed message.
780 # [OpenID Connect
781 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
782 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. The audience claim
783 # identifies the recipients that the JWT is intended for. The audience
784 # value is a single case-sensitive string. Having multiple values (array)
785 # for the audience field is not supported. More info about the OIDC JWT
786 # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
787 # Note: if not specified, the Push endpoint URL will be used.
788 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account
789 # email](https://cloud.google.com/iam/docs/service-accounts)
790 # to be used for generating the OIDC token. The caller (for
791 # CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
792 # have the iam.serviceAccounts.actAs permission for the service account.
793 },
Craig Citroe633be12015-03-02 13:40:36 -0800794 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400795 },
Craig Citroe633be12015-03-02 13:40:36 -0800796 ],
797 }</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 Kim65020912020-05-20 12:08:20 -07001089 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001090 # `condition` that determines how and when the `bindings` are applied. Each
1091 # of the `bindings` must contain at least one member.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001092 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001093 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001094 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001095 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1096 #
1097 # If the condition evaluates to `true`, then this binding applies to the
1098 # current request.
1099 #
1100 # If the condition evaluates to `false`, then this binding does not apply to
1101 # the current request. However, a different role binding might grant the same
1102 # role to one or more of the members in this binding.
1103 #
1104 # To learn which resources support conditions in their IAM policies, see the
1105 # [IAM
1106 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1107 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1108 # are documented at https://github.com/google/cel-spec.
1109 #
1110 # Example (Comparison):
1111 #
1112 # title: &quot;Summary size limit&quot;
1113 # description: &quot;Determines if a summary is less than 100 chars&quot;
1114 # expression: &quot;document.summary.size() &lt; 100&quot;
1115 #
1116 # Example (Equality):
1117 #
1118 # title: &quot;Requestor is owner&quot;
1119 # description: &quot;Determines if requestor is the document owner&quot;
1120 # expression: &quot;document.owner == request.auth.claims.email&quot;
1121 #
1122 # Example (Logic):
1123 #
1124 # title: &quot;Public documents&quot;
1125 # description: &quot;Determine whether the document should be publicly visible&quot;
1126 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1127 #
1128 # Example (Data Manipulation):
1129 #
1130 # title: &quot;Notification string&quot;
1131 # description: &quot;Create a notification string with a timestamp.&quot;
1132 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1133 #
1134 # The exact variables and functions that may be referenced within an expression
1135 # are determined by the service that evaluates it. See the service
1136 # documentation for additional information.
1137 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1138 # describes the expression, e.g. when hovered over it in a UI.
1139 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1140 # syntax.
1141 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1142 # reporting, e.g. a file name and a position in the file.
1143 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1144 # its purpose. This can be used e.g. in UIs which allow to enter the
1145 # expression.
1146 },
1147 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001148 # `members` can have the following values:
1149 #
1150 # * `allUsers`: A special identifier that represents anyone who is
1151 # on the internet; with or without a Google account.
1152 #
1153 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1154 # who is authenticated with a Google account or a service account.
1155 #
1156 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001157 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001158 #
1159 #
1160 # * `serviceAccount:{emailid}`: An email address that represents a service
1161 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1162 #
1163 # * `group:{emailid}`: An email address that represents a Google group.
1164 # For example, `admins@example.com`.
1165 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1167 # identifier) representing a user that has been recently deleted. For
1168 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1169 # recovered, this value reverts to `user:{emailid}` and the recovered user
1170 # retains the role in the binding.
1171 #
1172 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1173 # unique identifier) representing a service account that has been recently
1174 # deleted. For example,
1175 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1176 # If the service account is undeleted, this value reverts to
1177 # `serviceAccount:{emailid}` and the undeleted service account retains the
1178 # role in the binding.
1179 #
1180 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1181 # identifier) representing a Google group that has been recently
1182 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1183 # the group is recovered, this value reverts to `group:{emailid}` and the
1184 # recovered group retains the role in the binding.
1185 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 #
1187 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001188 # users of that domain. For example, `google.com` or `example.com`.
1189 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001190 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001191 ],
1192 },
1193 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001195 # prevent simultaneous updates of a policy from overwriting each other.
1196 # It is strongly suggested that systems make use of the `etag` in the
1197 # read-modify-write cycle to perform policy updates in order to avoid race
1198 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1199 # systems are expected to put that etag in the request to `setIamPolicy` to
1200 # ensure that their change will be applied to the same version of the policy.
1201 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001202 # **Important:** If you use IAM Conditions, you must include the `etag` field
1203 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1204 # you to overwrite a version `3` policy with a version `1` policy, and all of
1205 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001206 &quot;version&quot;: 42, # Specifies the format of the policy.
Dan O'Mearadd494642020-05-01 07:42:23 -07001207 #
1208 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1209 # are rejected.
1210 #
1211 # Any operation that affects conditional role bindings must specify version
1212 # `3`. This requirement applies to the following operations:
1213 #
1214 # * Getting a policy that includes a conditional role binding
1215 # * Adding a conditional role binding to a policy
1216 # * Changing a conditional role binding in a policy
1217 # * Removing any role binding, with or without a condition, from a policy
1218 # that includes conditions
1219 #
1220 # **Important:** If you use IAM Conditions, you must include the `etag` field
1221 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1222 # you to overwrite a version `3` policy with a version `1` policy, and all of
1223 # the conditions in the version `3` policy are lost.
1224 #
1225 # If a policy does not include any conditions, operations on that policy may
1226 # specify any valid version or leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001227 #
1228 # To learn which resources support conditions in their IAM policies, see the
1229 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
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 Kim65020912020-05-20 12:08:20 -07001308 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001309 # `condition` that determines how and when the `bindings` are applied. Each
1310 # of the `bindings` must contain at least one member.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001311 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001312 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001313 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1315 #
1316 # If the condition evaluates to `true`, then this binding applies to the
1317 # current request.
1318 #
1319 # If the condition evaluates to `false`, then this binding does not apply to
1320 # the current request. However, a different role binding might grant the same
1321 # role to one or more of the members in this binding.
1322 #
1323 # To learn which resources support conditions in their IAM policies, see the
1324 # [IAM
1325 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1326 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1327 # are documented at https://github.com/google/cel-spec.
1328 #
1329 # Example (Comparison):
1330 #
1331 # title: &quot;Summary size limit&quot;
1332 # description: &quot;Determines if a summary is less than 100 chars&quot;
1333 # expression: &quot;document.summary.size() &lt; 100&quot;
1334 #
1335 # Example (Equality):
1336 #
1337 # title: &quot;Requestor is owner&quot;
1338 # description: &quot;Determines if requestor is the document owner&quot;
1339 # expression: &quot;document.owner == request.auth.claims.email&quot;
1340 #
1341 # Example (Logic):
1342 #
1343 # title: &quot;Public documents&quot;
1344 # description: &quot;Determine whether the document should be publicly visible&quot;
1345 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1346 #
1347 # Example (Data Manipulation):
1348 #
1349 # title: &quot;Notification string&quot;
1350 # description: &quot;Create a notification string with a timestamp.&quot;
1351 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1352 #
1353 # The exact variables and functions that may be referenced within an expression
1354 # are determined by the service that evaluates it. See the service
1355 # documentation for additional information.
1356 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1357 # describes the expression, e.g. when hovered over it in a UI.
1358 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1359 # syntax.
1360 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1361 # reporting, e.g. a file name and a position in the file.
1362 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1363 # its purpose. This can be used e.g. in UIs which allow to enter the
1364 # expression.
1365 },
1366 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001367 # `members` can have the following values:
1368 #
1369 # * `allUsers`: A special identifier that represents anyone who is
1370 # on the internet; with or without a Google account.
1371 #
1372 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1373 # who is authenticated with a Google account or a service account.
1374 #
1375 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001376 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001377 #
1378 #
1379 # * `serviceAccount:{emailid}`: An email address that represents a service
1380 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1381 #
1382 # * `group:{emailid}`: An email address that represents a Google group.
1383 # For example, `admins@example.com`.
1384 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001385 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1386 # identifier) representing a user that has been recently deleted. For
1387 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1388 # recovered, this value reverts to `user:{emailid}` and the recovered user
1389 # retains the role in the binding.
1390 #
1391 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1392 # unique identifier) representing a service account that has been recently
1393 # deleted. For example,
1394 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1395 # If the service account is undeleted, this value reverts to
1396 # `serviceAccount:{emailid}` and the undeleted service account retains the
1397 # role in the binding.
1398 #
1399 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1400 # identifier) representing a Google group that has been recently
1401 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1402 # the group is recovered, this value reverts to `group:{emailid}` and the
1403 # recovered group retains the role in the binding.
1404 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001405 #
1406 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001407 # users of that domain. For example, `google.com` or `example.com`.
1408 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001409 &quot;A String&quot;,
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001410 ],
1411 },
1412 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001413 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001414 # prevent simultaneous updates of a policy from overwriting each other.
1415 # It is strongly suggested that systems make use of the `etag` in the
1416 # read-modify-write cycle to perform policy updates in order to avoid race
1417 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1418 # systems are expected to put that etag in the request to `setIamPolicy` to
1419 # ensure that their change will be applied to the same version of the policy.
1420 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001421 # **Important:** If you use IAM Conditions, you must include the `etag` field
1422 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1423 # you to overwrite a version `3` policy with a version `1` policy, and all of
1424 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 &quot;version&quot;: 42, # Specifies the format of the policy.
Dan O'Mearadd494642020-05-01 07:42:23 -07001426 #
1427 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1428 # are rejected.
1429 #
1430 # Any operation that affects conditional role bindings must specify version
1431 # `3`. This requirement applies to the following operations:
1432 #
1433 # * Getting a policy that includes a conditional role binding
1434 # * Adding a conditional role binding to a policy
1435 # * Changing a conditional role binding in a policy
1436 # * Removing any role binding, with or without a condition, from a policy
1437 # that includes conditions
1438 #
1439 # **Important:** If you use IAM Conditions, you must include the `etag` field
1440 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1441 # you to overwrite a version `3` policy with a version `1` policy, and all of
1442 # the conditions in the version `3` policy are lost.
1443 #
1444 # If a policy does not include any conditions, operations on that policy may
1445 # specify any valid version or leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 #
1447 # To learn which resources support conditions in their IAM policies, see the
1448 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
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>