blob: 4512351c4d857ba9fdc0ff2bed3d7a89aa5dba22 [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;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
167 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
168 # managing labels&lt;/a&gt;.
169 &quot;a_key&quot;: &quot;A String&quot;,
170 },
171 &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 -0700172 # A newly-created snapshot expires no later than 7 days from the time of its
173 # creation. Its exact lifetime is determined at creation by the existing
174 # backlog in the source subscription. Specifically, the lifetime of the
175 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
176 # For example, consider a subscription whose oldest unacked message is 3 days
177 # old. If a snapshot is created from this subscription, the snapshot -- which
178 # will always capture this 3-day-old backlog as long as the snapshot
179 # exists -- will expire in 4 days. The service will refuse to create a
180 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700181 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
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;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
247 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
248 # managing labels&lt;/a&gt;.
249 &quot;a_key&quot;: &quot;A String&quot;,
250 },
251 &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 -0700252 # A newly-created snapshot expires no later than 7 days from the time of its
253 # creation. Its exact lifetime is determined at creation by the existing
254 # backlog in the source subscription. Specifically, the lifetime of the
255 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
256 # For example, consider a subscription whose oldest unacked message is 3 days
257 # old. If a snapshot is created from this subscription, the snapshot -- which
258 # will always capture this 3-day-old backlog as long as the snapshot
259 # exists -- will expire in 4 days. The service will refuse to create a
260 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700261 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
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;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 # `condition` that determines how and when the `bindings` are applied. Each
363 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700364 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
366 #
367 # If the condition evaluates to `true`, then this binding applies to the
368 # current request.
369 #
370 # If the condition evaluates to `false`, then this binding does not apply to
371 # the current request. However, a different role binding might grant the same
372 # role to one or more of the members in this binding.
373 #
374 # To learn which resources support conditions in their IAM policies, see the
375 # [IAM
376 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
377 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
378 # are documented at https://github.com/google/cel-spec.
379 #
380 # Example (Comparison):
381 #
382 # title: &quot;Summary size limit&quot;
383 # description: &quot;Determines if a summary is less than 100 chars&quot;
384 # expression: &quot;document.summary.size() &lt; 100&quot;
385 #
386 # Example (Equality):
387 #
388 # title: &quot;Requestor is owner&quot;
389 # description: &quot;Determines if requestor is the document owner&quot;
390 # expression: &quot;document.owner == request.auth.claims.email&quot;
391 #
392 # Example (Logic):
393 #
394 # title: &quot;Public documents&quot;
395 # description: &quot;Determine whether the document should be publicly visible&quot;
396 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
397 #
398 # Example (Data Manipulation):
399 #
400 # title: &quot;Notification string&quot;
401 # description: &quot;Create a notification string with a timestamp.&quot;
402 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
403 #
404 # The exact variables and functions that may be referenced within an expression
405 # are determined by the service that evaluates it. See the service
406 # documentation for additional information.
407 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
408 # reporting, e.g. a file name and a position in the file.
409 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
410 # its purpose. This can be used e.g. in UIs which allow to enter the
411 # expression.
412 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
413 # describes the expression, e.g. when hovered over it in a UI.
414 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
415 # syntax.
416 },
417 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800418 # `members` can have the following values:
419 #
420 # * `allUsers`: A special identifier that represents anyone who is
421 # on the internet; with or without a Google account.
422 #
423 # * `allAuthenticatedUsers`: A special identifier that represents anyone
424 # who is authenticated with a Google account or a service account.
425 #
426 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800428 #
429 #
430 # * `serviceAccount:{emailid}`: An email address that represents a service
431 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
432 #
433 # * `group:{emailid}`: An email address that represents a Google group.
434 # For example, `admins@example.com`.
435 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
437 # identifier) representing a user that has been recently deleted. For
438 # example, `alice@example.com?uid=123456789012345678901`. If the user is
439 # recovered, this value reverts to `user:{emailid}` and the recovered user
440 # retains the role in the binding.
441 #
442 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
443 # unique identifier) representing a service account that has been recently
444 # deleted. For example,
445 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
446 # If the service account is undeleted, this value reverts to
447 # `serviceAccount:{emailid}` and the undeleted service account retains the
448 # role in the binding.
449 #
450 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
451 # identifier) representing a Google group that has been recently
452 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
453 # the group is recovered, this value reverts to `group:{emailid}` and the
454 # recovered group retains the role in the binding.
455 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 #
457 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800458 # users of that domain. For example, `google.com` or `example.com`.
459 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700461 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700462 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
463 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700464 },
465 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700466 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
467 # prevent simultaneous updates of a policy from overwriting each other.
468 # It is strongly suggested that systems make use of the `etag` in the
469 # read-modify-write cycle to perform policy updates in order to avoid race
470 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
471 # systems are expected to put that etag in the request to `setIamPolicy` to
472 # ensure that their change will be applied to the same version of the policy.
473 #
474 # **Important:** If you use IAM Conditions, you must include the `etag` field
475 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
476 # you to overwrite a version `3` policy with a version `1` policy, and all of
477 # the conditions in the version `3` policy are lost.
478 &quot;version&quot;: 42, # Specifies the format of the policy.
479 #
480 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
481 # are rejected.
482 #
483 # Any operation that affects conditional role bindings must specify version
484 # `3`. This requirement applies to the following operations:
485 #
486 # * Getting a policy that includes a conditional role binding
487 # * Adding a conditional role binding to a policy
488 # * Changing a conditional role binding in a policy
489 # * Removing any role binding, with or without a condition, from a policy
490 # that includes conditions
491 #
492 # **Important:** If you use IAM Conditions, you must include the `etag` field
493 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
494 # you to overwrite a version `3` policy with a version `1` policy, and all of
495 # the conditions in the version `3` policy are lost.
496 #
497 # If a policy does not include any conditions, operations on that policy may
498 # specify any valid version or leave the field unset.
499 #
500 # To learn which resources support conditions in their IAM policies, see the
501 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
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;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
540 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
541 # managing labels&lt;/a&gt;.
542 &quot;a_key&quot;: &quot;A String&quot;,
543 },
544 &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 -0700545 # A newly-created snapshot expires no later than 7 days from the time of its
546 # creation. Its exact lifetime is determined at creation by the existing
547 # backlog in the source subscription. Specifically, the lifetime of the
548 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
549 # For example, consider a subscription whose oldest unacked message is 3 days
550 # old. If a snapshot is created from this subscription, the snapshot -- which
551 # will always capture this 3-day-old backlog as long as the snapshot
552 # exists -- will expire in 4 days. The service will refuse to create a
553 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700554 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
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;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
596 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
597 # managing labels&lt;/a&gt;.
598 &quot;a_key&quot;: &quot;A String&quot;,
599 },
600 &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 -0700601 # A newly-created snapshot expires no later than 7 days from the time of its
602 # creation. Its exact lifetime is determined at creation by the existing
603 # backlog in the source subscription. Specifically, the lifetime of the
604 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
605 # For example, consider a subscription whose oldest unacked message is 3 days
606 # old. If a snapshot is created from this subscription, the snapshot -- which
607 # will always capture this 3-day-old backlog as long as the snapshot
608 # exists -- will expire in 4 days. The service will refuse to create a
609 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700610 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
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;topic&quot;: &quot;A String&quot;, # The name of the topic from which this snapshot is retaining messages.
631 &quot;labels&quot;: { # See &lt;a href=&quot;https://cloud.google.com/pubsub/docs/labels&quot;&gt; Creating and
632 # managing labels&lt;/a&gt;.
633 &quot;a_key&quot;: &quot;A String&quot;,
634 },
635 &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 -0700636 # A newly-created snapshot expires no later than 7 days from the time of its
637 # creation. Its exact lifetime is determined at creation by the existing
638 # backlog in the source subscription. Specifically, the lifetime of the
639 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
640 # For example, consider a subscription whose oldest unacked message is 3 days
641 # old. If a snapshot is created from this subscription, the snapshot -- which
642 # will always capture this 3-day-old backlog as long as the snapshot
643 # exists -- will expire in 4 days. The service will refuse to create a
644 # snapshot that would expire in less than 1 hour after creation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700645 &quot;name&quot;: &quot;A String&quot;, # The name of the snapshot.
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;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 # `condition` that determines how and when the `bindings` are applied. Each
735 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700736 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700737 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
738 #
739 # If the condition evaluates to `true`, then this binding applies to the
740 # current request.
741 #
742 # If the condition evaluates to `false`, then this binding does not apply to
743 # the current request. However, a different role binding might grant the same
744 # role to one or more of the members in this binding.
745 #
746 # To learn which resources support conditions in their IAM policies, see the
747 # [IAM
748 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
749 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
750 # are documented at https://github.com/google/cel-spec.
751 #
752 # Example (Comparison):
753 #
754 # title: &quot;Summary size limit&quot;
755 # description: &quot;Determines if a summary is less than 100 chars&quot;
756 # expression: &quot;document.summary.size() &lt; 100&quot;
757 #
758 # Example (Equality):
759 #
760 # title: &quot;Requestor is owner&quot;
761 # description: &quot;Determines if requestor is the document owner&quot;
762 # expression: &quot;document.owner == request.auth.claims.email&quot;
763 #
764 # Example (Logic):
765 #
766 # title: &quot;Public documents&quot;
767 # description: &quot;Determine whether the document should be publicly visible&quot;
768 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
769 #
770 # Example (Data Manipulation):
771 #
772 # title: &quot;Notification string&quot;
773 # description: &quot;Create a notification string with a timestamp.&quot;
774 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
775 #
776 # The exact variables and functions that may be referenced within an expression
777 # are determined by the service that evaluates it. See the service
778 # documentation for additional information.
779 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
780 # reporting, e.g. a file name and a position in the file.
781 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
782 # its purpose. This can be used e.g. in UIs which allow to enter the
783 # expression.
784 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
785 # describes the expression, e.g. when hovered over it in a UI.
786 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
787 # syntax.
788 },
789 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800790 # `members` can have the following values:
791 #
792 # * `allUsers`: A special identifier that represents anyone who is
793 # on the internet; with or without a Google account.
794 #
795 # * `allAuthenticatedUsers`: A special identifier that represents anyone
796 # who is authenticated with a Google account or a service account.
797 #
798 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800800 #
801 #
802 # * `serviceAccount:{emailid}`: An email address that represents a service
803 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
804 #
805 # * `group:{emailid}`: An email address that represents a Google group.
806 # For example, `admins@example.com`.
807 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
809 # identifier) representing a user that has been recently deleted. For
810 # example, `alice@example.com?uid=123456789012345678901`. If the user is
811 # recovered, this value reverts to `user:{emailid}` and the recovered user
812 # retains the role in the binding.
813 #
814 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
815 # unique identifier) representing a service account that has been recently
816 # deleted. For example,
817 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
818 # If the service account is undeleted, this value reverts to
819 # `serviceAccount:{emailid}` and the undeleted service account retains the
820 # role in the binding.
821 #
822 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
823 # identifier) representing a Google group that has been recently
824 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
825 # the group is recovered, this value reverts to `group:{emailid}` and the
826 # recovered group retains the role in the binding.
827 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 #
829 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800830 # users of that domain. For example, `google.com` or `example.com`.
831 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700832 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700833 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700834 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
835 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700836 },
837 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700838 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
839 # prevent simultaneous updates of a policy from overwriting each other.
840 # It is strongly suggested that systems make use of the `etag` in the
841 # read-modify-write cycle to perform policy updates in order to avoid race
842 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
843 # systems are expected to put that etag in the request to `setIamPolicy` to
844 # ensure that their change will be applied to the same version of the policy.
845 #
846 # **Important:** If you use IAM Conditions, you must include the `etag` field
847 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
848 # you to overwrite a version `3` policy with a version `1` policy, and all of
849 # the conditions in the version `3` policy are lost.
850 &quot;version&quot;: 42, # Specifies the format of the policy.
851 #
852 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
853 # are rejected.
854 #
855 # Any operation that affects conditional role bindings must specify version
856 # `3`. This requirement applies to the following operations:
857 #
858 # * Getting a policy that includes a conditional role binding
859 # * Adding a conditional role binding to a policy
860 # * Changing a conditional role binding in a policy
861 # * Removing any role binding, with or without a condition, from a policy
862 # that includes conditions
863 #
864 # **Important:** If you use IAM Conditions, you must include the `etag` field
865 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
866 # you to overwrite a version `3` policy with a version `1` policy, and all of
867 # the conditions in the version `3` policy are lost.
868 #
869 # If a policy does not include any conditions, operations on that policy may
870 # specify any valid version or leave the field unset.
871 #
872 # To learn which resources support conditions in their IAM policies, see the
873 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
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;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700953 # `condition` that determines how and when the `bindings` are applied. Each
954 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700955 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
957 #
958 # If the condition evaluates to `true`, then this binding applies to the
959 # current request.
960 #
961 # If the condition evaluates to `false`, then this binding does not apply to
962 # the current request. However, a different role binding might grant the same
963 # role to one or more of the members in this binding.
964 #
965 # To learn which resources support conditions in their IAM policies, see the
966 # [IAM
967 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
968 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
969 # are documented at https://github.com/google/cel-spec.
970 #
971 # Example (Comparison):
972 #
973 # title: &quot;Summary size limit&quot;
974 # description: &quot;Determines if a summary is less than 100 chars&quot;
975 # expression: &quot;document.summary.size() &lt; 100&quot;
976 #
977 # Example (Equality):
978 #
979 # title: &quot;Requestor is owner&quot;
980 # description: &quot;Determines if requestor is the document owner&quot;
981 # expression: &quot;document.owner == request.auth.claims.email&quot;
982 #
983 # Example (Logic):
984 #
985 # title: &quot;Public documents&quot;
986 # description: &quot;Determine whether the document should be publicly visible&quot;
987 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
988 #
989 # Example (Data Manipulation):
990 #
991 # title: &quot;Notification string&quot;
992 # description: &quot;Create a notification string with a timestamp.&quot;
993 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
994 #
995 # The exact variables and functions that may be referenced within an expression
996 # are determined by the service that evaluates it. See the service
997 # documentation for additional information.
998 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
999 # reporting, e.g. a file name and a position in the file.
1000 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1001 # its purpose. This can be used e.g. in UIs which allow to enter the
1002 # expression.
1003 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1004 # describes the expression, e.g. when hovered over it in a UI.
1005 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1006 # syntax.
1007 },
1008 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001009 # `members` can have the following values:
1010 #
1011 # * `allUsers`: A special identifier that represents anyone who is
1012 # on the internet; with or without a Google account.
1013 #
1014 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1015 # who is authenticated with a Google account or a service account.
1016 #
1017 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001018 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001019 #
1020 #
1021 # * `serviceAccount:{emailid}`: An email address that represents a service
1022 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1023 #
1024 # * `group:{emailid}`: An email address that represents a Google group.
1025 # For example, `admins@example.com`.
1026 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001027 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1028 # identifier) representing a user that has been recently deleted. For
1029 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1030 # recovered, this value reverts to `user:{emailid}` and the recovered user
1031 # retains the role in the binding.
1032 #
1033 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1034 # unique identifier) representing a service account that has been recently
1035 # deleted. For example,
1036 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1037 # If the service account is undeleted, this value reverts to
1038 # `serviceAccount:{emailid}` and the undeleted service account retains the
1039 # role in the binding.
1040 #
1041 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1042 # identifier) representing a Google group that has been recently
1043 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1044 # the group is recovered, this value reverts to `group:{emailid}` and the
1045 # recovered group retains the role in the binding.
1046 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001047 #
1048 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001049 # users of that domain. For example, `google.com` or `example.com`.
1050 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001052 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1054 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001055 },
1056 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001057 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1058 # prevent simultaneous updates of a policy from overwriting each other.
1059 # It is strongly suggested that systems make use of the `etag` in the
1060 # read-modify-write cycle to perform policy updates in order to avoid race
1061 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1062 # systems are expected to put that etag in the request to `setIamPolicy` to
1063 # ensure that their change will be applied to the same version of the policy.
1064 #
1065 # **Important:** If you use IAM Conditions, you must include the `etag` field
1066 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1067 # you to overwrite a version `3` policy with a version `1` policy, and all of
1068 # the conditions in the version `3` policy are lost.
1069 &quot;version&quot;: 42, # Specifies the format of the policy.
1070 #
1071 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1072 # are rejected.
1073 #
1074 # Any operation that affects conditional role bindings must specify version
1075 # `3`. This requirement applies to the following operations:
1076 #
1077 # * Getting a policy that includes a conditional role binding
1078 # * Adding a conditional role binding to a policy
1079 # * Changing a conditional role binding in a policy
1080 # * Removing any role binding, with or without a condition, from a policy
1081 # that includes conditions
1082 #
1083 # **Important:** If you use IAM Conditions, you must include the `etag` field
1084 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1085 # you to overwrite a version `3` policy with a version `1` policy, and all of
1086 # the conditions in the version `3` policy are lost.
1087 #
1088 # If a policy does not include any conditions, operations on that policy may
1089 # specify any valid version or leave the field unset.
1090 #
1091 # To learn which resources support conditions in their IAM policies, see the
1092 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
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>