blob: 49b9609acacf9717ef844da49a03515fcc4d6d09 [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 Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91<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
Dan O'Mearadd494642020-05-01 07:42:23 -0700108&lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&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 Kim715bd7f2019-06-14 16:50:42 -0700114If the requested subscription doesn't exist, returns `NOT_FOUND`.
115If 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
131href="https://cloud.google.com/pubsub/docs/admin#resource_names"&gt; resource
132name 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
138 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 "a_key": "A String",
140 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "subscription": "A String", # 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
144 # defined as the messages in the subscription's backlog that are
145 # unacknowledged upon the successful completion of the
146 # `CreateSnapshot` request; as well as:
147 # (b) Any messages published to the subscription's topic following the
148 # 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
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 # &lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&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 Kim715bd7f2019-06-14 16:50:42 -0700166 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
167 # A newly-created snapshot expires no later than 7 days from the time of its
168 # creation. Its exact lifetime is determined at creation by the existing
169 # backlog in the source subscription. Specifically, the lifetime of the
170 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
171 # For example, consider a subscription whose oldest unacked message is 3 days
172 # old. If a snapshot is created from this subscription, the snapshot -- which
173 # will always capture this 3-day-old backlog as long as the snapshot
174 # exists -- will expire in 4 days. The service will refuse to create a
175 # snapshot that would expire in less than 1 hour after creation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
177 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
178 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 "a_key": "A String",
180 },
181 "name": "A String", # The name of the snapshot.
182 }</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
Dan O'Mearadd494642020-05-01 07:42:23 -0700188&lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&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
Dan O'Mearadd494642020-05-01 07:42:23 -0700224&lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&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
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 # &lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&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 Kim715bd7f2019-06-14 16:50:42 -0700246 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
247 # A newly-created snapshot expires no later than 7 days from the time of its
248 # creation. Its exact lifetime is determined at creation by the existing
249 # backlog in the source subscription. Specifically, the lifetime of the
250 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
251 # For example, consider a subscription whose oldest unacked message is 3 days
252 # old. If a snapshot is created from this subscription, the snapshot -- which
253 # will always capture this 3-day-old backlog as long as the snapshot
254 # exists -- will expire in 4 days. The service will refuse to create a
255 # snapshot that would expire in less than 1 hour after creation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
257 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
258 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 "a_key": "A String",
260 },
261 "name": "A String", # The name of the snapshot.
262 }</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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700282 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800283 Allowed values
284 1 - v1 error format
285 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700286
287Returns:
288 An object of the form:
289
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 { # An Identity and Access Management (IAM) policy, which specifies access
291 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800292 #
293 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
295 # `members` to a single `role`. Members can be user accounts, service accounts,
296 # Google groups, and domains (such as G Suite). A `role` is a named list of
297 # permissions; each `role` can be an IAM predefined role or a user-created
298 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800299 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 # Optionally, a `binding` can specify a `condition`, which is a logical
301 # expression that allows access to a resource only if the expression evaluates
302 # to `true`. A condition can add constraints based on attributes of the
303 # request, the resource, or both.
304 #
305 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800306 #
307 # {
308 # "bindings": [
309 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800311 # "members": [
312 # "user:mike@example.com",
313 # "group:admins@example.com",
314 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800316 # ]
317 # },
318 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 # "role": "roles/resourcemanager.organizationViewer",
320 # "members": ["user:eve@example.com"],
321 # "condition": {
322 # "title": "expirable access",
323 # "description": "Does not grant access after Sep 2020",
324 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
325 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800326 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700327 # ],
328 # "etag": "BwWWja0YfJA=",
329 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800330 # }
331 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 #
334 # bindings:
335 # - members:
336 # - user:mike@example.com
337 # - group:admins@example.com
338 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700339 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
340 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 # - user:eve@example.com
343 # role: roles/resourcemanager.organizationViewer
344 # condition:
345 # title: expirable access
346 # description: Does not grant access after Sep 2020
347 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
348 # - etag: BwWWja0YfJA=
349 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800351 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 # [IAM documentation](https://cloud.google.com/iam/docs/).
353 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
354 # `condition` that determines how and when the `bindings` are applied. Each
355 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700356 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800357 "role": "A String", # Role that is assigned to `members`.
358 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800359 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
360 # `members` can have the following values:
361 #
362 # * `allUsers`: A special identifier that represents anyone who is
363 # on the internet; with or without a Google account.
364 #
365 # * `allAuthenticatedUsers`: A special identifier that represents anyone
366 # who is authenticated with a Google account or a service account.
367 #
368 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800370 #
371 #
372 # * `serviceAccount:{emailid}`: An email address that represents a service
373 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
374 #
375 # * `group:{emailid}`: An email address that represents a Google group.
376 # For example, `admins@example.com`.
377 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
379 # identifier) representing a user that has been recently deleted. For
380 # example, `alice@example.com?uid=123456789012345678901`. If the user is
381 # recovered, this value reverts to `user:{emailid}` and the recovered user
382 # retains the role in the binding.
383 #
384 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
385 # unique identifier) representing a service account that has been recently
386 # deleted. For example,
387 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
388 # If the service account is undeleted, this value reverts to
389 # `serviceAccount:{emailid}` and the undeleted service account retains the
390 # role in the binding.
391 #
392 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
393 # identifier) representing a Google group that has been recently
394 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
395 # the group is recovered, this value reverts to `group:{emailid}` and the
396 # recovered group retains the role in the binding.
397 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 #
399 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800400 # users of that domain. For example, `google.com` or `example.com`.
401 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700402 "A String",
403 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405 # NOTE: An unsatisfied condition will not allow user access via current
406 # binding. Different bindings, including their conditions, are examined
407 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -0700408 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
409 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 # Example (Comparison):
412 #
413 # title: "Summary size limit"
414 # description: "Determines if a summary is less than 100 chars"
415 # expression: "document.summary.size() &lt; 100"
416 #
417 # Example (Equality):
418 #
419 # title: "Requestor is owner"
420 # description: "Determines if requestor is the document owner"
421 # expression: "document.owner == request.auth.claims.email"
422 #
423 # Example (Logic):
424 #
425 # title: "Public documents"
426 # description: "Determine whether the document should be publicly visible"
427 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
428 #
429 # Example (Data Manipulation):
430 #
431 # title: "Notification string"
432 # description: "Create a notification string with a timestamp."
433 # expression: "'New message received at ' + string(document.create_time)"
434 #
435 # The exact variables and functions that may be referenced within an expression
436 # are determined by the service that evaluates it. See the service
437 # documentation for additional information.
438 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -0700440 "expression": "A String", # Textual representation of an expression in Common Expression Language
441 # syntax.
442 "location": "A String", # Optional. String indicating the location of the expression for error
443 # reporting, e.g. a file name and a position in the file.
444 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700445 # its purpose. This can be used e.g. in UIs which allow to enter the
446 # expression.
447 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700448 },
449 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800450 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
451 # prevent simultaneous updates of a policy from overwriting each other.
452 # It is strongly suggested that systems make use of the `etag` in the
453 # read-modify-write cycle to perform policy updates in order to avoid race
454 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
455 # systems are expected to put that etag in the request to `setIamPolicy` to
456 # ensure that their change will be applied to the same version of the policy.
457 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700458 # **Important:** If you use IAM Conditions, you must include the `etag` field
459 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
460 # you to overwrite a version `3` policy with a version `1` policy, and all of
461 # the conditions in the version `3` policy are lost.
462 "version": 42, # Specifies the format of the policy.
463 #
464 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
465 # are rejected.
466 #
467 # Any operation that affects conditional role bindings must specify version
468 # `3`. This requirement applies to the following operations:
469 #
470 # * Getting a policy that includes a conditional role binding
471 # * Adding a conditional role binding to a policy
472 # * Changing a conditional role binding in a policy
473 # * Removing any role binding, with or without a condition, from a policy
474 # that includes conditions
475 #
476 # **Important:** If you use IAM Conditions, you must include the `etag` field
477 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
478 # you to overwrite a version `3` policy with a version `1` policy, and all of
479 # the conditions in the version `3` policy are lost.
480 #
481 # If a policy does not include any conditions, operations on that policy may
482 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 }</pre>
484</div>
485
486<div class="method">
487 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
488 <pre>Lists the existing snapshots. Snapshots are used in
Dan O'Mearadd494642020-05-01 07:42:23 -0700489&lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490operations, which allow
491you to manage message acknowledgments in bulk. That is, you can set the
492acknowledgment state of messages in an existing subscription to the state
493captured by a snapshot.
494
495Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 project: string, Required. The name of the project in which to list snapshots.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497Format is `projects/{project-id}`. (required)
498 pageSize: integer, Maximum number of snapshots to return.
499 pageToken: string, The value returned by the last `ListSnapshotsResponse`; indicates that this
500is a continuation of a prior `ListSnapshots` call, and that the system
501should return the next page of data.
502 x__xgafv: string, V1 error format.
503 Allowed values
504 1 - v1 error format
505 2 - v2 error format
506
507Returns:
508 An object of the form:
509
510 { # Response for the `ListSnapshots` method.
511 "nextPageToken": "A String", # If not empty, indicates that there may be more snapshot that match the
512 # request; this value should be passed in a new `ListSnapshotsRequest`.
513 "snapshots": [ # The resulting snapshots.
514 { # A snapshot resource. Snapshots are used in
Dan O'Mearadd494642020-05-01 07:42:23 -0700515 # &lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516 # operations, which allow
517 # you to manage message acknowledgments in bulk. That is, you can set the
518 # acknowledgment state of messages in an existing subscription to the state
519 # captured by a snapshot.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
521 # A newly-created snapshot expires no later than 7 days from the time of its
522 # creation. Its exact lifetime is determined at creation by the existing
523 # backlog in the source subscription. Specifically, the lifetime of the
524 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
525 # For example, consider a subscription whose oldest unacked message is 3 days
526 # old. If a snapshot is created from this subscription, the snapshot -- which
527 # will always capture this 3-day-old backlog as long as the snapshot
528 # exists -- will expire in 4 days. The service will refuse to create a
529 # snapshot that would expire in less than 1 hour after creation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
531 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
532 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 "a_key": "A String",
534 },
535 "name": "A String", # The name of the snapshot.
536 },
537 ],
538 }</pre>
539</div>
540
541<div class="method">
542 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
543 <pre>Retrieves the next page of results.
544
545Args:
546 previous_request: The request for the previous page. (required)
547 previous_response: The response from the request for the previous page. (required)
548
549Returns:
550 A request object that you can call 'execute()' on to request the next
551 page. Returns None if there are no more items in the collection.
552 </pre>
553</div>
554
555<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700556 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 <pre>Updates an existing snapshot. Snapshots are used in
Dan O'Mearadd494642020-05-01 07:42:23 -0700558&lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559operations, which allow
560you to manage message acknowledgments in bulk. That is, you can set the
561acknowledgment state of messages in an existing subscription to the state
562captured by a snapshot.
563
564Args:
565 name: string, The name of the snapshot. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700566 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 The object takes the form of:
568
569{ # Request for the UpdateSnapshot method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 "snapshot": { # A snapshot resource. Snapshots are used in # Required. The updated snapshot object.
571 # &lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700572 # operations, which allow
573 # you to manage message acknowledgments in bulk. That is, you can set the
574 # acknowledgment state of messages in an existing subscription to the state
575 # captured by a snapshot.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
577 # A newly-created snapshot expires no later than 7 days from the time of its
578 # creation. Its exact lifetime is determined at creation by the existing
579 # backlog in the source subscription. Specifically, the lifetime of the
580 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
581 # For example, consider a subscription whose oldest unacked message is 3 days
582 # old. If a snapshot is created from this subscription, the snapshot -- which
583 # will always capture this 3-day-old backlog as long as the snapshot
584 # exists -- will expire in 4 days. The service will refuse to create a
585 # snapshot that would expire in less than 1 hour after creation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700586 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
587 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
588 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 "a_key": "A String",
590 },
591 "name": "A String", # The name of the snapshot.
592 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700593 "updateMask": "A String", # Required. Indicates which fields in the provided snapshot to update.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700594 # Must be specified and non-empty.
595 }
596
597 x__xgafv: string, V1 error format.
598 Allowed values
599 1 - v1 error format
600 2 - v2 error format
601
602Returns:
603 An object of the form:
604
605 { # A snapshot resource. Snapshots are used in
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 # &lt;a href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 # operations, which allow
608 # you to manage message acknowledgments in bulk. That is, you can set the
609 # acknowledgment state of messages in an existing subscription to the state
610 # captured by a snapshot.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
612 # A newly-created snapshot expires no later than 7 days from the time of its
613 # creation. Its exact lifetime is determined at creation by the existing
614 # backlog in the source subscription. Specifically, the lifetime of the
615 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
616 # For example, consider a subscription whose oldest unacked message is 3 days
617 # old. If a snapshot is created from this subscription, the snapshot -- which
618 # will always capture this 3-day-old backlog as long as the snapshot
619 # exists -- will expire in 4 days. The service will refuse to create a
620 # snapshot that would expire in less than 1 hour after creation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
622 "labels": { # See &lt;a href="https://cloud.google.com/pubsub/docs/labels"&gt; Creating and
623 # managing labels&lt;/a&gt;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 "a_key": "A String",
625 },
626 "name": "A String", # The name of the snapshot.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700627 }</pre>
628</div>
629
630<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800632 <pre>Sets the access control policy on the specified resource. Replaces any
633existing policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700634
Dan O'Mearadd494642020-05-01 07:42:23 -0700635Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
636
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700637Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800638 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700639See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700641 The object takes the form of:
642
643{ # Request message for `SetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700644 "policy": { # 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 -0800645 # the policy is limited to a few 10s of KB. An empty policy is a
646 # valid policy but certain Cloud Platform services (such as Projects)
647 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800649 #
650 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
652 # `members` to a single `role`. Members can be user accounts, service accounts,
653 # Google groups, and domains (such as G Suite). A `role` is a named list of
654 # permissions; each `role` can be an IAM predefined role or a user-created
655 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800656 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700657 # Optionally, a `binding` can specify a `condition`, which is a logical
658 # expression that allows access to a resource only if the expression evaluates
659 # to `true`. A condition can add constraints based on attributes of the
660 # request, the resource, or both.
661 #
662 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800663 #
664 # {
665 # "bindings": [
666 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800668 # "members": [
669 # "user:mike@example.com",
670 # "group:admins@example.com",
671 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800673 # ]
674 # },
675 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700676 # "role": "roles/resourcemanager.organizationViewer",
677 # "members": ["user:eve@example.com"],
678 # "condition": {
679 # "title": "expirable access",
680 # "description": "Does not grant access after Sep 2020",
681 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
682 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800683 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700684 # ],
685 # "etag": "BwWWja0YfJA=",
686 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800687 # }
688 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700689 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690 #
691 # bindings:
692 # - members:
693 # - user:mike@example.com
694 # - group:admins@example.com
695 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700696 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
697 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700699 # - user:eve@example.com
700 # role: roles/resourcemanager.organizationViewer
701 # condition:
702 # title: expirable access
703 # description: Does not grant access after Sep 2020
704 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
705 # - etag: BwWWja0YfJA=
706 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800708 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 # [IAM documentation](https://cloud.google.com/iam/docs/).
710 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
711 # `condition` that determines how and when the `bindings` are applied. Each
712 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700713 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800714 "role": "A String", # Role that is assigned to `members`.
715 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800716 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
717 # `members` can have the following values:
718 #
719 # * `allUsers`: A special identifier that represents anyone who is
720 # on the internet; with or without a Google account.
721 #
722 # * `allAuthenticatedUsers`: A special identifier that represents anyone
723 # who is authenticated with a Google account or a service account.
724 #
725 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800727 #
728 #
729 # * `serviceAccount:{emailid}`: An email address that represents a service
730 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
731 #
732 # * `group:{emailid}`: An email address that represents a Google group.
733 # For example, `admins@example.com`.
734 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700735 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
736 # identifier) representing a user that has been recently deleted. For
737 # example, `alice@example.com?uid=123456789012345678901`. If the user is
738 # recovered, this value reverts to `user:{emailid}` and the recovered user
739 # retains the role in the binding.
740 #
741 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
742 # unique identifier) representing a service account that has been recently
743 # deleted. For example,
744 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
745 # If the service account is undeleted, this value reverts to
746 # `serviceAccount:{emailid}` and the undeleted service account retains the
747 # role in the binding.
748 #
749 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
750 # identifier) representing a Google group that has been recently
751 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
752 # the group is recovered, this value reverts to `group:{emailid}` and the
753 # recovered group retains the role in the binding.
754 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 #
756 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800757 # users of that domain. For example, `google.com` or `example.com`.
758 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700759 "A String",
760 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 # NOTE: An unsatisfied condition will not allow user access via current
763 # binding. Different bindings, including their conditions, are examined
764 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
766 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700767 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 # Example (Comparison):
769 #
770 # title: "Summary size limit"
771 # description: "Determines if a summary is less than 100 chars"
772 # expression: "document.summary.size() &lt; 100"
773 #
774 # Example (Equality):
775 #
776 # title: "Requestor is owner"
777 # description: "Determines if requestor is the document owner"
778 # expression: "document.owner == request.auth.claims.email"
779 #
780 # Example (Logic):
781 #
782 # title: "Public documents"
783 # description: "Determine whether the document should be publicly visible"
784 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
785 #
786 # Example (Data Manipulation):
787 #
788 # title: "Notification string"
789 # description: "Create a notification string with a timestamp."
790 # expression: "'New message received at ' + string(document.create_time)"
791 #
792 # The exact variables and functions that may be referenced within an expression
793 # are determined by the service that evaluates it. See the service
794 # documentation for additional information.
795 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -0700797 "expression": "A String", # Textual representation of an expression in Common Expression Language
798 # syntax.
799 "location": "A String", # Optional. String indicating the location of the expression for error
800 # reporting, e.g. a file name and a position in the file.
801 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 # its purpose. This can be used e.g. in UIs which allow to enter the
803 # expression.
804 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700805 },
806 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800807 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
808 # prevent simultaneous updates of a policy from overwriting each other.
809 # It is strongly suggested that systems make use of the `etag` in the
810 # read-modify-write cycle to perform policy updates in order to avoid race
811 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
812 # systems are expected to put that etag in the request to `setIamPolicy` to
813 # ensure that their change will be applied to the same version of the policy.
814 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700815 # **Important:** If you use IAM Conditions, you must include the `etag` field
816 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
817 # you to overwrite a version `3` policy with a version `1` policy, and all of
818 # the conditions in the version `3` policy are lost.
819 "version": 42, # Specifies the format of the policy.
820 #
821 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
822 # are rejected.
823 #
824 # Any operation that affects conditional role bindings must specify version
825 # `3`. This requirement applies to the following operations:
826 #
827 # * Getting a policy that includes a conditional role binding
828 # * Adding a conditional role binding to a policy
829 # * Changing a conditional role binding in a policy
830 # * Removing any role binding, with or without a condition, from a policy
831 # that includes conditions
832 #
833 # **Important:** If you use IAM Conditions, you must include the `etag` field
834 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
835 # you to overwrite a version `3` policy with a version `1` policy, and all of
836 # the conditions in the version `3` policy are lost.
837 #
838 # If a policy does not include any conditions, operations on that policy may
839 # specify any valid version or leave the field unset.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700840 },
841 }
842
843 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800844 Allowed values
845 1 - v1 error format
846 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700847
848Returns:
849 An object of the form:
850
Dan O'Mearadd494642020-05-01 07:42:23 -0700851 { # An Identity and Access Management (IAM) policy, which specifies access
852 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800853 #
854 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700855 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
856 # `members` to a single `role`. Members can be user accounts, service accounts,
857 # Google groups, and domains (such as G Suite). A `role` is a named list of
858 # permissions; each `role` can be an IAM predefined role or a user-created
859 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800860 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 # Optionally, a `binding` can specify a `condition`, which is a logical
862 # expression that allows access to a resource only if the expression evaluates
863 # to `true`. A condition can add constraints based on attributes of the
864 # request, the resource, or both.
865 #
866 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800867 #
868 # {
869 # "bindings": [
870 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700871 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800872 # "members": [
873 # "user:mike@example.com",
874 # "group:admins@example.com",
875 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700876 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800877 # ]
878 # },
879 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 # "role": "roles/resourcemanager.organizationViewer",
881 # "members": ["user:eve@example.com"],
882 # "condition": {
883 # "title": "expirable access",
884 # "description": "Does not grant access after Sep 2020",
885 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
886 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800887 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 # ],
889 # "etag": "BwWWja0YfJA=",
890 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800891 # }
892 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894 #
895 # bindings:
896 # - members:
897 # - user:mike@example.com
898 # - group:admins@example.com
899 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700900 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
901 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 # - user:eve@example.com
904 # role: roles/resourcemanager.organizationViewer
905 # condition:
906 # title: expirable access
907 # description: Does not grant access after Sep 2020
908 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
909 # - etag: BwWWja0YfJA=
910 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800912 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700913 # [IAM documentation](https://cloud.google.com/iam/docs/).
914 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
915 # `condition` that determines how and when the `bindings` are applied. Each
916 # of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700917 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800918 "role": "A String", # Role that is assigned to `members`.
919 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800920 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
921 # `members` can have the following values:
922 #
923 # * `allUsers`: A special identifier that represents anyone who is
924 # on the internet; with or without a Google account.
925 #
926 # * `allAuthenticatedUsers`: A special identifier that represents anyone
927 # who is authenticated with a Google account or a service account.
928 #
929 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 # account. For example, `alice@example.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800931 #
932 #
933 # * `serviceAccount:{emailid}`: An email address that represents a service
934 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
935 #
936 # * `group:{emailid}`: An email address that represents a Google group.
937 # For example, `admins@example.com`.
938 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700939 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
940 # identifier) representing a user that has been recently deleted. For
941 # example, `alice@example.com?uid=123456789012345678901`. If the user is
942 # recovered, this value reverts to `user:{emailid}` and the recovered user
943 # retains the role in the binding.
944 #
945 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
946 # unique identifier) representing a service account that has been recently
947 # deleted. For example,
948 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
949 # If the service account is undeleted, this value reverts to
950 # `serviceAccount:{emailid}` and the undeleted service account retains the
951 # role in the binding.
952 #
953 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
954 # identifier) representing a Google group that has been recently
955 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
956 # the group is recovered, this value reverts to `group:{emailid}` and the
957 # recovered group retains the role in the binding.
958 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 #
960 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800961 # users of that domain. For example, `google.com` or `example.com`.
962 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700963 "A String",
964 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700965 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700966 # NOTE: An unsatisfied condition will not allow user access via current
967 # binding. Different bindings, including their conditions, are examined
968 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -0700969 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
970 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700971 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700972 # Example (Comparison):
973 #
974 # title: "Summary size limit"
975 # description: "Determines if a summary is less than 100 chars"
976 # expression: "document.summary.size() &lt; 100"
977 #
978 # Example (Equality):
979 #
980 # title: "Requestor is owner"
981 # description: "Determines if requestor is the document owner"
982 # expression: "document.owner == request.auth.claims.email"
983 #
984 # Example (Logic):
985 #
986 # title: "Public documents"
987 # description: "Determine whether the document should be publicly visible"
988 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
989 #
990 # Example (Data Manipulation):
991 #
992 # title: "Notification string"
993 # description: "Create a notification string with a timestamp."
994 # expression: "'New message received at ' + string(document.create_time)"
995 #
996 # The exact variables and functions that may be referenced within an expression
997 # are determined by the service that evaluates it. See the service
998 # documentation for additional information.
999 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001000 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -07001001 "expression": "A String", # Textual representation of an expression in Common Expression Language
1002 # syntax.
1003 "location": "A String", # Optional. String indicating the location of the expression for error
1004 # reporting, e.g. a file name and a position in the file.
1005 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001006 # its purpose. This can be used e.g. in UIs which allow to enter the
1007 # expression.
1008 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001009 },
1010 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001011 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1012 # prevent simultaneous updates of a policy from overwriting each other.
1013 # It is strongly suggested that systems make use of the `etag` in the
1014 # read-modify-write cycle to perform policy updates in order to avoid race
1015 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1016 # systems are expected to put that etag in the request to `setIamPolicy` to
1017 # ensure that their change will be applied to the same version of the policy.
1018 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 # **Important:** If you use IAM Conditions, you must include the `etag` field
1020 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1021 # you to overwrite a version `3` policy with a version `1` policy, and all of
1022 # the conditions in the version `3` policy are lost.
1023 "version": 42, # Specifies the format of the policy.
1024 #
1025 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1026 # are rejected.
1027 #
1028 # Any operation that affects conditional role bindings must specify version
1029 # `3`. This requirement applies to the following operations:
1030 #
1031 # * Getting a policy that includes a conditional role binding
1032 # * Adding a conditional role binding to a policy
1033 # * Changing a conditional role binding in a policy
1034 # * Removing any role binding, with or without a condition, from a policy
1035 # that includes conditions
1036 #
1037 # **Important:** If you use IAM Conditions, you must include the `etag` field
1038 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1039 # you to overwrite a version `3` policy with a version `1` policy, and all of
1040 # the conditions in the version `3` policy are lost.
1041 #
1042 # If a policy does not include any conditions, operations on that policy may
1043 # specify any valid version or leave the field unset.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001044 }</pre>
1045</div>
1046
1047<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001049 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001050If the resource does not exist, this will return an empty set of
1051permissions, not a NOT_FOUND error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001052
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001053Note: This operation is designed to be used for building permission-aware
1054UIs and command-line tools, not for authorization checking. This operation
1055may "fail open" without warning.
1056
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001057Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001058 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001059See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001061 The object takes the form of:
1062
1063{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001064 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
1065 # wildcards (such as '*' or 'storage.*') are not allowed. For more
1066 # information see
1067 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001068 "A String",
1069 ],
1070 }
1071
1072 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001073 Allowed values
1074 1 - v1 error format
1075 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001076
1077Returns:
1078 An object of the form:
1079
1080 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001081 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1082 # allowed.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001083 "A String",
1084 ],
1085 }</pre>
1086</div>
1087
1088</body></html>