blob: 29eca3c4f5139167cedd4055f1349d06d264bd03 [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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
79<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">
Thomas Coffee2f245372017-03-27 10:39:26 -070087 <code><a href="#getIamPolicy">getIamPolicy(resource, 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">
96 <code><a href="#patch">patch(name, body, x__xgafv=None)</a></code></p>
97<p class="firstline">Updates an existing snapshot. Snapshots are used in</p>
98<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070099 <code><a href="#setIamPolicy">setIamPolicy(resource, body, 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">
Thomas Coffee2f245372017-03-27 10:39:26 -0700102 <code><a href="#testIamPermissions">testIamPermissions(resource, body, 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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
107 <pre>Creates a snapshot from the requested subscription. Snapshots are used in
108<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
109operations, 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.
113<br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
114If 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:
127 name: string, Optional user-provided name for this snapshot.
128If the name is not provided in the request, the server will assign a random
129name for this snapshot on the same project as the subscription.
130Note that for REST API requests, you must specify a name. See the
131<a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
132resource name rules</a>.
133Format is `projects/{project}/snapshots/{snap}`. (required)
134 body: object, The request body. (required)
135 The object takes the form of:
136
137{ # Request for the `CreateSnapshot` method.
138 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
139 # managing labels</a>.
140 "a_key": "A String",
141 },
142 "subscription": "A String", # The subscription whose backlog the snapshot retains.
143 # Specifically, the created snapshot is guaranteed to retain:
144 # (a) The existing backlog on the subscription. More precisely, this is
145 # defined as the messages in the subscription's backlog that are
146 # unacknowledged upon the successful completion of the
147 # `CreateSnapshot` request; as well as:
148 # (b) Any messages published to the subscription's topic following the
149 # successful completion of the CreateSnapshot request.
150 # Format is `projects/{project}/subscriptions/{sub}`.
151 }
152
153 x__xgafv: string, V1 error format.
154 Allowed values
155 1 - v1 error format
156 2 - v2 error format
157
158Returns:
159 An object of the form:
160
161 { # A snapshot resource. Snapshots are used in
162 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
163 # operations, which allow
164 # you to manage message acknowledgments in bulk. That is, you can set the
165 # acknowledgment state of messages in an existing subscription to the state
166 # captured by a snapshot.
167 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
168 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
169 # A newly-created snapshot expires no later than 7 days from the time of its
170 # creation. Its exact lifetime is determined at creation by the existing
171 # backlog in the source subscription. Specifically, the lifetime of the
172 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
173 # For example, consider a subscription whose oldest unacked message is 3 days
174 # old. If a snapshot is created from this subscription, the snapshot -- which
175 # will always capture this 3-day-old backlog as long as the snapshot
176 # exists -- will expire in 4 days. The service will refuse to create a
177 # snapshot that would expire in less than 1 hour after creation.
178 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
179 # managing labels</a>.
180 "a_key": "A String",
181 },
182 "name": "A String", # The name of the snapshot.
183 }</pre>
184</div>
185
186<div class="method">
187 <code class="details" id="delete">delete(snapshot, x__xgafv=None)</code>
188 <pre>Removes an existing snapshot. Snapshots are used in
189<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
190operations, which allow
191you to manage message acknowledgments in bulk. That is, you can set the
192acknowledgment state of messages in an existing subscription to the state
193captured by a snapshot.<br><br>
194When the snapshot is deleted, all messages retained in the snapshot
195are immediately dropped. After a snapshot is deleted, a new one may be
196created with the same name, but the new one has no association with the old
197snapshot or its subscription, unless the same subscription is specified.
198
199Args:
200 snapshot: string, The name of the snapshot to delete.
201Format is `projects/{project}/snapshots/{snap}`. (required)
202 x__xgafv: string, V1 error format.
203 Allowed values
204 1 - v1 error format
205 2 - v2 error format
206
207Returns:
208 An object of the form:
209
210 { # A generic empty message that you can re-use to avoid defining duplicated
211 # empty messages in your APIs. A typical example is to use it as the request
212 # or the response type of an API method. For instance:
213 #
214 # service Foo {
215 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
216 # }
217 #
218 # The JSON representation for `Empty` is empty JSON object `{}`.
219 }</pre>
220</div>
221
222<div class="method">
223 <code class="details" id="get">get(snapshot, x__xgafv=None)</code>
224 <pre>Gets the configuration details of a snapshot. Snapshots are used in
225<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
226operations, which allow you to manage message acknowledgments in bulk. That
227is, you can set the acknowledgment state of messages in an existing
228subscription to the state captured by a snapshot.
229
230Args:
231 snapshot: string, The name of the snapshot to get.
232Format is `projects/{project}/snapshots/{snap}`. (required)
233 x__xgafv: string, V1 error format.
234 Allowed values
235 1 - v1 error format
236 2 - v2 error format
237
238Returns:
239 An object of the form:
240
241 { # A snapshot resource. Snapshots are used in
242 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
243 # operations, which allow
244 # you to manage message acknowledgments in bulk. That is, you can set the
245 # acknowledgment state of messages in an existing subscription to the state
246 # captured by a snapshot.
247 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
248 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
249 # A newly-created snapshot expires no later than 7 days from the time of its
250 # creation. Its exact lifetime is determined at creation by the existing
251 # backlog in the source subscription. Specifically, the lifetime of the
252 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
253 # For example, consider a subscription whose oldest unacked message is 3 days
254 # old. If a snapshot is created from this subscription, the snapshot -- which
255 # will always capture this 3-day-old backlog as long as the snapshot
256 # exists -- will expire in 4 days. The service will refuse to create a
257 # snapshot that would expire in less than 1 hour after creation.
258 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
259 # managing labels</a>.
260 "a_key": "A String",
261 },
262 "name": "A String", # The name of the snapshot.
263 }</pre>
264</div>
265
266<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700267 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800268 <pre>Gets the access control policy for a resource.
269Returns an empty policy if the resource exists and does not have a policy
270set.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700271
272Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800273 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700274See the operation documentation for the appropriate value for this field. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700275 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800276 Allowed values
277 1 - v1 error format
278 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700279
280Returns:
281 An object of the form:
282
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800283 { # Defines an Identity and Access Management (IAM) policy. It is used to
284 # specify access control policies for Cloud Platform resources.
285 #
286 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800288 # `members` to a `role`, where the members can be user accounts, Google groups,
289 # Google domains, and service accounts. A `role` is a named list of permissions
290 # defined by IAM.
291 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800293 #
294 # {
295 # "bindings": [
296 # {
297 # "role": "roles/owner",
298 # "members": [
299 # "user:mike@example.com",
300 # "group:admins@example.com",
301 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800303 # ]
304 # },
305 # {
306 # "role": "roles/viewer",
307 # "members": ["user:sean@example.com"]
308 # }
309 # ]
310 # }
311 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 # **YAML Example**
313 #
314 # bindings:
315 # - members:
316 # - user:mike@example.com
317 # - group:admins@example.com
318 # - domain:google.com
319 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
320 # role: roles/owner
321 # - members:
322 # - user:sean@example.com
323 # role: roles/viewer
324 #
325 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800326 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800328 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800329 # `bindings` with no members will result in an error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700330 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800331 "role": "A String", # Role that is assigned to `members`.
332 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800333 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
334 # `members` can have the following values:
335 #
336 # * `allUsers`: A special identifier that represents anyone who is
337 # on the internet; with or without a Google account.
338 #
339 # * `allAuthenticatedUsers`: A special identifier that represents anyone
340 # who is authenticated with a Google account or a service account.
341 #
342 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800344 #
345 #
346 # * `serviceAccount:{emailid}`: An email address that represents a service
347 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
348 #
349 # * `group:{emailid}`: An email address that represents a Google group.
350 # For example, `admins@example.com`.
351 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 #
353 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800354 # users of that domain. For example, `google.com` or `example.com`.
355 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700356 "A String",
357 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
359 # NOTE: An unsatisfied condition will not allow user access via current
360 # binding. Different bindings, including their conditions, are examined
361 # independently.
362 #
363 # title: "User account presence"
364 # description: "Determines whether the request has a user account"
365 # expression: "size(request.user) > 0"
366 "location": "A String", # An optional string indicating the location of the expression for error
367 # reporting, e.g. a file name and a position in the file.
368 "expression": "A String", # Textual representation of an expression in
369 # Common Expression Language syntax.
370 #
371 # The application context of the containing message determines which
372 # well-known feature set of CEL is supported.
373 "description": "A String", # An optional description of the expression. This is a longer text which
374 # describes the expression, e.g. when hovered over it in a UI.
375 "title": "A String", # An optional title for the expression, i.e. a short string describing
376 # its purpose. This can be used e.g. in UIs which allow to enter the
377 # expression.
378 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700379 },
380 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 "version": 42, # Deprecated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800382 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
383 # prevent simultaneous updates of a policy from overwriting each other.
384 # It is strongly suggested that systems make use of the `etag` in the
385 # read-modify-write cycle to perform policy updates in order to avoid race
386 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
387 # systems are expected to put that etag in the request to `setIamPolicy` to
388 # ensure that their change will be applied to the same version of the policy.
389 #
390 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
391 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 }</pre>
393</div>
394
395<div class="method">
396 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
397 <pre>Lists the existing snapshots. Snapshots are used in
398<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
399operations, which allow
400you to manage message acknowledgments in bulk. That is, you can set the
401acknowledgment state of messages in an existing subscription to the state
402captured by a snapshot.
403
404Args:
405 project: string, The name of the project in which to list snapshots.
406Format is `projects/{project-id}`. (required)
407 pageSize: integer, Maximum number of snapshots to return.
408 pageToken: string, The value returned by the last `ListSnapshotsResponse`; indicates that this
409is a continuation of a prior `ListSnapshots` call, and that the system
410should return the next page of data.
411 x__xgafv: string, V1 error format.
412 Allowed values
413 1 - v1 error format
414 2 - v2 error format
415
416Returns:
417 An object of the form:
418
419 { # Response for the `ListSnapshots` method.
420 "nextPageToken": "A String", # If not empty, indicates that there may be more snapshot that match the
421 # request; this value should be passed in a new `ListSnapshotsRequest`.
422 "snapshots": [ # The resulting snapshots.
423 { # A snapshot resource. Snapshots are used in
424 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
425 # operations, which allow
426 # you to manage message acknowledgments in bulk. That is, you can set the
427 # acknowledgment state of messages in an existing subscription to the state
428 # captured by a snapshot.
429 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
430 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
431 # A newly-created snapshot expires no later than 7 days from the time of its
432 # creation. Its exact lifetime is determined at creation by the existing
433 # backlog in the source subscription. Specifically, the lifetime of the
434 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
435 # For example, consider a subscription whose oldest unacked message is 3 days
436 # old. If a snapshot is created from this subscription, the snapshot -- which
437 # will always capture this 3-day-old backlog as long as the snapshot
438 # exists -- will expire in 4 days. The service will refuse to create a
439 # snapshot that would expire in less than 1 hour after creation.
440 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
441 # managing labels</a>.
442 "a_key": "A String",
443 },
444 "name": "A String", # The name of the snapshot.
445 },
446 ],
447 }</pre>
448</div>
449
450<div class="method">
451 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
452 <pre>Retrieves the next page of results.
453
454Args:
455 previous_request: The request for the previous page. (required)
456 previous_response: The response from the request for the previous page. (required)
457
458Returns:
459 A request object that you can call 'execute()' on to request the next
460 page. Returns None if there are no more items in the collection.
461 </pre>
462</div>
463
464<div class="method">
465 <code class="details" id="patch">patch(name, body, x__xgafv=None)</code>
466 <pre>Updates an existing snapshot. Snapshots are used in
467<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
468operations, which allow
469you to manage message acknowledgments in bulk. That is, you can set the
470acknowledgment state of messages in an existing subscription to the state
471captured by a snapshot.
472
473Args:
474 name: string, The name of the snapshot. (required)
475 body: object, The request body. (required)
476 The object takes the form of:
477
478{ # Request for the UpdateSnapshot method.
479 "snapshot": { # A snapshot resource. Snapshots are used in # The updated snapshot object.
480 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
481 # operations, which allow
482 # you to manage message acknowledgments in bulk. That is, you can set the
483 # acknowledgment state of messages in an existing subscription to the state
484 # captured by a snapshot.
485 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
486 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
487 # A newly-created snapshot expires no later than 7 days from the time of its
488 # creation. Its exact lifetime is determined at creation by the existing
489 # backlog in the source subscription. Specifically, the lifetime of the
490 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
491 # For example, consider a subscription whose oldest unacked message is 3 days
492 # old. If a snapshot is created from this subscription, the snapshot -- which
493 # will always capture this 3-day-old backlog as long as the snapshot
494 # exists -- will expire in 4 days. The service will refuse to create a
495 # snapshot that would expire in less than 1 hour after creation.
496 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
497 # managing labels</a>.
498 "a_key": "A String",
499 },
500 "name": "A String", # The name of the snapshot.
501 },
502 "updateMask": "A String", # Indicates which fields in the provided snapshot to update.
503 # Must be specified and non-empty.
504 }
505
506 x__xgafv: string, V1 error format.
507 Allowed values
508 1 - v1 error format
509 2 - v2 error format
510
511Returns:
512 An object of the form:
513
514 { # A snapshot resource. Snapshots are used in
515 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
516 # 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.
520 "topic": "A String", # The name of the topic from which this snapshot is retaining messages.
521 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time.
522 # A newly-created snapshot expires no later than 7 days from the time of its
523 # creation. Its exact lifetime is determined at creation by the existing
524 # backlog in the source subscription. Specifically, the lifetime of the
525 # snapshot is `7 days - (age of oldest unacked message in the subscription)`.
526 # For example, consider a subscription whose oldest unacked message is 3 days
527 # old. If a snapshot is created from this subscription, the snapshot -- which
528 # will always capture this 3-day-old backlog as long as the snapshot
529 # exists -- will expire in 4 days. The service will refuse to create a
530 # snapshot that would expire in less than 1 hour after creation.
531 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
532 # managing labels</a>.
533 "a_key": "A String",
534 },
535 "name": "A String", # The name of the snapshot.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700536 }</pre>
537</div>
538
539<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700540 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800541 <pre>Sets the access control policy on the specified resource. Replaces any
542existing policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700543
544Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800545 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700546See the operation documentation for the appropriate value for this field. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700547 body: object, The request body. (required)
548 The object takes the form of:
549
550{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800551 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
552 # the policy is limited to a few 10s of KB. An empty policy is a
553 # valid policy but certain Cloud Platform services (such as Projects)
554 # might reject them.
555 # specify access control policies for Cloud Platform resources.
556 #
557 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800559 # `members` to a `role`, where the members can be user accounts, Google groups,
560 # Google domains, and service accounts. A `role` is a named list of permissions
561 # defined by IAM.
562 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800564 #
565 # {
566 # "bindings": [
567 # {
568 # "role": "roles/owner",
569 # "members": [
570 # "user:mike@example.com",
571 # "group:admins@example.com",
572 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800574 # ]
575 # },
576 # {
577 # "role": "roles/viewer",
578 # "members": ["user:sean@example.com"]
579 # }
580 # ]
581 # }
582 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 # **YAML Example**
584 #
585 # bindings:
586 # - members:
587 # - user:mike@example.com
588 # - group:admins@example.com
589 # - domain:google.com
590 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
591 # role: roles/owner
592 # - members:
593 # - user:sean@example.com
594 # role: roles/viewer
595 #
596 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800597 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800599 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800600 # `bindings` with no members will result in an error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700601 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800602 "role": "A String", # Role that is assigned to `members`.
603 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800604 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
605 # `members` can have the following values:
606 #
607 # * `allUsers`: A special identifier that represents anyone who is
608 # on the internet; with or without a Google account.
609 #
610 # * `allAuthenticatedUsers`: A special identifier that represents anyone
611 # who is authenticated with a Google account or a service account.
612 #
613 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800615 #
616 #
617 # * `serviceAccount:{emailid}`: An email address that represents a service
618 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
619 #
620 # * `group:{emailid}`: An email address that represents a Google group.
621 # For example, `admins@example.com`.
622 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 #
624 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800625 # users of that domain. For example, `google.com` or `example.com`.
626 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700627 "A String",
628 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
630 # NOTE: An unsatisfied condition will not allow user access via current
631 # binding. Different bindings, including their conditions, are examined
632 # independently.
633 #
634 # title: "User account presence"
635 # description: "Determines whether the request has a user account"
636 # expression: "size(request.user) > 0"
637 "location": "A String", # An optional string indicating the location of the expression for error
638 # reporting, e.g. a file name and a position in the file.
639 "expression": "A String", # Textual representation of an expression in
640 # Common Expression Language syntax.
641 #
642 # The application context of the containing message determines which
643 # well-known feature set of CEL is supported.
644 "description": "A String", # An optional description of the expression. This is a longer text which
645 # describes the expression, e.g. when hovered over it in a UI.
646 "title": "A String", # An optional title for the expression, i.e. a short string describing
647 # its purpose. This can be used e.g. in UIs which allow to enter the
648 # expression.
649 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700650 },
651 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 "version": 42, # Deprecated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800653 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
654 # prevent simultaneous updates of a policy from overwriting each other.
655 # It is strongly suggested that systems make use of the `etag` in the
656 # read-modify-write cycle to perform policy updates in order to avoid race
657 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
658 # systems are expected to put that etag in the request to `setIamPolicy` to
659 # ensure that their change will be applied to the same version of the policy.
660 #
661 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
662 # policy is overwritten blindly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700663 },
664 }
665
666 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800667 Allowed values
668 1 - v1 error format
669 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700670
671Returns:
672 An object of the form:
673
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800674 { # Defines an Identity and Access Management (IAM) policy. It is used to
675 # specify access control policies for Cloud Platform resources.
676 #
677 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700678 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800679 # `members` to a `role`, where the members can be user accounts, Google groups,
680 # Google domains, and service accounts. A `role` is a named list of permissions
681 # defined by IAM.
682 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800684 #
685 # {
686 # "bindings": [
687 # {
688 # "role": "roles/owner",
689 # "members": [
690 # "user:mike@example.com",
691 # "group:admins@example.com",
692 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800694 # ]
695 # },
696 # {
697 # "role": "roles/viewer",
698 # "members": ["user:sean@example.com"]
699 # }
700 # ]
701 # }
702 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 # **YAML Example**
704 #
705 # bindings:
706 # - members:
707 # - user:mike@example.com
708 # - group:admins@example.com
709 # - domain:google.com
710 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
711 # role: roles/owner
712 # - members:
713 # - user:sean@example.com
714 # role: roles/viewer
715 #
716 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800717 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800719 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800720 # `bindings` with no members will result in an error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700721 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800722 "role": "A String", # Role that is assigned to `members`.
723 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800724 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
725 # `members` can have the following values:
726 #
727 # * `allUsers`: A special identifier that represents anyone who is
728 # on the internet; with or without a Google account.
729 #
730 # * `allAuthenticatedUsers`: A special identifier that represents anyone
731 # who is authenticated with a Google account or a service account.
732 #
733 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800735 #
736 #
737 # * `serviceAccount:{emailid}`: An email address that represents a service
738 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
739 #
740 # * `group:{emailid}`: An email address that represents a Google group.
741 # For example, `admins@example.com`.
742 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743 #
744 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800745 # users of that domain. For example, `google.com` or `example.com`.
746 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700747 "A String",
748 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
750 # NOTE: An unsatisfied condition will not allow user access via current
751 # binding. Different bindings, including their conditions, are examined
752 # independently.
753 #
754 # title: "User account presence"
755 # description: "Determines whether the request has a user account"
756 # expression: "size(request.user) > 0"
757 "location": "A String", # An optional string indicating the location of the expression for error
758 # reporting, e.g. a file name and a position in the file.
759 "expression": "A String", # Textual representation of an expression in
760 # Common Expression Language syntax.
761 #
762 # The application context of the containing message determines which
763 # well-known feature set of CEL is supported.
764 "description": "A String", # An optional description of the expression. This is a longer text which
765 # describes the expression, e.g. when hovered over it in a UI.
766 "title": "A String", # An optional title for the expression, i.e. a short string describing
767 # its purpose. This can be used e.g. in UIs which allow to enter the
768 # expression.
769 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700770 },
771 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700772 "version": 42, # Deprecated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800773 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
774 # prevent simultaneous updates of a policy from overwriting each other.
775 # It is strongly suggested that systems make use of the `etag` in the
776 # read-modify-write cycle to perform policy updates in order to avoid race
777 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
778 # systems are expected to put that etag in the request to `setIamPolicy` to
779 # ensure that their change will be applied to the same version of the policy.
780 #
781 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
782 # policy is overwritten blindly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700783 }</pre>
784</div>
785
786<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700787 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700788 <pre>Returns permissions that a caller has on the specified resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800789If the resource does not exist, this will return an empty set of
790permissions, not a NOT_FOUND error.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700791
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400792Note: This operation is designed to be used for building permission-aware
793UIs and command-line tools, not for authorization checking. This operation
794may "fail open" without warning.
795
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700796Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800797 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700798See the operation documentation for the appropriate value for this field. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700799 body: object, The request body. (required)
800 The object takes the form of:
801
802{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800803 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
804 # wildcards (such as '*' or 'storage.*') are not allowed. For more
805 # information see
806 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700807 "A String",
808 ],
809 }
810
811 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800812 Allowed values
813 1 - v1 error format
814 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700815
816Returns:
817 An object of the form:
818
819 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800820 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
821 # allowed.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700822 "A String",
823 ],
824 }</pre>
825</div>
826
827</body></html>