blob: 017b595c4501802031798a09e9484c771af516e7 [file] [log] [blame]
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001<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_v1.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.snapshots.html">snapshots</a></h1>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a snapshot from the requested subscription. Snapshots are used in</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(snapshot, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Removes an existing snapshot. Snapshots are used in [Seek]</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083<p class="toc_element">
84 <code><a href="#get">get(snapshot, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets the configuration details of a snapshot. Snapshots are used in</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080088<p class="firstline">Gets the access control policy for a resource.</p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070089<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070091<p class="firstline">Lists the existing snapshots. Snapshots are used in [Seek](</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Updates an existing snapshot. Snapshots are used in</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800100<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 <pre>Creates a snapshot from the requested subscription. Snapshots are used in
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700108[Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
109which allow you to manage message acknowledgments in bulk. That is, you can
110set the acknowledgment state of messages in an existing subscription to the
111state captured by a snapshot.
112If the snapshot already exists, returns `ALREADY_EXISTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113If the requested subscription doesn&#x27;t exist, returns `NOT_FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114If the backlog in the subscription is too old -- and the resulting snapshot
115would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
116See also the `Snapshot.expire_time` field. If the name is not provided in
117the request, the server will assign a random
118name for this snapshot on the same project as the subscription, conforming
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700119to the [resource name format]
120(https://cloud.google.com/pubsub/docs/admin#resource_names). The
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121generated name is populated in the returned Snapshot object. Note that for
122REST API requests, you must specify a name in the request.
123
124Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 name: string, Required. User-provided name for this snapshot. If the name is not provided in the
126request, the server will assign a random name for this snapshot on the same
127project as the subscription. Note that for REST API requests, you must
128specify a name. See the &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -0700129href=&quot;https://cloud.google.com/pubsub/docs/admin#resource_names&quot;&gt; resource
Dan O'Mearadd494642020-05-01 07:42:23 -0700130name rules&lt;/a&gt;. Format is `projects/{project}/snapshots/{snap}`. (required)
131 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 The object takes the form of:
133
134{ # Request for the `CreateSnapshot` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;subscription&quot;: &quot;A String&quot;, # Required. The subscription whose backlog the snapshot retains.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140 # Specifically, the created snapshot is guaranteed to retain:
141 # (a) The existing backlog on the subscription. More precisely, this is
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 # defined as the messages in the subscription&#x27;s backlog that are
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 # unacknowledged upon the successful completion of the
144 # `CreateSnapshot` request; as well as:
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 # (b) Any messages published to the subscription&#x27;s topic following the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 # successful completion of the CreateSnapshot request.
147 # Format is `projects/{project}/subscriptions/{sub}`.
148 }
149
150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
154
155Returns:
156 An object of the form:
157
158 { # A snapshot resource. Snapshots are used in
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700159 # [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
160 # operations, which allow you to manage message acknowledgments in bulk. That
161 # is, you can set the acknowledgment state of messages in an existing
162 # subscription to the state captured by a snapshot.
163 &quot;labels&quot;: { # See [Creating and managing labels]
164 # (https://cloud.google.com/pubsub/docs/labels).
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;a_key&quot;: &quot;A String&quot;,
166 },
167 &quot;expireTime&quot;: &quot;A String&quot;, # The snapshot is guaranteed to exist up until this time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 # A newly-created snapshot expires no later than 7 days from the time of its
169 # creation. Its exact lifetime is determined at creation by the existing
170 # backlog in the source subscription. Specifically, the lifetime of the
171 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
172 # For example, consider a subscription whose oldest unacked message is 3 days
173 # old. If a snapshot is created from this subscription, the snapshot -- which
174 # will always capture this 3-day-old backlog as long as the snapshot
175 # exists -- will expire in 4 days. The service will refuse to create a
176 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700177 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700178 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 }</pre>
180</div>
181
182<div class="method">
183 <code class="details" id="delete">delete(snapshot, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700184 <pre>Removes an existing snapshot. Snapshots are used in [Seek]
185(https://cloud.google.com/pubsub/docs/replay-overview) operations, which
186allow you to manage message acknowledgments in bulk. That is, you can set
187the acknowledgment state of messages in an existing subscription to the
188state captured by a snapshot.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189When the snapshot is deleted, all messages retained in the snapshot
190are immediately dropped. After a snapshot is deleted, a new one may be
191created with the same name, but the new one has no association with the old
192snapshot or its subscription, unless the same subscription is specified.
193
194Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 snapshot: string, Required. The name of the snapshot to delete.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196Format is `projects/{project}/snapshots/{snap}`. (required)
197 x__xgafv: string, V1 error format.
198 Allowed values
199 1 - v1 error format
200 2 - v2 error format
201
202Returns:
203 An object of the form:
204
205 { # A generic empty message that you can re-use to avoid defining duplicated
206 # empty messages in your APIs. A typical example is to use it as the request
207 # or the response type of an API method. For instance:
208 #
209 # service Foo {
210 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
211 # }
212 #
213 # The JSON representation for `Empty` is empty JSON object `{}`.
214 }</pre>
215</div>
216
217<div class="method">
218 <code class="details" id="get">get(snapshot, x__xgafv=None)</code>
219 <pre>Gets the configuration details of a snapshot. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700220&lt;a href=&quot;https://cloud.google.com/pubsub/docs/replay-overview&quot;&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700221operations, which allow you to manage message acknowledgments in bulk. That
222is, you can set the acknowledgment state of messages in an existing
223subscription to the state captured by a snapshot.
224
225Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 snapshot: string, Required. The name of the snapshot to get.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227Format is `projects/{project}/snapshots/{snap}`. (required)
228 x__xgafv: string, V1 error format.
229 Allowed values
230 1 - v1 error format
231 2 - v2 error format
232
233Returns:
234 An object of the form:
235
236 { # A snapshot resource. Snapshots are used in
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700237 # [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
238 # operations, which allow you to manage message acknowledgments in bulk. That
239 # is, you can set the acknowledgment state of messages in an existing
240 # subscription to the state captured by a snapshot.
241 &quot;labels&quot;: { # See [Creating and managing labels]
242 # (https://cloud.google.com/pubsub/docs/labels).
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &quot;a_key&quot;: &quot;A String&quot;,
244 },
245 &quot;expireTime&quot;: &quot;A String&quot;, # The snapshot is guaranteed to exist up until this time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 # A newly-created snapshot expires no later than 7 days from the time of its
247 # creation. Its exact lifetime is determined at creation by the existing
248 # backlog in the source subscription. Specifically, the lifetime of the
249 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
250 # For example, consider a subscription whose oldest unacked message is 3 days
251 # old. If a snapshot is created from this subscription, the snapshot -- which
252 # will always capture this 3-day-old backlog as long as the snapshot
253 # exists -- will expire in 4 days. The service will refuse to create a
254 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700255 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700256 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 }</pre>
258</div>
259
260<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800262 <pre>Gets the access control policy for a resource.
263Returns an empty policy if the resource exists and does not have a policy
264set.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700265
266Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800267 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700268See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
270
271Valid values are 0, 1, and 3. Requests specifying an invalid value will be
272rejected.
273
274Requests for policies with any conditional bindings must specify version 3.
275Policies without any conditional bindings may specify any valid value or
276leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700277
278To learn which resources support conditions in their IAM policies, see the
279[IAM
280documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700281 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800282 Allowed values
283 1 - v1 error format
284 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700285
286Returns:
287 An object of the form:
288
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 { # An Identity and Access Management (IAM) policy, which specifies access
290 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800291 #
292 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
294 # `members` to a single `role`. Members can be user accounts, service accounts,
295 # Google groups, and domains (such as G Suite). A `role` is a named list of
296 # permissions; each `role` can be an IAM predefined role or a user-created
297 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800298 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 # For some types of Google Cloud resources, a `binding` can also specify a
300 # `condition`, which is a logical expression that allows access to a resource
301 # only if the expression evaluates to `true`. A condition can add constraints
302 # based on attributes of the request, the resource, or both. To learn which
303 # resources support conditions in their IAM policies, see the
304 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 #
306 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800307 #
308 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800310 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
312 # &quot;members&quot;: [
313 # &quot;user:mike@example.com&quot;,
314 # &quot;group:admins@example.com&quot;,
315 # &quot;domain:google.com&quot;,
316 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800317 # ]
318 # },
319 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
321 # &quot;members&quot;: [
322 # &quot;user:eve@example.com&quot;
323 # ],
324 # &quot;condition&quot;: {
325 # &quot;title&quot;: &quot;expirable access&quot;,
326 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
327 # &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 -0700328 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800329 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
332 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800333 # }
334 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 #
337 # bindings:
338 # - members:
339 # - user:mike@example.com
340 # - group:admins@example.com
341 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
343 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700344 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 # - user:eve@example.com
346 # role: roles/resourcemanager.organizationViewer
347 # condition:
348 # title: expirable access
349 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 # - etag: BwWWja0YfJA=
352 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800354 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700356 &quot;version&quot;: 42, # Specifies the format of the policy.
357 #
358 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
359 # are rejected.
360 #
361 # Any operation that affects conditional role bindings must specify version
362 # `3`. This requirement applies to the following operations:
363 #
364 # * Getting a policy that includes a conditional role binding
365 # * Adding a conditional role binding to a policy
366 # * Changing a conditional role binding in a policy
367 # * Removing any role binding, with or without a condition, from a policy
368 # that includes conditions
369 #
370 # **Important:** If you use IAM Conditions, you must include the `etag` field
371 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
372 # you to overwrite a version `3` policy with a version `1` policy, and all of
373 # the conditions in the version `3` policy are lost.
374 #
375 # If a policy does not include any conditions, operations on that policy may
376 # specify any valid version or leave the field unset.
377 #
378 # To learn which resources support conditions in their IAM policies, see the
379 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
380 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
381 # prevent simultaneous updates of a policy from overwriting each other.
382 # It is strongly suggested that systems make use of the `etag` in the
383 # read-modify-write cycle to perform policy updates in order to avoid race
384 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
385 # systems are expected to put that etag in the request to `setIamPolicy` to
386 # ensure that their change will be applied to the same version of the policy.
387 #
388 # **Important:** If you use IAM Conditions, you must include the `etag` field
389 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
390 # you to overwrite a version `3` policy with a version `1` policy, and all of
391 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 # `condition` that determines how and when the `bindings` are applied. Each
394 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700395 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
397 #
398 # If the condition evaluates to `true`, then this binding applies to the
399 # current request.
400 #
401 # If the condition evaluates to `false`, then this binding does not apply to
402 # the current request. However, a different role binding might grant the same
403 # role to one or more of the members in this binding.
404 #
405 # To learn which resources support conditions in their IAM policies, see the
406 # [IAM
407 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
408 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
409 # are documented at https://github.com/google/cel-spec.
410 #
411 # Example (Comparison):
412 #
413 # title: &quot;Summary size limit&quot;
414 # description: &quot;Determines if a summary is less than 100 chars&quot;
415 # expression: &quot;document.summary.size() &lt; 100&quot;
416 #
417 # Example (Equality):
418 #
419 # title: &quot;Requestor is owner&quot;
420 # description: &quot;Determines if requestor is the document owner&quot;
421 # expression: &quot;document.owner == request.auth.claims.email&quot;
422 #
423 # Example (Logic):
424 #
425 # title: &quot;Public documents&quot;
426 # description: &quot;Determine whether the document should be publicly visible&quot;
427 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
428 #
429 # Example (Data Manipulation):
430 #
431 # title: &quot;Notification string&quot;
432 # description: &quot;Create a notification string with a timestamp.&quot;
433 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
434 #
435 # The exact variables and functions that may be referenced within an expression
436 # are determined by the service that evaluates it. See the service
437 # documentation for additional information.
438 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
439 # reporting, e.g. a file name and a position in the file.
440 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
441 # its purpose. This can be used e.g. in UIs which allow to enter the
442 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
444 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700445 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
446 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700448 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
449 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800451 # `members` can have the following values:
452 #
453 # * `allUsers`: A special identifier that represents anyone who is
454 # on the internet; with or without a Google account.
455 #
456 # * `allAuthenticatedUsers`: A special identifier that represents anyone
457 # who is authenticated with a Google account or a service account.
458 #
459 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700460 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800461 #
462 #
463 # * `serviceAccount:{emailid}`: An email address that represents a service
464 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
465 #
466 # * `group:{emailid}`: An email address that represents a Google group.
467 # For example, `admins@example.com`.
468 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700469 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
470 # identifier) representing a user that has been recently deleted. For
471 # example, `alice@example.com?uid=123456789012345678901`. If the user is
472 # recovered, this value reverts to `user:{emailid}` and the recovered user
473 # retains the role in the binding.
474 #
475 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
476 # unique identifier) representing a service account that has been recently
477 # deleted. For example,
478 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
479 # If the service account is undeleted, this value reverts to
480 # `serviceAccount:{emailid}` and the undeleted service account retains the
481 # role in the binding.
482 #
483 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
484 # identifier) representing a Google group that has been recently
485 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
486 # the group is recovered, this value reverts to `group:{emailid}` and the
487 # recovered group retains the role in the binding.
488 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 #
490 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800491 # users of that domain. For example, `google.com` or `example.com`.
492 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700494 ],
495 },
496 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 }</pre>
498</div>
499
500<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 <code class="details" id="list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700502 <pre>Lists the existing snapshots. Snapshots are used in [Seek](
503https://cloud.google.com/pubsub/docs/replay-overview) operations, which
504allow you to manage message acknowledgments in bulk. That is, you can set
505the acknowledgment state of messages in an existing subscription to the
506state captured by a snapshot.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507
508Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700509 project: string, Required. The name of the project in which to list snapshots.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510Format is `projects/{project-id}`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 pageToken: string, The value returned by the last `ListSnapshotsResponse`; indicates that this
512is a continuation of a prior `ListSnapshots` call, and that the system
513should return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 pageSize: integer, Maximum number of snapshots to return.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 x__xgafv: string, V1 error format.
516 Allowed values
517 1 - v1 error format
518 2 - v2 error format
519
520Returns:
521 An object of the form:
522
523 { # Response for the `ListSnapshots` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more snapshot that match the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 # request; this value should be passed in a new `ListSnapshotsRequest`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 &quot;snapshots&quot;: [ # The resulting snapshots.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700527 { # A snapshot resource. Snapshots are used in
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700528 # [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
529 # operations, which allow you to manage message acknowledgments in bulk. That
530 # is, you can set the acknowledgment state of messages in an existing
531 # subscription to the state captured by a snapshot.
532 &quot;labels&quot;: { # See [Creating and managing labels]
533 # (https://cloud.google.com/pubsub/docs/labels).
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;a_key&quot;: &quot;A String&quot;,
535 },
536 &quot;expireTime&quot;: &quot;A String&quot;, # The snapshot is guaranteed to exist up until this time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 # A newly-created snapshot expires no later than 7 days from the time of its
538 # creation. Its exact lifetime is determined at creation by the existing
539 # backlog in the source subscription. Specifically, the lifetime of the
540 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
541 # For example, consider a subscription whose oldest unacked message is 3 days
542 # old. If a snapshot is created from this subscription, the snapshot -- which
543 # will always capture this 3-day-old backlog as long as the snapshot
544 # exists -- will expire in 4 days. The service will refuse to create a
545 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700546 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700547 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 },
549 ],
550 }</pre>
551</div>
552
553<div class="method">
554 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
555 <pre>Retrieves the next page of results.
556
557Args:
558 previous_request: The request for the previous page. (required)
559 previous_response: The response from the request for the previous page. (required)
560
561Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 page. Returns None if there are no more items in the collection.
564 </pre>
565</div>
566
567<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 <pre>Updates an existing snapshot. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700570&lt;a href=&quot;https://cloud.google.com/pubsub/docs/replay-overview&quot;&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571operations, which allow
572you to manage message acknowledgments in bulk. That is, you can set the
573acknowledgment state of messages in an existing subscription to the state
574captured by a snapshot.
575
576Args:
577 name: string, The name of the snapshot. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 The object takes the form of:
580
581{ # Request for the UpdateSnapshot method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 &quot;snapshot&quot;: { # A snapshot resource. Snapshots are used in # Required. The updated snapshot object.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700583 # [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
584 # operations, which allow you to manage message acknowledgments in bulk. That
585 # is, you can set the acknowledgment state of messages in an existing
586 # subscription to the state captured by a snapshot.
587 &quot;labels&quot;: { # See [Creating and managing labels]
588 # (https://cloud.google.com/pubsub/docs/labels).
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 &quot;a_key&quot;: &quot;A String&quot;,
590 },
591 &quot;expireTime&quot;: &quot;A String&quot;, # The snapshot is guaranteed to exist up until this time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 # A newly-created snapshot expires no later than 7 days from the time of its
593 # creation. Its exact lifetime is determined at creation by the existing
594 # backlog in the source subscription. Specifically, the lifetime of the
595 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
596 # For example, consider a subscription whose oldest unacked message is 3 days
597 # old. If a snapshot is created from this subscription, the snapshot -- which
598 # will always capture this 3-day-old backlog as long as the snapshot
599 # exists -- will expire in 4 days. The service will refuse to create a
600 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700601 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700602 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &quot;updateMask&quot;: &quot;A String&quot;, # Required. Indicates which fields in the provided snapshot to update.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605 # Must be specified and non-empty.
606 }
607
608 x__xgafv: string, V1 error format.
609 Allowed values
610 1 - v1 error format
611 2 - v2 error format
612
613Returns:
614 An object of the form:
615
616 { # A snapshot resource. Snapshots are used in
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700617 # [Seek](https://cloud.google.com/pubsub/docs/replay-overview)
618 # operations, which allow you to manage message acknowledgments in bulk. That
619 # is, you can set the acknowledgment state of messages in an existing
620 # subscription to the state captured by a snapshot.
621 &quot;labels&quot;: { # See [Creating and managing labels]
622 # (https://cloud.google.com/pubsub/docs/labels).
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 &quot;a_key&quot;: &quot;A String&quot;,
624 },
625 &quot;expireTime&quot;: &quot;A String&quot;, # The snapshot is guaranteed to exist up until this time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 # A newly-created snapshot expires no later than 7 days from the time of its
627 # creation. Its exact lifetime is determined at creation by the existing
628 # backlog in the source subscription. Specifically, the lifetime of the
629 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
630 # For example, consider a subscription whose oldest unacked message is 3 days
631 # old. If a snapshot is created from this subscription, the snapshot -- which
632 # will always capture this 3-day-old backlog as long as the snapshot
633 # exists -- will expire in 4 days. The service will refuse to create a
634 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700635 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700636 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700637 }</pre>
638</div>
639
640<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800642 <pre>Sets the access control policy on the specified resource. Replaces any
643existing policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700644
Bu Sun Kim65020912020-05-20 12:08:20 -0700645Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700646
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700647Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800648 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700649See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700651 The object takes the form of:
652
653{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 &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 -0800655 # the policy is limited to a few 10s of KB. An empty policy is a
656 # valid policy but certain Cloud Platform services (such as Projects)
657 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800659 #
660 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700661 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
662 # `members` to a single `role`. Members can be user accounts, service accounts,
663 # Google groups, and domains (such as G Suite). A `role` is a named list of
664 # permissions; each `role` can be an IAM predefined role or a user-created
665 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800666 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 # For some types of Google Cloud resources, a `binding` can also specify a
668 # `condition`, which is a logical expression that allows access to a resource
669 # only if the expression evaluates to `true`. A condition can add constraints
670 # based on attributes of the request, the resource, or both. To learn which
671 # resources support conditions in their IAM policies, see the
672 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700673 #
674 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800675 #
676 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800678 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
680 # &quot;members&quot;: [
681 # &quot;user:mike@example.com&quot;,
682 # &quot;group:admins@example.com&quot;,
683 # &quot;domain:google.com&quot;,
684 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800685 # ]
686 # },
687 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
689 # &quot;members&quot;: [
690 # &quot;user:eve@example.com&quot;
691 # ],
692 # &quot;condition&quot;: {
693 # &quot;title&quot;: &quot;expirable access&quot;,
694 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
695 # &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 -0700696 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800697 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700698 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
700 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800701 # }
702 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 #
705 # bindings:
706 # - members:
707 # - user:mike@example.com
708 # - group:admins@example.com
709 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700710 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
711 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700712 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700713 # - user:eve@example.com
714 # role: roles/resourcemanager.organizationViewer
715 # condition:
716 # title: expirable access
717 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 # - etag: BwWWja0YfJA=
720 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800722 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700724 &quot;version&quot;: 42, # Specifies the format of the policy.
725 #
726 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
727 # are rejected.
728 #
729 # Any operation that affects conditional role bindings must specify version
730 # `3`. This requirement applies to the following operations:
731 #
732 # * Getting a policy that includes a conditional role binding
733 # * Adding a conditional role binding to a policy
734 # * Changing a conditional role binding in a policy
735 # * Removing any role binding, with or without a condition, from a policy
736 # that includes conditions
737 #
738 # **Important:** If you use IAM Conditions, you must include the `etag` field
739 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
740 # you to overwrite a version `3` policy with a version `1` policy, and all of
741 # the conditions in the version `3` policy are lost.
742 #
743 # If a policy does not include any conditions, operations on that policy may
744 # specify any valid version or leave the field unset.
745 #
746 # To learn which resources support conditions in their IAM policies, see the
747 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
748 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
749 # prevent simultaneous updates of a policy from overwriting each other.
750 # It is strongly suggested that systems make use of the `etag` in the
751 # read-modify-write cycle to perform policy updates in order to avoid race
752 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
753 # systems are expected to put that etag in the request to `setIamPolicy` to
754 # ensure that their change will be applied to the same version of the policy.
755 #
756 # **Important:** If you use IAM Conditions, you must include the `etag` field
757 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
758 # you to overwrite a version `3` policy with a version `1` policy, and all of
759 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700760 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # `condition` that determines how and when the `bindings` are applied. Each
762 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700763 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
765 #
766 # If the condition evaluates to `true`, then this binding applies to the
767 # current request.
768 #
769 # If the condition evaluates to `false`, then this binding does not apply to
770 # the current request. However, a different role binding might grant the same
771 # role to one or more of the members in this binding.
772 #
773 # To learn which resources support conditions in their IAM policies, see the
774 # [IAM
775 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
776 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
777 # are documented at https://github.com/google/cel-spec.
778 #
779 # Example (Comparison):
780 #
781 # title: &quot;Summary size limit&quot;
782 # description: &quot;Determines if a summary is less than 100 chars&quot;
783 # expression: &quot;document.summary.size() &lt; 100&quot;
784 #
785 # Example (Equality):
786 #
787 # title: &quot;Requestor is owner&quot;
788 # description: &quot;Determines if requestor is the document owner&quot;
789 # expression: &quot;document.owner == request.auth.claims.email&quot;
790 #
791 # Example (Logic):
792 #
793 # title: &quot;Public documents&quot;
794 # description: &quot;Determine whether the document should be publicly visible&quot;
795 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
796 #
797 # Example (Data Manipulation):
798 #
799 # title: &quot;Notification string&quot;
800 # description: &quot;Create a notification string with a timestamp.&quot;
801 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
802 #
803 # The exact variables and functions that may be referenced within an expression
804 # are determined by the service that evaluates it. See the service
805 # documentation for additional information.
806 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
807 # reporting, e.g. a file name and a position in the file.
808 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
809 # its purpose. This can be used e.g. in UIs which allow to enter the
810 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
812 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700813 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
814 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700815 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700816 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
817 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800819 # `members` can have the following values:
820 #
821 # * `allUsers`: A special identifier that represents anyone who is
822 # on the internet; with or without a Google account.
823 #
824 # * `allAuthenticatedUsers`: A special identifier that represents anyone
825 # who is authenticated with a Google account or a service account.
826 #
827 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700828 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800829 #
830 #
831 # * `serviceAccount:{emailid}`: An email address that represents a service
832 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
833 #
834 # * `group:{emailid}`: An email address that represents a Google group.
835 # For example, `admins@example.com`.
836 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
838 # identifier) representing a user that has been recently deleted. For
839 # example, `alice@example.com?uid=123456789012345678901`. If the user is
840 # recovered, this value reverts to `user:{emailid}` and the recovered user
841 # retains the role in the binding.
842 #
843 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
844 # unique identifier) representing a service account that has been recently
845 # deleted. For example,
846 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
847 # If the service account is undeleted, this value reverts to
848 # `serviceAccount:{emailid}` and the undeleted service account retains the
849 # role in the binding.
850 #
851 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
852 # identifier) representing a Google group that has been recently
853 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
854 # the group is recovered, this value reverts to `group:{emailid}` and the
855 # recovered group retains the role in the binding.
856 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 #
858 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800859 # users of that domain. For example, `google.com` or `example.com`.
860 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700861 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700862 ],
863 },
864 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700865 },
866 }
867
868 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800869 Allowed values
870 1 - v1 error format
871 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700872
873Returns:
874 An object of the form:
875
Dan O'Mearadd494642020-05-01 07:42:23 -0700876 { # An Identity and Access Management (IAM) policy, which specifies access
877 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800878 #
879 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
881 # `members` to a single `role`. Members can be user accounts, service accounts,
882 # Google groups, and domains (such as G Suite). A `role` is a named list of
883 # permissions; each `role` can be an IAM predefined role or a user-created
884 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800885 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 # For some types of Google Cloud resources, a `binding` can also specify a
887 # `condition`, which is a logical expression that allows access to a resource
888 # only if the expression evaluates to `true`. A condition can add constraints
889 # based on attributes of the request, the resource, or both. To learn which
890 # resources support conditions in their IAM policies, see the
891 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700892 #
893 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800894 #
895 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800897 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
899 # &quot;members&quot;: [
900 # &quot;user:mike@example.com&quot;,
901 # &quot;group:admins@example.com&quot;,
902 # &quot;domain:google.com&quot;,
903 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800904 # ]
905 # },
906 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
908 # &quot;members&quot;: [
909 # &quot;user:eve@example.com&quot;
910 # ],
911 # &quot;condition&quot;: {
912 # &quot;title&quot;: &quot;expirable access&quot;,
913 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
914 # &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 -0700915 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800916 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700917 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
919 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800920 # }
921 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700922 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 #
924 # bindings:
925 # - members:
926 # - user:mike@example.com
927 # - group:admins@example.com
928 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
930 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700932 # - user:eve@example.com
933 # role: roles/resourcemanager.organizationViewer
934 # condition:
935 # title: expirable access
936 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 # - etag: BwWWja0YfJA=
939 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800941 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700943 &quot;version&quot;: 42, # Specifies the format of the policy.
944 #
945 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
946 # are rejected.
947 #
948 # Any operation that affects conditional role bindings must specify version
949 # `3`. This requirement applies to the following operations:
950 #
951 # * Getting a policy that includes a conditional role binding
952 # * Adding a conditional role binding to a policy
953 # * Changing a conditional role binding in a policy
954 # * Removing any role binding, with or without a condition, from a policy
955 # that includes conditions
956 #
957 # **Important:** If you use IAM Conditions, you must include the `etag` field
958 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
959 # you to overwrite a version `3` policy with a version `1` policy, and all of
960 # the conditions in the version `3` policy are lost.
961 #
962 # If a policy does not include any conditions, operations on that policy may
963 # specify any valid version or leave the field unset.
964 #
965 # To learn which resources support conditions in their IAM policies, see the
966 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
967 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
968 # prevent simultaneous updates of a policy from overwriting each other.
969 # It is strongly suggested that systems make use of the `etag` in the
970 # read-modify-write cycle to perform policy updates in order to avoid race
971 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
972 # systems are expected to put that etag in the request to `setIamPolicy` to
973 # ensure that their change will be applied to the same version of the policy.
974 #
975 # **Important:** If you use IAM Conditions, you must include the `etag` field
976 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
977 # you to overwrite a version `3` policy with a version `1` policy, and all of
978 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 # `condition` that determines how and when the `bindings` are applied. Each
981 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700982 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
984 #
985 # If the condition evaluates to `true`, then this binding applies to the
986 # current request.
987 #
988 # If the condition evaluates to `false`, then this binding does not apply to
989 # the current request. However, a different role binding might grant the same
990 # role to one or more of the members in this binding.
991 #
992 # To learn which resources support conditions in their IAM policies, see the
993 # [IAM
994 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
995 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
996 # are documented at https://github.com/google/cel-spec.
997 #
998 # Example (Comparison):
999 #
1000 # title: &quot;Summary size limit&quot;
1001 # description: &quot;Determines if a summary is less than 100 chars&quot;
1002 # expression: &quot;document.summary.size() &lt; 100&quot;
1003 #
1004 # Example (Equality):
1005 #
1006 # title: &quot;Requestor is owner&quot;
1007 # description: &quot;Determines if requestor is the document owner&quot;
1008 # expression: &quot;document.owner == request.auth.claims.email&quot;
1009 #
1010 # Example (Logic):
1011 #
1012 # title: &quot;Public documents&quot;
1013 # description: &quot;Determine whether the document should be publicly visible&quot;
1014 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1015 #
1016 # Example (Data Manipulation):
1017 #
1018 # title: &quot;Notification string&quot;
1019 # description: &quot;Create a notification string with a timestamp.&quot;
1020 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1021 #
1022 # The exact variables and functions that may be referenced within an expression
1023 # are determined by the service that evaluates it. See the service
1024 # documentation for additional information.
1025 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1026 # reporting, e.g. a file name and a position in the file.
1027 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1028 # its purpose. This can be used e.g. in UIs which allow to enter the
1029 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001030 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1031 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001032 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1033 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001035 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1036 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001037 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001038 # `members` can have the following values:
1039 #
1040 # * `allUsers`: A special identifier that represents anyone who is
1041 # on the internet; with or without a Google account.
1042 #
1043 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1044 # who is authenticated with a Google account or a service account.
1045 #
1046 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001047 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001048 #
1049 #
1050 # * `serviceAccount:{emailid}`: An email address that represents a service
1051 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1052 #
1053 # * `group:{emailid}`: An email address that represents a Google group.
1054 # For example, `admins@example.com`.
1055 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001056 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1057 # identifier) representing a user that has been recently deleted. For
1058 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1059 # recovered, this value reverts to `user:{emailid}` and the recovered user
1060 # retains the role in the binding.
1061 #
1062 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1063 # unique identifier) representing a service account that has been recently
1064 # deleted. For example,
1065 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1066 # If the service account is undeleted, this value reverts to
1067 # `serviceAccount:{emailid}` and the undeleted service account retains the
1068 # role in the binding.
1069 #
1070 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1071 # identifier) representing a Google group that has been recently
1072 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1073 # the group is recovered, this value reverts to `group:{emailid}` and the
1074 # recovered group retains the role in the binding.
1075 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001076 #
1077 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001078 # users of that domain. For example, `google.com` or `example.com`.
1079 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001081 ],
1082 },
1083 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001084 }</pre>
1085</div>
1086
1087<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001089 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001090If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07001091permissions, not a `NOT_FOUND` error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001092
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001093Note: This operation is designed to be used for building permission-aware
1094UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07001095may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001096
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001097Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001098 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001099See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001100 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001101 The object takes the form of:
1102
1103{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001104 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1105 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001106 # information see
1107 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001108 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001109 ],
1110 }
1111
1112 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001113 Allowed values
1114 1 - v1 error format
1115 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001116
1117Returns:
1118 An object of the form:
1119
1120 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001121 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001122 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001123 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001124 ],
1125 }</pre>
1126</div>
1127
1128</body></html>