blob: af4f04ac8794fcfe9306747211c62095e04577d8 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -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
75<h1><a href="spanner_v1.html">Cloud Spanner API</a> . <a href="spanner_v1.projects.html">projects</a> . <a href="spanner_v1.projects.instances.html">instances</a> . <a href="spanner_v1.projects.instances.backups.html">backups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="spanner_v1.projects.instances.backups.operations.html">operations()</a></code>
79</p>
80<p class="firstline">Returns the operations Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#create">create(parent, body=None, backupId=None, x__xgafv=None)</a></code></p>
84<p class="firstline">Starts creating a new Cloud Spanner Backup.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes a pending or completed Backup.</p>
88<p class="toc_element">
89 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
90<p class="firstline">Gets metadata on a pending or completed Backup.</p>
91<p class="toc_element">
92 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets the access control policy for a database or backup resource.</p>
94<p class="toc_element">
95 <code><a href="#list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</a></code></p>
96<p class="firstline">Lists completed and pending backups.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
101 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
102<p class="firstline">Updates a pending or completed Backup.</p>
103<p class="toc_element">
104 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
105<p class="firstline">Sets the access control policy on a database or backup resource.</p>
106<p class="toc_element">
107 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
108<p class="firstline">Returns permissions that the caller has on the specified database or backup</p>
109<h3>Method Details</h3>
110<div class="method">
111 <code class="details" id="create">create(parent, body=None, backupId=None, x__xgafv=None)</code>
112 <pre>Starts creating a new Cloud Spanner Backup.
113The returned backup long-running operation
114will have a name of the format
115`projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/&lt;backup&gt;/operations/&lt;operation_id&gt;`
116and can be used to track creation of the backup. The
117metadata field type is
118CreateBackupMetadata. The
119response field type is
120Backup, if successful. Cancelling the returned operation will stop the
121creation and delete the backup.
122There can be only one pending backup creation per database. Backup creation
123of different databases can run concurrently.
124
125Args:
126 parent: string, Required. The name of the instance in which the backup will be
127created. This must be the same instance that contains the database the
128backup will be created from. The backup will be stored in the
129location(s) specified in the instance configuration of this
130instance. Values are of the form
131`projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
132 body: object, The request body.
133 The object takes the form of:
134
135{ # A backup of a Cloud Spanner database.
136 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
137 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
138 # The database names are of
139 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
140 # Referencing databases may exist in different instances. The existence of
141 # any referencing database prevents the backup from being deleted. When a
142 # restored database from the backup enters the `READY` state, the reference
143 # to the backup is removed.
144 &quot;A String&quot;,
145 ],
146 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
147 # Name of the database from which this backup was
148 # created. This needs to be in the same instance as the backup.
149 # Values are of the form
150 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
151 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
152 # copy of the database at the timestamp specified by
153 # `create_time`. `create_time` is approximately the time the
154 # CreateBackup request is received.
155 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
156 # operation. The expiration time of the backup, with microseconds
157 # granularity that must be at least 6 hours and at most 366 days
158 # from the time the CreateBackup request is processed. Once the `expire_time`
159 # has passed, the backup is eligible to be automatically deleted by Cloud
160 # Spanner to free the resources used by the backup.
161 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
162 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
163 # Required for the UpdateBackup operation.
164 #
165 # A globally unique identifier for the backup which cannot be
166 # changed. Values are of the form
167 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
168 # The final segment of the name must be between 2 and 60 characters
169 # in length.
170 #
171 # The backup is stored in the location(s) specified in the instance
172 # configuration of the instance containing the backup, identified
173 # by the prefix of the backup name of the form
174 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
175}
176
177 backupId: string, Required. The id of the backup to be created. The `backup_id` appended to
178`parent` forms the full backup name of the form
179`projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/&lt;backup_id&gt;`.
180 x__xgafv: string, V1 error format.
181 Allowed values
182 1 - v1 error format
183 2 - v2 error format
184
185Returns:
186 An object of the form:
187
188 { # This resource represents a long-running operation that is the result of a
189 # network API call.
190 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
191 # If `true`, the operation is completed, and either `error` or `response` is
192 # available.
193 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
194 # method returns no data on success, such as `Delete`, the response is
195 # `google.protobuf.Empty`. If the original method is standard
196 # `Get`/`Create`/`Update`, the response should be the resource. For other
197 # methods, the response should have the type `XxxResponse`, where `Xxx`
198 # is the original method name. For example, if the original method name
199 # is `TakeSnapshot()`, the inferred response type is
200 # `TakeSnapshotResponse`.
201 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
202 },
203 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
204 # originally returns it. If you use the default HTTP mapping, the
205 # `name` should be a resource name ending with `operations/{unique_id}`.
206 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
207 # different programming environments, including REST APIs and RPC APIs. It is
208 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
209 # three pieces of data: error code, error message, and error details.
210 #
211 # You can find out more about this error model and how to work with it in the
212 # [API Design Guide](https://cloud.google.com/apis/design/errors).
213 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
214 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
215 # user-facing error message should be localized and sent in the
216 # google.rpc.Status.details field, or localized by the client.
217 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
218 # message types for APIs to use.
219 {
220 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
221 },
222 ],
223 },
224 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
225 # contains progress information and common metadata such as create time.
226 # Some services might not provide such metadata. Any method that returns a
227 # long-running operation should document the metadata type, if any.
228 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
229 },
230 }</pre>
231</div>
232
233<div class="method">
234 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
235 <pre>Deletes a pending or completed Backup.
236
237Args:
238 name: string, Required. Name of the backup to delete.
239Values are of the form
240`projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/&lt;backup&gt;`. (required)
241 x__xgafv: string, V1 error format.
242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
245
246Returns:
247 An object of the form:
248
249 { # A generic empty message that you can re-use to avoid defining duplicated
250 # empty messages in your APIs. A typical example is to use it as the request
251 # or the response type of an API method. For instance:
252 #
253 # service Foo {
254 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
255 # }
256 #
257 # The JSON representation for `Empty` is empty JSON object `{}`.
258 }</pre>
259</div>
260
261<div class="method">
262 <code class="details" id="get">get(name, x__xgafv=None)</code>
263 <pre>Gets metadata on a pending or completed Backup.
264
265Args:
266 name: string, Required. Name of the backup.
267Values are of the form
268`projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/&lt;backup&gt;`. (required)
269 x__xgafv: string, V1 error format.
270 Allowed values
271 1 - v1 error format
272 2 - v2 error format
273
274Returns:
275 An object of the form:
276
277 { # A backup of a Cloud Spanner database.
278 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
279 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
280 # The database names are of
281 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
282 # Referencing databases may exist in different instances. The existence of
283 # any referencing database prevents the backup from being deleted. When a
284 # restored database from the backup enters the `READY` state, the reference
285 # to the backup is removed.
286 &quot;A String&quot;,
287 ],
288 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
289 # Name of the database from which this backup was
290 # created. This needs to be in the same instance as the backup.
291 # Values are of the form
292 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
293 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
294 # copy of the database at the timestamp specified by
295 # `create_time`. `create_time` is approximately the time the
296 # CreateBackup request is received.
297 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
298 # operation. The expiration time of the backup, with microseconds
299 # granularity that must be at least 6 hours and at most 366 days
300 # from the time the CreateBackup request is processed. Once the `expire_time`
301 # has passed, the backup is eligible to be automatically deleted by Cloud
302 # Spanner to free the resources used by the backup.
303 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
304 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
305 # Required for the UpdateBackup operation.
306 #
307 # A globally unique identifier for the backup which cannot be
308 # changed. Values are of the form
309 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
310 # The final segment of the name must be between 2 and 60 characters
311 # in length.
312 #
313 # The backup is stored in the location(s) specified in the instance
314 # configuration of the instance containing the backup, identified
315 # by the prefix of the backup name of the form
316 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
317 }</pre>
318</div>
319
320<div class="method">
321 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
322 <pre>Gets the access control policy for a database or backup resource.
323Returns an empty policy if a database or backup exists but does not have a
324policy set.
325
326Authorization requires `spanner.databases.getIamPolicy` permission on
327resource.
328For backups, authorization requires `spanner.backups.getIamPolicy`
329permission on resource.
330
331Args:
332 resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;` for instance resources and `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;/databases/&lt;database ID&gt;` for database resources. (required)
333 body: object, The request body.
334 The object takes the form of:
335
336{ # Request message for `GetIamPolicy` method.
337 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
338 # `GetIamPolicy`.
339 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
340 #
341 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
342 # rejected.
343 #
344 # Requests for policies with any conditional bindings must specify version 3.
345 # Policies without any conditional bindings may specify any valid value or
346 # leave the field unset.
347 },
348 }
349
350 x__xgafv: string, V1 error format.
351 Allowed values
352 1 - v1 error format
353 2 - v2 error format
354
355Returns:
356 An object of the form:
357
358 { # An Identity and Access Management (IAM) policy, which specifies access
359 # controls for Google Cloud resources.
360 #
361 #
362 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
363 # `members` to a single `role`. Members can be user accounts, service accounts,
364 # Google groups, and domains (such as G Suite). A `role` is a named list of
365 # permissions; each `role` can be an IAM predefined role or a user-created
366 # custom role.
367 #
368 # Optionally, a `binding` can specify a `condition`, which is a logical
369 # expression that allows access to a resource only if the expression evaluates
370 # to `true`. A condition can add constraints based on attributes of the
371 # request, the resource, or both.
372 #
373 # **JSON example:**
374 #
375 # {
376 # &quot;bindings&quot;: [
377 # {
378 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
379 # &quot;members&quot;: [
380 # &quot;user:mike@example.com&quot;,
381 # &quot;group:admins@example.com&quot;,
382 # &quot;domain:google.com&quot;,
383 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
384 # ]
385 # },
386 # {
387 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
388 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
389 # &quot;condition&quot;: {
390 # &quot;title&quot;: &quot;expirable access&quot;,
391 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
392 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
393 # }
394 # }
395 # ],
396 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
397 # &quot;version&quot;: 3
398 # }
399 #
400 # **YAML example:**
401 #
402 # bindings:
403 # - members:
404 # - user:mike@example.com
405 # - group:admins@example.com
406 # - domain:google.com
407 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
408 # role: roles/resourcemanager.organizationAdmin
409 # - members:
410 # - user:eve@example.com
411 # role: roles/resourcemanager.organizationViewer
412 # condition:
413 # title: expirable access
414 # description: Does not grant access after Sep 2020
415 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
416 # - etag: BwWWja0YfJA=
417 # - version: 3
418 #
419 # For a description of IAM and its features, see the
420 # [IAM documentation](https://cloud.google.com/iam/docs/).
421 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
422 # prevent simultaneous updates of a policy from overwriting each other.
423 # It is strongly suggested that systems make use of the `etag` in the
424 # read-modify-write cycle to perform policy updates in order to avoid race
425 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
426 # systems are expected to put that etag in the request to `setIamPolicy` to
427 # ensure that their change will be applied to the same version of the policy.
428 #
429 # **Important:** If you use IAM Conditions, you must include the `etag` field
430 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
431 # you to overwrite a version `3` policy with a version `1` policy, and all of
432 # the conditions in the version `3` policy are lost.
433 &quot;version&quot;: 42, # Specifies the format of the policy.
434 #
435 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
436 # are rejected.
437 #
438 # Any operation that affects conditional role bindings must specify version
439 # `3`. This requirement applies to the following operations:
440 #
441 # * Getting a policy that includes a conditional role binding
442 # * Adding a conditional role binding to a policy
443 # * Changing a conditional role binding in a policy
444 # * Removing any role binding, with or without a condition, from a policy
445 # that includes conditions
446 #
447 # **Important:** If you use IAM Conditions, you must include the `etag` field
448 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
449 # you to overwrite a version `3` policy with a version `1` policy, and all of
450 # the conditions in the version `3` policy are lost.
451 #
452 # If a policy does not include any conditions, operations on that policy may
453 # specify any valid version or leave the field unset.
454 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
455 # `condition` that determines how and when the `bindings` are applied. Each
456 # of the `bindings` must contain at least one member.
457 { # Associates `members` with a `role`.
458 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
459 # NOTE: An unsatisfied condition will not allow user access via current
460 # binding. Different bindings, including their conditions, are examined
461 # independently.
462 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
463 # are documented at https://github.com/google/cel-spec.
464 #
465 # Example (Comparison):
466 #
467 # title: &quot;Summary size limit&quot;
468 # description: &quot;Determines if a summary is less than 100 chars&quot;
469 # expression: &quot;document.summary.size() &lt; 100&quot;
470 #
471 # Example (Equality):
472 #
473 # title: &quot;Requestor is owner&quot;
474 # description: &quot;Determines if requestor is the document owner&quot;
475 # expression: &quot;document.owner == request.auth.claims.email&quot;
476 #
477 # Example (Logic):
478 #
479 # title: &quot;Public documents&quot;
480 # description: &quot;Determine whether the document should be publicly visible&quot;
481 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
482 #
483 # Example (Data Manipulation):
484 #
485 # title: &quot;Notification string&quot;
486 # description: &quot;Create a notification string with a timestamp.&quot;
487 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
488 #
489 # The exact variables and functions that may be referenced within an expression
490 # are determined by the service that evaluates it. See the service
491 # documentation for additional information.
492 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
493 # reporting, e.g. a file name and a position in the file.
494 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
495 # its purpose. This can be used e.g. in UIs which allow to enter the
496 # expression.
497 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
498 # describes the expression, e.g. when hovered over it in a UI.
499 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
500 # syntax.
501 },
502 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
503 # `members` can have the following values:
504 #
505 # * `allUsers`: A special identifier that represents anyone who is
506 # on the internet; with or without a Google account.
507 #
508 # * `allAuthenticatedUsers`: A special identifier that represents anyone
509 # who is authenticated with a Google account or a service account.
510 #
511 # * `user:{emailid}`: An email address that represents a specific Google
512 # account. For example, `alice@example.com` .
513 #
514 #
515 # * `serviceAccount:{emailid}`: An email address that represents a service
516 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
517 #
518 # * `group:{emailid}`: An email address that represents a Google group.
519 # For example, `admins@example.com`.
520 #
521 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
522 # identifier) representing a user that has been recently deleted. For
523 # example, `alice@example.com?uid=123456789012345678901`. If the user is
524 # recovered, this value reverts to `user:{emailid}` and the recovered user
525 # retains the role in the binding.
526 #
527 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
528 # unique identifier) representing a service account that has been recently
529 # deleted. For example,
530 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
531 # If the service account is undeleted, this value reverts to
532 # `serviceAccount:{emailid}` and the undeleted service account retains the
533 # role in the binding.
534 #
535 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
536 # identifier) representing a Google group that has been recently
537 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
538 # the group is recovered, this value reverts to `group:{emailid}` and the
539 # recovered group retains the role in the binding.
540 #
541 #
542 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
543 # users of that domain. For example, `google.com` or `example.com`.
544 #
545 &quot;A String&quot;,
546 ],
547 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
548 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
549 },
550 ],
551 }</pre>
552</div>
553
554<div class="method">
555 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</code>
556 <pre>Lists completed and pending backups.
557Backups returned are ordered by `create_time` in descending order,
558starting from the most recent `create_time`.
559
560Args:
561 parent: string, Required. The instance to list backups from. Values are of the
562form `projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
563 pageToken: string, If non-empty, `page_token` should contain a
564next_page_token from a
565previous ListBackupsResponse to the same `parent` and with the same
566`filter`.
567 pageSize: integer, Number of backups to be returned in the response. If 0 or
568less, defaults to the server&#x27;s maximum allowed page size.
569 filter: string, An expression that filters the list of returned backups.
570
571A filter expression consists of a field name, a comparison operator, and a
572value for filtering.
573The value must be a string, a number, or a boolean. The comparison operator
574must be one of: `&lt;`, `&gt;`, `&lt;=`, `&gt;=`, `!=`, `=`, or `:`.
575Colon `:` is the contains operator. Filter rules are not case sensitive.
576
577The following fields in the Backup are eligible for filtering:
578
579 * `name`
580 * `database`
581 * `state`
582 * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
583 * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
584 * `size_bytes`
585
586You can combine multiple expressions by enclosing each expression in
587parentheses. By default, expressions are combined with AND logic, but
588you can specify AND, OR, and NOT logic explicitly.
589
590Here are a few examples:
591
592 * `name:Howl` - The backup&#x27;s name contains the string &quot;howl&quot;.
593 * `database:prod`
594 - The database&#x27;s name contains the string &quot;prod&quot;.
595 * `state:CREATING` - The backup is pending creation.
596 * `state:READY` - The backup is fully created and ready for use.
597 * `(name:howl) AND (create_time &lt; \&quot;2018-03-28T14:50:00Z\&quot;)`
598 - The backup name contains the string &quot;howl&quot; and `create_time`
599 of the backup is before 2018-03-28T14:50:00Z.
600 * `expire_time &lt; \&quot;2018-03-28T14:50:00Z\&quot;`
601 - The backup `expire_time` is before 2018-03-28T14:50:00Z.
602 * `size_bytes &gt; 10000000000` - The backup&#x27;s size is greater than 10GB
603 x__xgafv: string, V1 error format.
604 Allowed values
605 1 - v1 error format
606 2 - v2 error format
607
608Returns:
609 An object of the form:
610
611 { # The response for ListBackups.
612 &quot;backups&quot;: [ # The list of matching backups. Backups returned are ordered by `create_time`
613 # in descending order, starting from the most recent `create_time`.
614 { # A backup of a Cloud Spanner database.
615 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
616 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
617 # The database names are of
618 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
619 # Referencing databases may exist in different instances. The existence of
620 # any referencing database prevents the backup from being deleted. When a
621 # restored database from the backup enters the `READY` state, the reference
622 # to the backup is removed.
623 &quot;A String&quot;,
624 ],
625 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
626 # Name of the database from which this backup was
627 # created. This needs to be in the same instance as the backup.
628 # Values are of the form
629 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
630 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
631 # copy of the database at the timestamp specified by
632 # `create_time`. `create_time` is approximately the time the
633 # CreateBackup request is received.
634 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
635 # operation. The expiration time of the backup, with microseconds
636 # granularity that must be at least 6 hours and at most 366 days
637 # from the time the CreateBackup request is processed. Once the `expire_time`
638 # has passed, the backup is eligible to be automatically deleted by Cloud
639 # Spanner to free the resources used by the backup.
640 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
641 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
642 # Required for the UpdateBackup operation.
643 #
644 # A globally unique identifier for the backup which cannot be
645 # changed. Values are of the form
646 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
647 # The final segment of the name must be between 2 and 60 characters
648 # in length.
649 #
650 # The backup is stored in the location(s) specified in the instance
651 # configuration of the instance containing the backup, identified
652 # by the prefix of the backup name of the form
653 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
654 },
655 ],
656 &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent
657 # ListBackups call to fetch more
658 # of the matching backups.
659 }</pre>
660</div>
661
662<div class="method">
663 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
664 <pre>Retrieves the next page of results.
665
666Args:
667 previous_request: The request for the previous page. (required)
668 previous_response: The response from the request for the previous page. (required)
669
670Returns:
671 A request object that you can call &#x27;execute()&#x27; on to request the next
672 page. Returns None if there are no more items in the collection.
673 </pre>
674</div>
675
676<div class="method">
677 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
678 <pre>Updates a pending or completed Backup.
679
680Args:
681 name: string, Output only for the CreateBackup operation.
682Required for the UpdateBackup operation.
683
684A globally unique identifier for the backup which cannot be
685changed. Values are of the form
686`projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
687The final segment of the name must be between 2 and 60 characters
688in length.
689
690The backup is stored in the location(s) specified in the instance
691configuration of the instance containing the backup, identified
692by the prefix of the backup name of the form
693`projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
694 body: object, The request body.
695 The object takes the form of:
696
697{ # A backup of a Cloud Spanner database.
698 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
699 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
700 # The database names are of
701 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
702 # Referencing databases may exist in different instances. The existence of
703 # any referencing database prevents the backup from being deleted. When a
704 # restored database from the backup enters the `READY` state, the reference
705 # to the backup is removed.
706 &quot;A String&quot;,
707 ],
708 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
709 # Name of the database from which this backup was
710 # created. This needs to be in the same instance as the backup.
711 # Values are of the form
712 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
713 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
714 # copy of the database at the timestamp specified by
715 # `create_time`. `create_time` is approximately the time the
716 # CreateBackup request is received.
717 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
718 # operation. The expiration time of the backup, with microseconds
719 # granularity that must be at least 6 hours and at most 366 days
720 # from the time the CreateBackup request is processed. Once the `expire_time`
721 # has passed, the backup is eligible to be automatically deleted by Cloud
722 # Spanner to free the resources used by the backup.
723 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
724 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
725 # Required for the UpdateBackup operation.
726 #
727 # A globally unique identifier for the backup which cannot be
728 # changed. Values are of the form
729 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
730 # The final segment of the name must be between 2 and 60 characters
731 # in length.
732 #
733 # The backup is stored in the location(s) specified in the instance
734 # configuration of the instance containing the backup, identified
735 # by the prefix of the backup name of the form
736 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
737}
738
739 updateMask: string, Required. A mask specifying which fields (e.g. `expire_time`) in the
740Backup resource should be updated. This mask is relative to the Backup
741resource, not to the request message. The field mask must always be
742specified; this prevents any future fields from being erased accidentally
743by clients that do not know about them.
744 x__xgafv: string, V1 error format.
745 Allowed values
746 1 - v1 error format
747 2 - v2 error format
748
749Returns:
750 An object of the form:
751
752 { # A backup of a Cloud Spanner database.
753 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
754 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
755 # The database names are of
756 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
757 # Referencing databases may exist in different instances. The existence of
758 # any referencing database prevents the backup from being deleted. When a
759 # restored database from the backup enters the `READY` state, the reference
760 # to the backup is removed.
761 &quot;A String&quot;,
762 ],
763 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
764 # Name of the database from which this backup was
765 # created. This needs to be in the same instance as the backup.
766 # Values are of the form
767 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
768 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
769 # copy of the database at the timestamp specified by
770 # `create_time`. `create_time` is approximately the time the
771 # CreateBackup request is received.
772 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
773 # operation. The expiration time of the backup, with microseconds
774 # granularity that must be at least 6 hours and at most 366 days
775 # from the time the CreateBackup request is processed. Once the `expire_time`
776 # has passed, the backup is eligible to be automatically deleted by Cloud
777 # Spanner to free the resources used by the backup.
778 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
779 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
780 # Required for the UpdateBackup operation.
781 #
782 # A globally unique identifier for the backup which cannot be
783 # changed. Values are of the form
784 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
785 # The final segment of the name must be between 2 and 60 characters
786 # in length.
787 #
788 # The backup is stored in the location(s) specified in the instance
789 # configuration of the instance containing the backup, identified
790 # by the prefix of the backup name of the form
791 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
792 }</pre>
793</div>
794
795<div class="method">
796 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
797 <pre>Sets the access control policy on a database or backup resource.
798Replaces any existing policy.
799
800Authorization requires `spanner.databases.setIamPolicy`
801permission on resource.
802For backups, authorization requires `spanner.backups.setIamPolicy`
803permission on resource.
804
805Args:
806 resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;` for instance resources and `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;/databases/&lt;database ID&gt;` for databases resources. (required)
807 body: object, The request body.
808 The object takes the form of:
809
810{ # Request message for `SetIamPolicy` method.
811 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
812 # the policy is limited to a few 10s of KB. An empty policy is a
813 # valid policy but certain Cloud Platform services (such as Projects)
814 # might reject them.
815 # controls for Google Cloud resources.
816 #
817 #
818 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
819 # `members` to a single `role`. Members can be user accounts, service accounts,
820 # Google groups, and domains (such as G Suite). A `role` is a named list of
821 # permissions; each `role` can be an IAM predefined role or a user-created
822 # custom role.
823 #
824 # Optionally, a `binding` can specify a `condition`, which is a logical
825 # expression that allows access to a resource only if the expression evaluates
826 # to `true`. A condition can add constraints based on attributes of the
827 # request, the resource, or both.
828 #
829 # **JSON example:**
830 #
831 # {
832 # &quot;bindings&quot;: [
833 # {
834 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
835 # &quot;members&quot;: [
836 # &quot;user:mike@example.com&quot;,
837 # &quot;group:admins@example.com&quot;,
838 # &quot;domain:google.com&quot;,
839 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
840 # ]
841 # },
842 # {
843 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
844 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
845 # &quot;condition&quot;: {
846 # &quot;title&quot;: &quot;expirable access&quot;,
847 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
848 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
849 # }
850 # }
851 # ],
852 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
853 # &quot;version&quot;: 3
854 # }
855 #
856 # **YAML example:**
857 #
858 # bindings:
859 # - members:
860 # - user:mike@example.com
861 # - group:admins@example.com
862 # - domain:google.com
863 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
864 # role: roles/resourcemanager.organizationAdmin
865 # - members:
866 # - user:eve@example.com
867 # role: roles/resourcemanager.organizationViewer
868 # condition:
869 # title: expirable access
870 # description: Does not grant access after Sep 2020
871 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
872 # - etag: BwWWja0YfJA=
873 # - version: 3
874 #
875 # For a description of IAM and its features, see the
876 # [IAM documentation](https://cloud.google.com/iam/docs/).
877 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
878 # prevent simultaneous updates of a policy from overwriting each other.
879 # It is strongly suggested that systems make use of the `etag` in the
880 # read-modify-write cycle to perform policy updates in order to avoid race
881 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
882 # systems are expected to put that etag in the request to `setIamPolicy` to
883 # ensure that their change will be applied to the same version of the policy.
884 #
885 # **Important:** If you use IAM Conditions, you must include the `etag` field
886 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
887 # you to overwrite a version `3` policy with a version `1` policy, and all of
888 # the conditions in the version `3` policy are lost.
889 &quot;version&quot;: 42, # Specifies the format of the policy.
890 #
891 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
892 # are rejected.
893 #
894 # Any operation that affects conditional role bindings must specify version
895 # `3`. This requirement applies to the following operations:
896 #
897 # * Getting a policy that includes a conditional role binding
898 # * Adding a conditional role binding to a policy
899 # * Changing a conditional role binding in a policy
900 # * Removing any role binding, with or without a condition, from a policy
901 # that includes conditions
902 #
903 # **Important:** If you use IAM Conditions, you must include the `etag` field
904 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
905 # you to overwrite a version `3` policy with a version `1` policy, and all of
906 # the conditions in the version `3` policy are lost.
907 #
908 # If a policy does not include any conditions, operations on that policy may
909 # specify any valid version or leave the field unset.
910 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
911 # `condition` that determines how and when the `bindings` are applied. Each
912 # of the `bindings` must contain at least one member.
913 { # Associates `members` with a `role`.
914 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
915 # NOTE: An unsatisfied condition will not allow user access via current
916 # binding. Different bindings, including their conditions, are examined
917 # independently.
918 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
919 # are documented at https://github.com/google/cel-spec.
920 #
921 # Example (Comparison):
922 #
923 # title: &quot;Summary size limit&quot;
924 # description: &quot;Determines if a summary is less than 100 chars&quot;
925 # expression: &quot;document.summary.size() &lt; 100&quot;
926 #
927 # Example (Equality):
928 #
929 # title: &quot;Requestor is owner&quot;
930 # description: &quot;Determines if requestor is the document owner&quot;
931 # expression: &quot;document.owner == request.auth.claims.email&quot;
932 #
933 # Example (Logic):
934 #
935 # title: &quot;Public documents&quot;
936 # description: &quot;Determine whether the document should be publicly visible&quot;
937 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
938 #
939 # Example (Data Manipulation):
940 #
941 # title: &quot;Notification string&quot;
942 # description: &quot;Create a notification string with a timestamp.&quot;
943 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
944 #
945 # The exact variables and functions that may be referenced within an expression
946 # are determined by the service that evaluates it. See the service
947 # documentation for additional information.
948 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
949 # reporting, e.g. a file name and a position in the file.
950 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
951 # its purpose. This can be used e.g. in UIs which allow to enter the
952 # expression.
953 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
954 # describes the expression, e.g. when hovered over it in a UI.
955 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
956 # syntax.
957 },
958 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
959 # `members` can have the following values:
960 #
961 # * `allUsers`: A special identifier that represents anyone who is
962 # on the internet; with or without a Google account.
963 #
964 # * `allAuthenticatedUsers`: A special identifier that represents anyone
965 # who is authenticated with a Google account or a service account.
966 #
967 # * `user:{emailid}`: An email address that represents a specific Google
968 # account. For example, `alice@example.com` .
969 #
970 #
971 # * `serviceAccount:{emailid}`: An email address that represents a service
972 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
973 #
974 # * `group:{emailid}`: An email address that represents a Google group.
975 # For example, `admins@example.com`.
976 #
977 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
978 # identifier) representing a user that has been recently deleted. For
979 # example, `alice@example.com?uid=123456789012345678901`. If the user is
980 # recovered, this value reverts to `user:{emailid}` and the recovered user
981 # retains the role in the binding.
982 #
983 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
984 # unique identifier) representing a service account that has been recently
985 # deleted. For example,
986 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
987 # If the service account is undeleted, this value reverts to
988 # `serviceAccount:{emailid}` and the undeleted service account retains the
989 # role in the binding.
990 #
991 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
992 # identifier) representing a Google group that has been recently
993 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
994 # the group is recovered, this value reverts to `group:{emailid}` and the
995 # recovered group retains the role in the binding.
996 #
997 #
998 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
999 # users of that domain. For example, `google.com` or `example.com`.
1000 #
1001 &quot;A String&quot;,
1002 ],
1003 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1004 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1005 },
1006 ],
1007 },
1008 }
1009
1010 x__xgafv: string, V1 error format.
1011 Allowed values
1012 1 - v1 error format
1013 2 - v2 error format
1014
1015Returns:
1016 An object of the form:
1017
1018 { # An Identity and Access Management (IAM) policy, which specifies access
1019 # controls for Google Cloud resources.
1020 #
1021 #
1022 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1023 # `members` to a single `role`. Members can be user accounts, service accounts,
1024 # Google groups, and domains (such as G Suite). A `role` is a named list of
1025 # permissions; each `role` can be an IAM predefined role or a user-created
1026 # custom role.
1027 #
1028 # Optionally, a `binding` can specify a `condition`, which is a logical
1029 # expression that allows access to a resource only if the expression evaluates
1030 # to `true`. A condition can add constraints based on attributes of the
1031 # request, the resource, or both.
1032 #
1033 # **JSON example:**
1034 #
1035 # {
1036 # &quot;bindings&quot;: [
1037 # {
1038 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1039 # &quot;members&quot;: [
1040 # &quot;user:mike@example.com&quot;,
1041 # &quot;group:admins@example.com&quot;,
1042 # &quot;domain:google.com&quot;,
1043 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
1044 # ]
1045 # },
1046 # {
1047 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1048 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
1049 # &quot;condition&quot;: {
1050 # &quot;title&quot;: &quot;expirable access&quot;,
1051 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1052 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
1053 # }
1054 # }
1055 # ],
1056 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1057 # &quot;version&quot;: 3
1058 # }
1059 #
1060 # **YAML example:**
1061 #
1062 # bindings:
1063 # - members:
1064 # - user:mike@example.com
1065 # - group:admins@example.com
1066 # - domain:google.com
1067 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1068 # role: roles/resourcemanager.organizationAdmin
1069 # - members:
1070 # - user:eve@example.com
1071 # role: roles/resourcemanager.organizationViewer
1072 # condition:
1073 # title: expirable access
1074 # description: Does not grant access after Sep 2020
1075 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
1076 # - etag: BwWWja0YfJA=
1077 # - version: 3
1078 #
1079 # For a description of IAM and its features, see the
1080 # [IAM documentation](https://cloud.google.com/iam/docs/).
1081 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1082 # prevent simultaneous updates of a policy from overwriting each other.
1083 # It is strongly suggested that systems make use of the `etag` in the
1084 # read-modify-write cycle to perform policy updates in order to avoid race
1085 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1086 # systems are expected to put that etag in the request to `setIamPolicy` to
1087 # ensure that their change will be applied to the same version of the policy.
1088 #
1089 # **Important:** If you use IAM Conditions, you must include the `etag` field
1090 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1091 # you to overwrite a version `3` policy with a version `1` policy, and all of
1092 # the conditions in the version `3` policy are lost.
1093 &quot;version&quot;: 42, # Specifies the format of the policy.
1094 #
1095 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1096 # are rejected.
1097 #
1098 # Any operation that affects conditional role bindings must specify version
1099 # `3`. This requirement applies to the following operations:
1100 #
1101 # * Getting a policy that includes a conditional role binding
1102 # * Adding a conditional role binding to a policy
1103 # * Changing a conditional role binding in a policy
1104 # * Removing any role binding, with or without a condition, from a policy
1105 # that includes conditions
1106 #
1107 # **Important:** If you use IAM Conditions, you must include the `etag` field
1108 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1109 # you to overwrite a version `3` policy with a version `1` policy, and all of
1110 # the conditions in the version `3` policy are lost.
1111 #
1112 # If a policy does not include any conditions, operations on that policy may
1113 # specify any valid version or leave the field unset.
1114 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
1115 # `condition` that determines how and when the `bindings` are applied. Each
1116 # of the `bindings` must contain at least one member.
1117 { # Associates `members` with a `role`.
1118 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1119 # NOTE: An unsatisfied condition will not allow user access via current
1120 # binding. Different bindings, including their conditions, are examined
1121 # independently.
1122 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1123 # are documented at https://github.com/google/cel-spec.
1124 #
1125 # Example (Comparison):
1126 #
1127 # title: &quot;Summary size limit&quot;
1128 # description: &quot;Determines if a summary is less than 100 chars&quot;
1129 # expression: &quot;document.summary.size() &lt; 100&quot;
1130 #
1131 # Example (Equality):
1132 #
1133 # title: &quot;Requestor is owner&quot;
1134 # description: &quot;Determines if requestor is the document owner&quot;
1135 # expression: &quot;document.owner == request.auth.claims.email&quot;
1136 #
1137 # Example (Logic):
1138 #
1139 # title: &quot;Public documents&quot;
1140 # description: &quot;Determine whether the document should be publicly visible&quot;
1141 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1142 #
1143 # Example (Data Manipulation):
1144 #
1145 # title: &quot;Notification string&quot;
1146 # description: &quot;Create a notification string with a timestamp.&quot;
1147 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1148 #
1149 # The exact variables and functions that may be referenced within an expression
1150 # are determined by the service that evaluates it. See the service
1151 # documentation for additional information.
1152 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1153 # reporting, e.g. a file name and a position in the file.
1154 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1155 # its purpose. This can be used e.g. in UIs which allow to enter the
1156 # expression.
1157 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1158 # describes the expression, e.g. when hovered over it in a UI.
1159 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1160 # syntax.
1161 },
1162 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1163 # `members` can have the following values:
1164 #
1165 # * `allUsers`: A special identifier that represents anyone who is
1166 # on the internet; with or without a Google account.
1167 #
1168 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1169 # who is authenticated with a Google account or a service account.
1170 #
1171 # * `user:{emailid}`: An email address that represents a specific Google
1172 # account. For example, `alice@example.com` .
1173 #
1174 #
1175 # * `serviceAccount:{emailid}`: An email address that represents a service
1176 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1177 #
1178 # * `group:{emailid}`: An email address that represents a Google group.
1179 # For example, `admins@example.com`.
1180 #
1181 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1182 # identifier) representing a user that has been recently deleted. For
1183 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1184 # recovered, this value reverts to `user:{emailid}` and the recovered user
1185 # retains the role in the binding.
1186 #
1187 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1188 # unique identifier) representing a service account that has been recently
1189 # deleted. For example,
1190 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1191 # If the service account is undeleted, this value reverts to
1192 # `serviceAccount:{emailid}` and the undeleted service account retains the
1193 # role in the binding.
1194 #
1195 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1196 # identifier) representing a Google group that has been recently
1197 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1198 # the group is recovered, this value reverts to `group:{emailid}` and the
1199 # recovered group retains the role in the binding.
1200 #
1201 #
1202 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1203 # users of that domain. For example, `google.com` or `example.com`.
1204 #
1205 &quot;A String&quot;,
1206 ],
1207 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1208 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1209 },
1210 ],
1211 }</pre>
1212</div>
1213
1214<div class="method">
1215 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
1216 <pre>Returns permissions that the caller has on the specified database or backup
1217resource.
1218
1219Attempting this RPC on a non-existent Cloud Spanner database will
1220result in a NOT_FOUND error if the user has
1221`spanner.databases.list` permission on the containing Cloud
1222Spanner instance. Otherwise returns an empty set of permissions.
1223Calling this method on a backup that does not exist will
1224result in a NOT_FOUND error if the user has
1225`spanner.backups.list` permission on the containing instance.
1226
1227Args:
1228 resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;` for instance resources and `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;/databases/&lt;database ID&gt;` for database resources. (required)
1229 body: object, The request body.
1230 The object takes the form of:
1231
1232{ # Request message for `TestIamPermissions` method.
1233 &quot;permissions&quot;: [ # REQUIRED: The set of permissions to check for &#x27;resource&#x27;.
1234 # Permissions with wildcards (such as &#x27;*&#x27;, &#x27;spanner.*&#x27;, &#x27;spanner.instances.*&#x27;) are not allowed.
1235 &quot;A String&quot;,
1236 ],
1237 }
1238
1239 x__xgafv: string, V1 error format.
1240 Allowed values
1241 1 - v1 error format
1242 2 - v2 error format
1243
1244Returns:
1245 An object of the form:
1246
1247 { # Response message for `TestIamPermissions` method.
1248 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1249 # allowed.
1250 &quot;A String&quot;,
1251 ],
1252 }</pre>
1253</div>
1254
1255</body></html>