blob: 0441663fa38ce5da32d1d5a36ab86cd3d5dfa2b8 [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>
82<p class="firstline">Removes an existing snapshot. Snapshots are used in</p>
83<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 Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Lists the existing snapshots. Snapshots are used in</p>
92<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 Kim65020912020-05-20 12:08:20 -0700108&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 -0700109operations, which allow
110you to manage message acknowledgments in bulk. That is, you can set the
111acknowledgment state of messages in an existing subscription to the state
112captured by a snapshot.
Dan O'Mearadd494642020-05-01 07:42:23 -0700113&lt;br&gt;&lt;br&gt;If the snapshot already exists, returns `ALREADY_EXISTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114If the requested subscription doesn&#x27;t exist, returns `NOT_FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115If the backlog in the subscription is too old -- and the resulting snapshot
116would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
117See also the `Snapshot.expire_time` field. If the name is not provided in
118the request, the server will assign a random
119name for this snapshot on the same project as the subscription, conforming
120to the
121[resource name
122format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
123generated name is populated in the returned Snapshot object. Note that for
124REST API requests, you must specify a name in the request.
125
126Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 name: string, Required. User-provided name for this snapshot. If the name is not provided in the
128request, the server will assign a random name for this snapshot on the same
129project as the subscription. Note that for REST API requests, you must
130specify a name. See the &lt;a
Bu Sun Kim65020912020-05-20 12:08:20 -0700131href=&quot;https://cloud.google.com/pubsub/docs/admin#resource_names&quot;&gt; resource
Dan O'Mearadd494642020-05-01 07:42:23 -0700132name rules&lt;/a&gt;. Format is `projects/{project}/snapshots/{snap}`. (required)
133 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 The object takes the form of:
135
136{ # Request for the `CreateSnapshot` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &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 -0700138 # managing labels&lt;/a&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 &quot;subscription&quot;: &quot;A String&quot;, # Required. The subscription whose backlog the snapshot retains.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 # Specifically, the created snapshot is guaranteed to retain:
143 # (a) The existing backlog on the subscription. More precisely, this is
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 # defined as the messages in the subscription&#x27;s backlog that are
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 # unacknowledged upon the successful completion of the
146 # `CreateSnapshot` request; as well as:
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 # (b) Any messages published to the subscription&#x27;s topic following the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 # successful completion of the CreateSnapshot request.
149 # Format is `projects/{project}/subscriptions/{sub}`.
150 }
151
152 x__xgafv: string, V1 error format.
153 Allowed values
154 1 - v1 error format
155 2 - v2 error format
156
157Returns:
158 An object of the form:
159
160 { # A snapshot resource. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 # &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 -0700162 # operations, which allow
163 # you to manage message acknowledgments in bulk. That is, you can set the
164 # acknowledgment state of messages in an existing subscription to the state
165 # captured by a snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
167 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
168 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
169 # managing labels&lt;/a&gt;.
170 &quot;a_key&quot;: &quot;A String&quot;,
171 },
172 &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 -0700173 # A newly-created snapshot expires no later than 7 days from the time of its
174 # creation. Its exact lifetime is determined at creation by the existing
175 # backlog in the source subscription. Specifically, the lifetime of the
176 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
177 # For example, consider a subscription whose oldest unacked message is 3 days
178 # old. If a snapshot is created from this subscription, the snapshot -- which
179 # will always capture this 3-day-old backlog as long as the snapshot
180 # exists -- will expire in 4 days. The service will refuse to create a
181 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 }</pre>
183</div>
184
185<div class="method">
186 <code class="details" id="delete">delete(snapshot, x__xgafv=None)</code>
187 <pre>Removes an existing snapshot. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700188&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 -0700189operations, which allow
190you to manage message acknowledgments in bulk. That is, you can set the
191acknowledgment state of messages in an existing subscription to the state
Dan O'Mearadd494642020-05-01 07:42:23 -0700192captured by a snapshot.&lt;br&gt;&lt;br&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193When the snapshot is deleted, all messages retained in the snapshot
194are immediately dropped. After a snapshot is deleted, a new one may be
195created with the same name, but the new one has no association with the old
196snapshot or its subscription, unless the same subscription is specified.
197
198Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 snapshot: string, Required. The name of the snapshot to delete.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200Format is `projects/{project}/snapshots/{snap}`. (required)
201 x__xgafv: string, V1 error format.
202 Allowed values
203 1 - v1 error format
204 2 - v2 error format
205
206Returns:
207 An object of the form:
208
209 { # A generic empty message that you can re-use to avoid defining duplicated
210 # empty messages in your APIs. A typical example is to use it as the request
211 # or the response type of an API method. For instance:
212 #
213 # service Foo {
214 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
215 # }
216 #
217 # The JSON representation for `Empty` is empty JSON object `{}`.
218 }</pre>
219</div>
220
221<div class="method">
222 <code class="details" id="get">get(snapshot, x__xgafv=None)</code>
223 <pre>Gets the configuration details of a snapshot. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700224&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 -0700225operations, which allow you to manage message acknowledgments in bulk. That
226is, you can set the acknowledgment state of messages in an existing
227subscription to the state captured by a snapshot.
228
229Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 snapshot: string, Required. The name of the snapshot to get.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231Format is `projects/{project}/snapshots/{snap}`. (required)
232 x__xgafv: string, V1 error format.
233 Allowed values
234 1 - v1 error format
235 2 - v2 error format
236
237Returns:
238 An object of the form:
239
240 { # A snapshot resource. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 # &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 -0700242 # operations, which allow
243 # you to manage message acknowledgments in bulk. That is, you can set the
244 # acknowledgment state of messages in an existing subscription to the state
245 # captured by a snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
247 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
248 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
249 # managing labels&lt;/a&gt;.
250 &quot;a_key&quot;: &quot;A String&quot;,
251 },
252 &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 -0700253 # A newly-created snapshot expires no later than 7 days from the time of its
254 # creation. Its exact lifetime is determined at creation by the existing
255 # backlog in the source subscription. Specifically, the lifetime of the
256 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
257 # For example, consider a subscription whose oldest unacked message is 3 days
258 # old. If a snapshot is created from this subscription, the snapshot -- which
259 # will always capture this 3-day-old backlog as long as the snapshot
260 # exists -- will expire in 4 days. The service will refuse to create a
261 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700262 }</pre>
263</div>
264
265<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800267 <pre>Gets the access control policy for a resource.
268Returns an empty policy if the resource exists and does not have a policy
269set.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700270
271Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800272 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700273See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
275
276Valid values are 0, 1, and 3. Requests specifying an invalid value will be
277rejected.
278
279Requests for policies with any conditional bindings must specify version 3.
280Policies without any conditional bindings may specify any valid value or
281leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282
283To learn which resources support conditions in their IAM policies, see the
284[IAM
285documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700286 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800287 Allowed values
288 1 - v1 error format
289 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700290
291Returns:
292 An object of the form:
293
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 { # An Identity and Access Management (IAM) policy, which specifies access
295 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800296 #
297 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
299 # `members` to a single `role`. Members can be user accounts, service accounts,
300 # Google groups, and domains (such as G Suite). A `role` is a named list of
301 # permissions; each `role` can be an IAM predefined role or a user-created
302 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800303 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 # For some types of Google Cloud resources, a `binding` can also specify a
305 # `condition`, which is a logical expression that allows access to a resource
306 # only if the expression evaluates to `true`. A condition can add constraints
307 # based on attributes of the request, the resource, or both. To learn which
308 # resources support conditions in their IAM policies, see the
309 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 #
311 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800312 #
313 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800315 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
317 # &quot;members&quot;: [
318 # &quot;user:mike@example.com&quot;,
319 # &quot;group:admins@example.com&quot;,
320 # &quot;domain:google.com&quot;,
321 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800322 # ]
323 # },
324 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
326 # &quot;members&quot;: [
327 # &quot;user:eve@example.com&quot;
328 # ],
329 # &quot;condition&quot;: {
330 # &quot;title&quot;: &quot;expirable access&quot;,
331 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
332 # &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 -0700333 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800334 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
337 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800338 # }
339 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 #
342 # bindings:
343 # - members:
344 # - user:mike@example.com
345 # - group:admins@example.com
346 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
348 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700350 # - user:eve@example.com
351 # role: roles/resourcemanager.organizationViewer
352 # condition:
353 # title: expirable access
354 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # - etag: BwWWja0YfJA=
357 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800359 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
362 # prevent simultaneous updates of a policy from overwriting each other.
363 # It is strongly suggested that systems make use of the `etag` in the
364 # read-modify-write cycle to perform policy updates in order to avoid race
365 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
366 # systems are expected to put that etag in the request to `setIamPolicy` to
367 # ensure that their change will be applied to the same version of the policy.
368 #
369 # **Important:** If you use IAM Conditions, you must include the `etag` field
370 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
371 # you to overwrite a version `3` policy with a version `1` policy, and all of
372 # the conditions in the version `3` policy are lost.
373 &quot;version&quot;: 42, # Specifies the format of the policy.
374 #
375 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
376 # are rejected.
377 #
378 # Any operation that affects conditional role bindings must specify version
379 # `3`. This requirement applies to the following operations:
380 #
381 # * Getting a policy that includes a conditional role binding
382 # * Adding a conditional role binding to a policy
383 # * Changing a conditional role binding in a policy
384 # * Removing any role binding, with or without a condition, from a policy
385 # that includes conditions
386 #
387 # **Important:** If you use IAM Conditions, you must include the `etag` field
388 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
389 # you to overwrite a version `3` policy with a version `1` policy, and all of
390 # the conditions in the version `3` policy are lost.
391 #
392 # If a policy does not include any conditions, operations on that policy may
393 # specify any valid version or leave the field unset.
394 #
395 # To learn which resources support conditions in their IAM policies, see the
396 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
397 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 # `condition` that determines how and when the `bindings` are applied. Each
399 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700400 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
402 #
403 # If the condition evaluates to `true`, then this binding applies to the
404 # current request.
405 #
406 # If the condition evaluates to `false`, then this binding does not apply to
407 # the current request. However, a different role binding might grant the same
408 # role to one or more of the members in this binding.
409 #
410 # To learn which resources support conditions in their IAM policies, see the
411 # [IAM
412 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
413 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
414 # are documented at https://github.com/google/cel-spec.
415 #
416 # Example (Comparison):
417 #
418 # title: &quot;Summary size limit&quot;
419 # description: &quot;Determines if a summary is less than 100 chars&quot;
420 # expression: &quot;document.summary.size() &lt; 100&quot;
421 #
422 # Example (Equality):
423 #
424 # title: &quot;Requestor is owner&quot;
425 # description: &quot;Determines if requestor is the document owner&quot;
426 # expression: &quot;document.owner == request.auth.claims.email&quot;
427 #
428 # Example (Logic):
429 #
430 # title: &quot;Public documents&quot;
431 # description: &quot;Determine whether the document should be publicly visible&quot;
432 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
433 #
434 # Example (Data Manipulation):
435 #
436 # title: &quot;Notification string&quot;
437 # description: &quot;Create a notification string with a timestamp.&quot;
438 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
439 #
440 # The exact variables and functions that may be referenced within an expression
441 # are determined by the service that evaluates it. See the service
442 # documentation for additional information.
443 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
444 # reporting, e.g. a file name and a position in the file.
445 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
446 # its purpose. This can be used e.g. in UIs which allow to enter the
447 # expression.
448 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
449 # describes the expression, e.g. when hovered over it in a UI.
450 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
451 # syntax.
452 },
453 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800454 # `members` can have the following values:
455 #
456 # * `allUsers`: A special identifier that represents anyone who is
457 # on the internet; with or without a Google account.
458 #
459 # * `allAuthenticatedUsers`: A special identifier that represents anyone
460 # who is authenticated with a Google account or a service account.
461 #
462 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700463 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800464 #
465 #
466 # * `serviceAccount:{emailid}`: An email address that represents a service
467 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
468 #
469 # * `group:{emailid}`: An email address that represents a Google group.
470 # For example, `admins@example.com`.
471 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700472 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
473 # identifier) representing a user that has been recently deleted. For
474 # example, `alice@example.com?uid=123456789012345678901`. If the user is
475 # recovered, this value reverts to `user:{emailid}` and the recovered user
476 # retains the role in the binding.
477 #
478 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
479 # unique identifier) representing a service account that has been recently
480 # deleted. For example,
481 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
482 # If the service account is undeleted, this value reverts to
483 # `serviceAccount:{emailid}` and the undeleted service account retains the
484 # role in the binding.
485 #
486 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
487 # identifier) representing a Google group that has been recently
488 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
489 # the group is recovered, this value reverts to `group:{emailid}` and the
490 # recovered group retains the role in the binding.
491 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700492 #
493 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800494 # users of that domain. For example, `google.com` or `example.com`.
495 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700497 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700498 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
499 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700500 },
501 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 }</pre>
503</div>
504
505<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700506 <code class="details" id="list">list(project, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 <pre>Lists the existing snapshots. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700508&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 -0700509operations, which allow
510you to manage message acknowledgments in bulk. That is, you can set the
511acknowledgment state of messages in an existing subscription to the state
512captured by a snapshot.
513
514Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700515 project: string, Required. The name of the project in which to list snapshots.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516Format is `projects/{project-id}`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 pageToken: string, The value returned by the last `ListSnapshotsResponse`; indicates that this
518is a continuation of a prior `ListSnapshots` call, and that the system
519should return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 pageSize: integer, Maximum number of snapshots to return.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700521 x__xgafv: string, V1 error format.
522 Allowed values
523 1 - v1 error format
524 2 - v2 error format
525
526Returns:
527 An object of the form:
528
529 { # Response for the `ListSnapshots` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &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 -0700531 # request; this value should be passed in a new `ListSnapshotsRequest`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;snapshots&quot;: [ # The resulting snapshots.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 { # A snapshot resource. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 # &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 -0700535 # operations, which allow
536 # you to manage message acknowledgments in bulk. That is, you can set the
537 # acknowledgment state of messages in an existing subscription to the state
538 # captured by a snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
540 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
541 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
542 # managing labels&lt;/a&gt;.
543 &quot;a_key&quot;: &quot;A String&quot;,
544 },
545 &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 -0700546 # A newly-created snapshot expires no later than 7 days from the time of its
547 # creation. Its exact lifetime is determined at creation by the existing
548 # backlog in the source subscription. Specifically, the lifetime of the
549 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
550 # For example, consider a subscription whose oldest unacked message is 3 days
551 # old. If a snapshot is created from this subscription, the snapshot -- which
552 # will always capture this 3-day-old backlog as long as the snapshot
553 # exists -- will expire in 4 days. The service will refuse to create a
554 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 },
556 ],
557 }</pre>
558</div>
559
560<div class="method">
561 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
562 <pre>Retrieves the next page of results.
563
564Args:
565 previous_request: The request for the previous page. (required)
566 previous_response: The response from the request for the previous page. (required)
567
568Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700569 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 page. Returns None if there are no more items in the collection.
571 </pre>
572</div>
573
574<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 <pre>Updates an existing snapshot. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700577&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 -0700578operations, which allow
579you to manage message acknowledgments in bulk. That is, you can set the
580acknowledgment state of messages in an existing subscription to the state
581captured by a snapshot.
582
583Args:
584 name: string, The name of the snapshot. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700585 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 The object takes the form of:
587
588{ # Request for the UpdateSnapshot method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 &quot;snapshot&quot;: { # A snapshot resource. Snapshots are used in # Required. The updated snapshot object.
590 # &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 -0700591 # operations, which allow
592 # you to manage message acknowledgments in bulk. That is, you can set the
593 # acknowledgment state of messages in an existing subscription to the state
594 # captured by a snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
596 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
597 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
598 # managing labels&lt;/a&gt;.
599 &quot;a_key&quot;: &quot;A String&quot;,
600 },
601 &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 -0700602 # A newly-created snapshot expires no later than 7 days from the time of its
603 # creation. Its exact lifetime is determined at creation by the existing
604 # backlog in the source subscription. Specifically, the lifetime of the
605 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
606 # For example, consider a subscription whose oldest unacked message is 3 days
607 # old. If a snapshot is created from this subscription, the snapshot -- which
608 # will always capture this 3-day-old backlog as long as the snapshot
609 # exists -- will expire in 4 days. The service will refuse to create a
610 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 &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 -0700613 # Must be specified and non-empty.
614 }
615
616 x__xgafv: string, V1 error format.
617 Allowed values
618 1 - v1 error format
619 2 - v2 error format
620
621Returns:
622 An object of the form:
623
624 { # A snapshot resource. Snapshots are used in
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 # &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 -0700626 # operations, which allow
627 # you to manage message acknowledgments in bulk. That is, you can set the
628 # acknowledgment state of messages in an existing subscription to the state
629 # captured by a snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
631 &quot;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
632 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
633 # managing labels&lt;/a&gt;.
634 &quot;a_key&quot;: &quot;A String&quot;,
635 },
636 &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 -0700637 # A newly-created snapshot expires no later than 7 days from the time of its
638 # creation. Its exact lifetime is determined at creation by the existing
639 # backlog in the source subscription. Specifically, the lifetime of the
640 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
641 # For example, consider a subscription whose oldest unacked message is 3 days
642 # old. If a snapshot is created from this subscription, the snapshot -- which
643 # will always capture this 3-day-old backlog as long as the snapshot
644 # exists -- will expire in 4 days. The service will refuse to create a
645 # snapshot that would expire in less than 1 hour after creation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700646 }</pre>
647</div>
648
649<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800651 <pre>Sets the access control policy on the specified resource. Replaces any
652existing policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700653
Bu Sun Kim65020912020-05-20 12:08:20 -0700654Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700655
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700656Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800657 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700658See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700659 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700660 The object takes the form of:
661
662{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &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 -0800664 # the policy is limited to a few 10s of KB. An empty policy is a
665 # valid policy but certain Cloud Platform services (such as Projects)
666 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800668 #
669 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
671 # `members` to a single `role`. Members can be user accounts, service accounts,
672 # Google groups, and domains (such as G Suite). A `role` is a named list of
673 # permissions; each `role` can be an IAM predefined role or a user-created
674 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800675 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 # For some types of Google Cloud resources, a `binding` can also specify a
677 # `condition`, which is a logical expression that allows access to a resource
678 # only if the expression evaluates to `true`. A condition can add constraints
679 # based on attributes of the request, the resource, or both. To learn which
680 # resources support conditions in their IAM policies, see the
681 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700682 #
683 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800684 #
685 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800687 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
689 # &quot;members&quot;: [
690 # &quot;user:mike@example.com&quot;,
691 # &quot;group:admins@example.com&quot;,
692 # &quot;domain:google.com&quot;,
693 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800694 # ]
695 # },
696 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700697 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
698 # &quot;members&quot;: [
699 # &quot;user:eve@example.com&quot;
700 # ],
701 # &quot;condition&quot;: {
702 # &quot;title&quot;: &quot;expirable access&quot;,
703 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
704 # &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 -0700705 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800706 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700707 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
709 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800710 # }
711 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700712 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 #
714 # bindings:
715 # - members:
716 # - user:mike@example.com
717 # - group:admins@example.com
718 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
720 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700722 # - user:eve@example.com
723 # role: roles/resourcemanager.organizationViewer
724 # condition:
725 # title: expirable access
726 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700728 # - etag: BwWWja0YfJA=
729 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800731 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
734 # prevent simultaneous updates of a policy from overwriting each other.
735 # It is strongly suggested that systems make use of the `etag` in the
736 # read-modify-write cycle to perform policy updates in order to avoid race
737 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
738 # systems are expected to put that etag in the request to `setIamPolicy` to
739 # ensure that their change will be applied to the same version of the policy.
740 #
741 # **Important:** If you use IAM Conditions, you must include the `etag` field
742 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
743 # you to overwrite a version `3` policy with a version `1` policy, and all of
744 # the conditions in the version `3` policy are lost.
745 &quot;version&quot;: 42, # Specifies the format of the policy.
746 #
747 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
748 # are rejected.
749 #
750 # Any operation that affects conditional role bindings must specify version
751 # `3`. This requirement applies to the following operations:
752 #
753 # * Getting a policy that includes a conditional role binding
754 # * Adding a conditional role binding to a policy
755 # * Changing a conditional role binding in a policy
756 # * Removing any role binding, with or without a condition, from a policy
757 # that includes conditions
758 #
759 # **Important:** If you use IAM Conditions, you must include the `etag` field
760 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
761 # you to overwrite a version `3` policy with a version `1` policy, and all of
762 # the conditions in the version `3` policy are lost.
763 #
764 # If a policy does not include any conditions, operations on that policy may
765 # specify any valid version or leave the field unset.
766 #
767 # To learn which resources support conditions in their IAM policies, see the
768 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
769 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700770 # `condition` that determines how and when the `bindings` are applied. Each
771 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700772 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
774 #
775 # If the condition evaluates to `true`, then this binding applies to the
776 # current request.
777 #
778 # If the condition evaluates to `false`, then this binding does not apply to
779 # the current request. However, a different role binding might grant the same
780 # role to one or more of the members in this binding.
781 #
782 # To learn which resources support conditions in their IAM policies, see the
783 # [IAM
784 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
785 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
786 # are documented at https://github.com/google/cel-spec.
787 #
788 # Example (Comparison):
789 #
790 # title: &quot;Summary size limit&quot;
791 # description: &quot;Determines if a summary is less than 100 chars&quot;
792 # expression: &quot;document.summary.size() &lt; 100&quot;
793 #
794 # Example (Equality):
795 #
796 # title: &quot;Requestor is owner&quot;
797 # description: &quot;Determines if requestor is the document owner&quot;
798 # expression: &quot;document.owner == request.auth.claims.email&quot;
799 #
800 # Example (Logic):
801 #
802 # title: &quot;Public documents&quot;
803 # description: &quot;Determine whether the document should be publicly visible&quot;
804 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
805 #
806 # Example (Data Manipulation):
807 #
808 # title: &quot;Notification string&quot;
809 # description: &quot;Create a notification string with a timestamp.&quot;
810 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
811 #
812 # The exact variables and functions that may be referenced within an expression
813 # are determined by the service that evaluates it. See the service
814 # documentation for additional information.
815 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
816 # reporting, e.g. a file name and a position in the file.
817 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
818 # its purpose. This can be used e.g. in UIs which allow to enter the
819 # expression.
820 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
821 # describes the expression, e.g. when hovered over it in a UI.
822 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
823 # syntax.
824 },
825 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800826 # `members` can have the following values:
827 #
828 # * `allUsers`: A special identifier that represents anyone who is
829 # on the internet; with or without a Google account.
830 #
831 # * `allAuthenticatedUsers`: A special identifier that represents anyone
832 # who is authenticated with a Google account or a service account.
833 #
834 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800836 #
837 #
838 # * `serviceAccount:{emailid}`: An email address that represents a service
839 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
840 #
841 # * `group:{emailid}`: An email address that represents a Google group.
842 # For example, `admins@example.com`.
843 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
845 # identifier) representing a user that has been recently deleted. For
846 # example, `alice@example.com?uid=123456789012345678901`. If the user is
847 # recovered, this value reverts to `user:{emailid}` and the recovered user
848 # retains the role in the binding.
849 #
850 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
851 # unique identifier) representing a service account that has been recently
852 # deleted. For example,
853 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
854 # If the service account is undeleted, this value reverts to
855 # `serviceAccount:{emailid}` and the undeleted service account retains the
856 # role in the binding.
857 #
858 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
859 # identifier) representing a Google group that has been recently
860 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
861 # the group is recovered, this value reverts to `group:{emailid}` and the
862 # recovered group retains the role in the binding.
863 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 #
865 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800866 # users of that domain. For example, `google.com` or `example.com`.
867 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700869 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
871 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700872 },
873 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700874 },
875 }
876
877 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800878 Allowed values
879 1 - v1 error format
880 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700881
882Returns:
883 An object of the form:
884
Dan O'Mearadd494642020-05-01 07:42:23 -0700885 { # An Identity and Access Management (IAM) policy, which specifies access
886 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800887 #
888 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700889 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
890 # `members` to a single `role`. Members can be user accounts, service accounts,
891 # Google groups, and domains (such as G Suite). A `role` is a named list of
892 # permissions; each `role` can be an IAM predefined role or a user-created
893 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800894 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700895 # For some types of Google Cloud resources, a `binding` can also specify a
896 # `condition`, which is a logical expression that allows access to a resource
897 # only if the expression evaluates to `true`. A condition can add constraints
898 # based on attributes of the request, the resource, or both. To learn which
899 # resources support conditions in their IAM policies, see the
900 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 #
902 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800903 #
904 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800906 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
908 # &quot;members&quot;: [
909 # &quot;user:mike@example.com&quot;,
910 # &quot;group:admins@example.com&quot;,
911 # &quot;domain:google.com&quot;,
912 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800913 # ]
914 # },
915 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
917 # &quot;members&quot;: [
918 # &quot;user:eve@example.com&quot;
919 # ],
920 # &quot;condition&quot;: {
921 # &quot;title&quot;: &quot;expirable access&quot;,
922 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
923 # &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 -0700924 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800925 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700926 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700927 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
928 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800929 # }
930 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700931 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700932 #
933 # bindings:
934 # - members:
935 # - user:mike@example.com
936 # - group:admins@example.com
937 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
939 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700941 # - user:eve@example.com
942 # role: roles/resourcemanager.organizationViewer
943 # condition:
944 # title: expirable access
945 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 # - etag: BwWWja0YfJA=
948 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800950 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700952 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
953 # prevent simultaneous updates of a policy from overwriting each other.
954 # It is strongly suggested that systems make use of the `etag` in the
955 # read-modify-write cycle to perform policy updates in order to avoid race
956 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
957 # systems are expected to put that etag in the request to `setIamPolicy` to
958 # ensure that their change will be applied to the same version of the policy.
959 #
960 # **Important:** If you use IAM Conditions, you must include the `etag` field
961 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
962 # you to overwrite a version `3` policy with a version `1` policy, and all of
963 # the conditions in the version `3` policy are lost.
964 &quot;version&quot;: 42, # Specifies the format of the policy.
965 #
966 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
967 # are rejected.
968 #
969 # Any operation that affects conditional role bindings must specify version
970 # `3`. This requirement applies to the following operations:
971 #
972 # * Getting a policy that includes a conditional role binding
973 # * Adding a conditional role binding to a policy
974 # * Changing a conditional role binding in a policy
975 # * Removing any role binding, with or without a condition, from a policy
976 # that includes conditions
977 #
978 # **Important:** If you use IAM Conditions, you must include the `etag` field
979 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
980 # you to overwrite a version `3` policy with a version `1` policy, and all of
981 # the conditions in the version `3` policy are lost.
982 #
983 # If a policy does not include any conditions, operations on that policy may
984 # specify any valid version or leave the field unset.
985 #
986 # To learn which resources support conditions in their IAM policies, see the
987 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
988 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700989 # `condition` that determines how and when the `bindings` are applied. Each
990 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700991 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
993 #
994 # If the condition evaluates to `true`, then this binding applies to the
995 # current request.
996 #
997 # If the condition evaluates to `false`, then this binding does not apply to
998 # the current request. However, a different role binding might grant the same
999 # role to one or more of the members in this binding.
1000 #
1001 # To learn which resources support conditions in their IAM policies, see the
1002 # [IAM
1003 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1004 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1005 # are documented at https://github.com/google/cel-spec.
1006 #
1007 # Example (Comparison):
1008 #
1009 # title: &quot;Summary size limit&quot;
1010 # description: &quot;Determines if a summary is less than 100 chars&quot;
1011 # expression: &quot;document.summary.size() &lt; 100&quot;
1012 #
1013 # Example (Equality):
1014 #
1015 # title: &quot;Requestor is owner&quot;
1016 # description: &quot;Determines if requestor is the document owner&quot;
1017 # expression: &quot;document.owner == request.auth.claims.email&quot;
1018 #
1019 # Example (Logic):
1020 #
1021 # title: &quot;Public documents&quot;
1022 # description: &quot;Determine whether the document should be publicly visible&quot;
1023 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1024 #
1025 # Example (Data Manipulation):
1026 #
1027 # title: &quot;Notification string&quot;
1028 # description: &quot;Create a notification string with a timestamp.&quot;
1029 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1030 #
1031 # The exact variables and functions that may be referenced within an expression
1032 # are determined by the service that evaluates it. See the service
1033 # documentation for additional information.
1034 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1035 # reporting, e.g. a file name and a position in the file.
1036 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1037 # its purpose. This can be used e.g. in UIs which allow to enter the
1038 # expression.
1039 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1040 # describes the expression, e.g. when hovered over it in a UI.
1041 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1042 # syntax.
1043 },
1044 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001045 # `members` can have the following values:
1046 #
1047 # * `allUsers`: A special identifier that represents anyone who is
1048 # on the internet; with or without a Google account.
1049 #
1050 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1051 # who is authenticated with a Google account or a service account.
1052 #
1053 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001054 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001055 #
1056 #
1057 # * `serviceAccount:{emailid}`: An email address that represents a service
1058 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1059 #
1060 # * `group:{emailid}`: An email address that represents a Google group.
1061 # For example, `admins@example.com`.
1062 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1064 # identifier) representing a user that has been recently deleted. For
1065 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1066 # recovered, this value reverts to `user:{emailid}` and the recovered user
1067 # retains the role in the binding.
1068 #
1069 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1070 # unique identifier) representing a service account that has been recently
1071 # deleted. For example,
1072 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1073 # If the service account is undeleted, this value reverts to
1074 # `serviceAccount:{emailid}` and the undeleted service account retains the
1075 # role in the binding.
1076 #
1077 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1078 # identifier) representing a Google group that has been recently
1079 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1080 # the group is recovered, this value reverts to `group:{emailid}` and the
1081 # recovered group retains the role in the binding.
1082 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001083 #
1084 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001085 # users of that domain. For example, `google.com` or `example.com`.
1086 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001088 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1090 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001091 },
1092 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001093 }</pre>
1094</div>
1095
1096<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001097 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001098 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001099If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07001100permissions, not a `NOT_FOUND` error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001101
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001102Note: This operation is designed to be used for building permission-aware
1103UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07001104may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001105
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001106Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001107 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001108See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001110 The object takes the form of:
1111
1112{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001113 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1114 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001115 # information see
1116 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001118 ],
1119 }
1120
1121 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001122 Allowed values
1123 1 - v1 error format
1124 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001125
1126Returns:
1127 An object of the form:
1128
1129 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001130 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001131 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001133 ],
1134 }</pre>
1135</div>
1136
1137</body></html>