blob: 7cef73ff64a2ca139e464b48896d6f230f8a424b [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">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070095 <code><a href="#list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070096<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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700136 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
137 # copy of the database at the timestamp specified by
138 # `create_time`. `create_time` is approximately the time the
139 # CreateBackup request is received.
140 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
141 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
142 # Name of the database from which this backup was
143 # created. This needs to be in the same instance as the backup.
144 # Values are of the form
145 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
146 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
147 # operation. The expiration time of the backup, with microseconds
148 # granularity that must be at least 6 hours and at most 366 days
149 # from the time the CreateBackup request is processed. Once the `expire_time`
150 # has passed, the backup is eligible to be automatically deleted by Cloud
151 # Spanner to free the resources used by the backup.
152 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
153 # The database names are of
154 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
155 # Referencing databases may exist in different instances. The existence of
156 # any referencing database prevents the backup from being deleted. When a
157 # restored database from the backup enters the `READY` state, the reference
158 # to the backup is removed.
159 &quot;A String&quot;,
160 ],
161 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
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 }
Bu Sun Kim65020912020-05-20 12:08:20 -0700176
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700190 &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.
191 # different programming environments, including REST APIs and RPC APIs. It is
192 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
193 # three pieces of data: error code, error message, and error details.
194 #
195 # You can find out more about this error model and how to work with it in the
196 # [API Design Guide](https://cloud.google.com/apis/design/errors).
197 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
198 # message types for APIs to use.
199 {
200 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
201 },
202 ],
203 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
204 # user-facing error message should be localized and sent in the
205 # google.rpc.Status.details field, or localized by the client.
206 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
207 },
208 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
209 # contains progress information and common metadata such as create time.
210 # Some services might not provide such metadata. Any method that returns a
211 # long-running operation should document the metadata type, if any.
212 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
213 },
214 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
215 # originally returns it. If you use the default HTTP mapping, the
216 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
218 # If `true`, the operation is completed, and either `error` or `response` is
219 # available.
220 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
221 # method returns no data on success, such as `Delete`, the response is
222 # `google.protobuf.Empty`. If the original method is standard
223 # `Get`/`Create`/`Update`, the response should be the resource. For other
224 # methods, the response should have the type `XxxResponse`, where `Xxx`
225 # is the original method name. For example, if the original method name
226 # is `TakeSnapshot()`, the inferred response type is
227 # `TakeSnapshotResponse`.
228 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
229 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 }</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700278 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
279 # copy of the database at the timestamp specified by
280 # `create_time`. `create_time` is approximately the time the
281 # CreateBackup request is received.
282 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
283 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
284 # Name of the database from which this backup was
285 # created. This needs to be in the same instance as the backup.
286 # Values are of the form
287 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
288 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
289 # operation. The expiration time of the backup, with microseconds
290 # granularity that must be at least 6 hours and at most 366 days
291 # from the time the CreateBackup request is processed. Once the `expire_time`
292 # has passed, the backup is eligible to be automatically deleted by Cloud
293 # Spanner to free the resources used by the backup.
294 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
295 # The database names are of
296 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
297 # Referencing databases may exist in different instances. The existence of
298 # any referencing database prevents the backup from being deleted. When a
299 # restored database from the backup enters the `READY` state, the reference
300 # to the backup is removed.
301 &quot;A String&quot;,
302 ],
303 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
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>
Bu Sun Kim65020912020-05-20 12:08:20 -0700318</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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700347 #
348 # To learn which resources support conditions in their IAM policies, see the
349 # [IAM
350 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 },
352 }
353
354 x__xgafv: string, V1 error format.
355 Allowed values
356 1 - v1 error format
357 2 - v2 error format
358
359Returns:
360 An object of the form:
361
362 { # An Identity and Access Management (IAM) policy, which specifies access
363 # controls for Google Cloud resources.
364 #
365 #
366 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
367 # `members` to a single `role`. Members can be user accounts, service accounts,
368 # Google groups, and domains (such as G Suite). A `role` is a named list of
369 # permissions; each `role` can be an IAM predefined role or a user-created
370 # custom role.
371 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700372 # For some types of Google Cloud resources, a `binding` can also specify a
373 # `condition`, which is a logical expression that allows access to a resource
374 # only if the expression evaluates to `true`. A condition can add constraints
375 # based on attributes of the request, the resource, or both. To learn which
376 # resources support conditions in their IAM policies, see the
377 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 #
379 # **JSON example:**
380 #
381 # {
382 # &quot;bindings&quot;: [
383 # {
384 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
385 # &quot;members&quot;: [
386 # &quot;user:mike@example.com&quot;,
387 # &quot;group:admins@example.com&quot;,
388 # &quot;domain:google.com&quot;,
389 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
390 # ]
391 # },
392 # {
393 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700394 # &quot;members&quot;: [
395 # &quot;user:eve@example.com&quot;
396 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 # &quot;condition&quot;: {
398 # &quot;title&quot;: &quot;expirable access&quot;,
399 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
400 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
401 # }
402 # }
403 # ],
404 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
405 # &quot;version&quot;: 3
406 # }
407 #
408 # **YAML example:**
409 #
410 # bindings:
411 # - members:
412 # - user:mike@example.com
413 # - group:admins@example.com
414 # - domain:google.com
415 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
416 # role: roles/resourcemanager.organizationAdmin
417 # - members:
418 # - user:eve@example.com
419 # role: roles/resourcemanager.organizationViewer
420 # condition:
421 # title: expirable access
422 # description: Does not grant access after Sep 2020
423 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
424 # - etag: BwWWja0YfJA=
425 # - version: 3
426 #
427 # For a description of IAM and its features, see the
428 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
430 # `condition` that determines how and when the `bindings` are applied. Each
431 # of the `bindings` must contain at least one member.
432 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700433 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
434 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 #
437 # If the condition evaluates to `true`, then this binding applies to the
438 # current request.
439 #
440 # If the condition evaluates to `false`, then this binding does not apply to
441 # the current request. However, a different role binding might grant the same
442 # role to one or more of the members in this binding.
443 #
444 # To learn which resources support conditions in their IAM policies, see the
445 # [IAM
446 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
448 # are documented at https://github.com/google/cel-spec.
449 #
450 # Example (Comparison):
451 #
452 # title: &quot;Summary size limit&quot;
453 # description: &quot;Determines if a summary is less than 100 chars&quot;
454 # expression: &quot;document.summary.size() &lt; 100&quot;
455 #
456 # Example (Equality):
457 #
458 # title: &quot;Requestor is owner&quot;
459 # description: &quot;Determines if requestor is the document owner&quot;
460 # expression: &quot;document.owner == request.auth.claims.email&quot;
461 #
462 # Example (Logic):
463 #
464 # title: &quot;Public documents&quot;
465 # description: &quot;Determine whether the document should be publicly visible&quot;
466 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
467 #
468 # Example (Data Manipulation):
469 #
470 # title: &quot;Notification string&quot;
471 # description: &quot;Create a notification string with a timestamp.&quot;
472 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
473 #
474 # The exact variables and functions that may be referenced within an expression
475 # are determined by the service that evaluates it. See the service
476 # documentation for additional information.
477 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
478 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700479 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
480 # syntax.
481 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
482 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
484 # its purpose. This can be used e.g. in UIs which allow to enter the
485 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 },
487 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
488 # `members` can have the following values:
489 #
490 # * `allUsers`: A special identifier that represents anyone who is
491 # on the internet; with or without a Google account.
492 #
493 # * `allAuthenticatedUsers`: A special identifier that represents anyone
494 # who is authenticated with a Google account or a service account.
495 #
496 # * `user:{emailid}`: An email address that represents a specific Google
497 # account. For example, `alice@example.com` .
498 #
499 #
500 # * `serviceAccount:{emailid}`: An email address that represents a service
501 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
502 #
503 # * `group:{emailid}`: An email address that represents a Google group.
504 # For example, `admins@example.com`.
505 #
506 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
507 # identifier) representing a user that has been recently deleted. For
508 # example, `alice@example.com?uid=123456789012345678901`. If the user is
509 # recovered, this value reverts to `user:{emailid}` and the recovered user
510 # retains the role in the binding.
511 #
512 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
513 # unique identifier) representing a service account that has been recently
514 # deleted. For example,
515 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
516 # If the service account is undeleted, this value reverts to
517 # `serviceAccount:{emailid}` and the undeleted service account retains the
518 # role in the binding.
519 #
520 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
521 # identifier) representing a Google group that has been recently
522 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
523 # the group is recovered, this value reverts to `group:{emailid}` and the
524 # recovered group retains the role in the binding.
525 #
526 #
527 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
528 # users of that domain. For example, `google.com` or `example.com`.
529 #
530 &quot;A String&quot;,
531 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 },
533 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
535 # prevent simultaneous updates of a policy from overwriting each other.
536 # It is strongly suggested that systems make use of the `etag` in the
537 # read-modify-write cycle to perform policy updates in order to avoid race
538 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
539 # systems are expected to put that etag in the request to `setIamPolicy` to
540 # ensure that their change will be applied to the same version of the policy.
541 #
542 # **Important:** If you use IAM Conditions, you must include the `etag` field
543 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
544 # you to overwrite a version `3` policy with a version `1` policy, and all of
545 # the conditions in the version `3` policy are lost.
546 &quot;version&quot;: 42, # Specifies the format of the policy.
547 #
548 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
549 # are rejected.
550 #
551 # Any operation that affects conditional role bindings must specify version
552 # `3`. This requirement applies to the following operations:
553 #
554 # * Getting a policy that includes a conditional role binding
555 # * Adding a conditional role binding to a policy
556 # * Changing a conditional role binding in a policy
557 # * Removing any role binding, with or without a condition, from a policy
558 # that includes conditions
559 #
560 # **Important:** If you use IAM Conditions, you must include the `etag` field
561 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
562 # you to overwrite a version `3` policy with a version `1` policy, and all of
563 # the conditions in the version `3` policy are lost.
564 #
565 # If a policy does not include any conditions, operations on that policy may
566 # specify any valid version or leave the field unset.
567 #
568 # To learn which resources support conditions in their IAM policies, see the
569 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700570 }</pre>
571</div>
572
573<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700574 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 <pre>Lists completed and pending backups.
576Backups returned are ordered by `create_time` in descending order,
577starting from the most recent `create_time`.
578
579Args:
580 parent: string, Required. The instance to list backups from. Values are of the
581form `projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700582 pageSize: integer, Number of backups to be returned in the response. If 0 or
583less, defaults to the server&#x27;s maximum allowed page size.
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 pageToken: string, If non-empty, `page_token` should contain a
585next_page_token from a
586previous ListBackupsResponse to the same `parent` and with the same
587`filter`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 filter: string, An expression that filters the list of returned backups.
589
590A filter expression consists of a field name, a comparison operator, and a
591value for filtering.
592The value must be a string, a number, or a boolean. The comparison operator
593must be one of: `&lt;`, `&gt;`, `&lt;=`, `&gt;=`, `!=`, `=`, or `:`.
594Colon `:` is the contains operator. Filter rules are not case sensitive.
595
596The following fields in the Backup are eligible for filtering:
597
598 * `name`
599 * `database`
600 * `state`
601 * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
602 * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
603 * `size_bytes`
604
605You can combine multiple expressions by enclosing each expression in
606parentheses. By default, expressions are combined with AND logic, but
607you can specify AND, OR, and NOT logic explicitly.
608
609Here are a few examples:
610
611 * `name:Howl` - The backup&#x27;s name contains the string &quot;howl&quot;.
612 * `database:prod`
613 - The database&#x27;s name contains the string &quot;prod&quot;.
614 * `state:CREATING` - The backup is pending creation.
615 * `state:READY` - The backup is fully created and ready for use.
616 * `(name:howl) AND (create_time &lt; \&quot;2018-03-28T14:50:00Z\&quot;)`
617 - The backup name contains the string &quot;howl&quot; and `create_time`
618 of the backup is before 2018-03-28T14:50:00Z.
619 * `expire_time &lt; \&quot;2018-03-28T14:50:00Z\&quot;`
620 - The backup `expire_time` is before 2018-03-28T14:50:00Z.
621 * `size_bytes &gt; 10000000000` - The backup&#x27;s size is greater than 10GB
622 x__xgafv: string, V1 error format.
623 Allowed values
624 1 - v1 error format
625 2 - v2 error format
626
627Returns:
628 An object of the form:
629
630 { # The response for ListBackups.
631 &quot;backups&quot;: [ # The list of matching backups. Backups returned are ordered by `create_time`
632 # in descending order, starting from the most recent `create_time`.
633 { # A backup of a Cloud Spanner database.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700634 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
635 # copy of the database at the timestamp specified by
636 # `create_time`. `create_time` is approximately the time the
637 # CreateBackup request is received.
638 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
639 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
640 # Name of the database from which this backup was
641 # created. This needs to be in the same instance as the backup.
642 # Values are of the form
643 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
644 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
645 # operation. The expiration time of the backup, with microseconds
646 # granularity that must be at least 6 hours and at most 366 days
647 # from the time the CreateBackup request is processed. Once the `expire_time`
648 # has passed, the backup is eligible to be automatically deleted by Cloud
649 # Spanner to free the resources used by the backup.
650 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
651 # The database names are of
652 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
653 # Referencing databases may exist in different instances. The existence of
654 # any referencing database prevents the backup from being deleted. When a
655 # restored database from the backup enters the `READY` state, the reference
656 # to the backup is removed.
657 &quot;A String&quot;,
658 ],
659 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
660 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
661 # Required for the UpdateBackup operation.
662 #
663 # A globally unique identifier for the backup which cannot be
664 # changed. Values are of the form
665 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
666 # The final segment of the name must be between 2 and 60 characters
667 # in length.
668 #
669 # The backup is stored in the location(s) specified in the instance
670 # configuration of the instance containing the backup, identified
671 # by the prefix of the backup name of the form
672 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
673 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700674 ],
675 &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent
676 # ListBackups call to fetch more
677 # of the matching backups.
678 }</pre>
679</div>
680
681<div class="method">
682 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
683 <pre>Retrieves the next page of results.
684
685Args:
686 previous_request: The request for the previous page. (required)
687 previous_response: The response from the request for the previous page. (required)
688
689Returns:
690 A request object that you can call &#x27;execute()&#x27; on to request the next
691 page. Returns None if there are no more items in the collection.
692 </pre>
693</div>
694
695<div class="method">
696 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
697 <pre>Updates a pending or completed Backup.
698
699Args:
700 name: string, Output only for the CreateBackup operation.
701Required for the UpdateBackup operation.
702
703A globally unique identifier for the backup which cannot be
704changed. Values are of the form
705`projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
706The final segment of the name must be between 2 and 60 characters
707in length.
708
709The backup is stored in the location(s) specified in the instance
710configuration of the instance containing the backup, identified
711by the prefix of the backup name of the form
712`projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
713 body: object, The request body.
714 The object takes the form of:
715
716{ # A backup of a Cloud Spanner database.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700717 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
718 # copy of the database at the timestamp specified by
719 # `create_time`. `create_time` is approximately the time the
720 # CreateBackup request is received.
721 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
722 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
723 # Name of the database from which this backup was
724 # created. This needs to be in the same instance as the backup.
725 # Values are of the form
726 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
727 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
728 # operation. The expiration time of the backup, with microseconds
729 # granularity that must be at least 6 hours and at most 366 days
730 # from the time the CreateBackup request is processed. Once the `expire_time`
731 # has passed, the backup is eligible to be automatically deleted by Cloud
732 # Spanner to free the resources used by the backup.
733 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
734 # The database names are of
735 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
736 # Referencing databases may exist in different instances. The existence of
737 # any referencing database prevents the backup from being deleted. When a
738 # restored database from the backup enters the `READY` state, the reference
739 # to the backup is removed.
740 &quot;A String&quot;,
741 ],
742 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
743 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
744 # Required for the UpdateBackup operation.
745 #
746 # A globally unique identifier for the backup which cannot be
747 # changed. Values are of the form
748 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
749 # The final segment of the name must be between 2 and 60 characters
750 # in length.
751 #
752 # The backup is stored in the location(s) specified in the instance
753 # configuration of the instance containing the backup, identified
754 # by the prefix of the backup name of the form
755 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
756 }
Bu Sun Kim65020912020-05-20 12:08:20 -0700757
758 updateMask: string, Required. A mask specifying which fields (e.g. `expire_time`) in the
759Backup resource should be updated. This mask is relative to the Backup
760resource, not to the request message. The field mask must always be
761specified; this prevents any future fields from being erased accidentally
762by clients that do not know about them.
763 x__xgafv: string, V1 error format.
764 Allowed values
765 1 - v1 error format
766 2 - v2 error format
767
768Returns:
769 An object of the form:
770
771 { # A backup of a Cloud Spanner database.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700772 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The backup will contain an externally consistent
773 # copy of the database at the timestamp specified by
774 # `create_time`. `create_time` is approximately the time the
775 # CreateBackup request is received.
776 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
777 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation.
778 # Name of the database from which this backup was
779 # created. This needs to be in the same instance as the backup.
780 # Values are of the form
781 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
782 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup
783 # operation. The expiration time of the backup, with microseconds
784 # granularity that must be at least 6 hours and at most 366 days
785 # from the time the CreateBackup request is processed. Once the `expire_time`
786 # has passed, the backup is eligible to be automatically deleted by Cloud
787 # Spanner to free the resources used by the backup.
788 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup.
789 # The database names are of
790 # the form `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
791 # Referencing databases may exist in different instances. The existence of
792 # any referencing database prevents the backup from being deleted. When a
793 # restored database from the backup enters the `READY` state, the reference
794 # to the backup is removed.
795 &quot;A String&quot;,
796 ],
797 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
798 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation.
799 # Required for the UpdateBackup operation.
800 #
801 # A globally unique identifier for the backup which cannot be
802 # changed. Values are of the form
803 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/a-z*[a-z0-9]`
804 # The final segment of the name must be between 2 and 60 characters
805 # in length.
806 #
807 # The backup is stored in the location(s) specified in the instance
808 # configuration of the instance containing the backup, identified
809 # by the prefix of the backup name of the form
810 # `projects/&lt;project&gt;/instances/&lt;instance&gt;`.
811 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700812</div>
813
814<div class="method">
815 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
816 <pre>Sets the access control policy on a database or backup resource.
817Replaces any existing policy.
818
819Authorization requires `spanner.databases.setIamPolicy`
820permission on resource.
821For backups, authorization requires `spanner.backups.setIamPolicy`
822permission on resource.
823
824Args:
825 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)
826 body: object, The request body.
827 The object takes the form of:
828
829{ # Request message for `SetIamPolicy` method.
830 &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
831 # the policy is limited to a few 10s of KB. An empty policy is a
832 # valid policy but certain Cloud Platform services (such as Projects)
833 # might reject them.
834 # controls for Google Cloud resources.
835 #
836 #
837 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
838 # `members` to a single `role`. Members can be user accounts, service accounts,
839 # Google groups, and domains (such as G Suite). A `role` is a named list of
840 # permissions; each `role` can be an IAM predefined role or a user-created
841 # custom role.
842 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700843 # For some types of Google Cloud resources, a `binding` can also specify a
844 # `condition`, which is a logical expression that allows access to a resource
845 # only if the expression evaluates to `true`. A condition can add constraints
846 # based on attributes of the request, the resource, or both. To learn which
847 # resources support conditions in their IAM policies, see the
848 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 #
850 # **JSON example:**
851 #
852 # {
853 # &quot;bindings&quot;: [
854 # {
855 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
856 # &quot;members&quot;: [
857 # &quot;user:mike@example.com&quot;,
858 # &quot;group:admins@example.com&quot;,
859 # &quot;domain:google.com&quot;,
860 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
861 # ]
862 # },
863 # {
864 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700865 # &quot;members&quot;: [
866 # &quot;user:eve@example.com&quot;
867 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 # &quot;condition&quot;: {
869 # &quot;title&quot;: &quot;expirable access&quot;,
870 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
871 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
872 # }
873 # }
874 # ],
875 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
876 # &quot;version&quot;: 3
877 # }
878 #
879 # **YAML example:**
880 #
881 # bindings:
882 # - members:
883 # - user:mike@example.com
884 # - group:admins@example.com
885 # - domain:google.com
886 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
887 # role: roles/resourcemanager.organizationAdmin
888 # - members:
889 # - user:eve@example.com
890 # role: roles/resourcemanager.organizationViewer
891 # condition:
892 # title: expirable access
893 # description: Does not grant access after Sep 2020
894 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
895 # - etag: BwWWja0YfJA=
896 # - version: 3
897 #
898 # For a description of IAM and its features, see the
899 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
901 # `condition` that determines how and when the `bindings` are applied. Each
902 # of the `bindings` must contain at least one member.
903 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700904 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
905 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700907 #
908 # If the condition evaluates to `true`, then this binding applies to the
909 # current request.
910 #
911 # If the condition evaluates to `false`, then this binding does not apply to
912 # the current request. However, a different role binding might grant the same
913 # role to one or more of the members in this binding.
914 #
915 # To learn which resources support conditions in their IAM policies, see the
916 # [IAM
917 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 # 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700950 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
951 # syntax.
952 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
953 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
955 # its purpose. This can be used e.g. in UIs which allow to enter the
956 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700957 },
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 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 },
1004 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001005 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1006 # prevent simultaneous updates of a policy from overwriting each other.
1007 # It is strongly suggested that systems make use of the `etag` in the
1008 # read-modify-write cycle to perform policy updates in order to avoid race
1009 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1010 # systems are expected to put that etag in the request to `setIamPolicy` to
1011 # ensure that their change will be applied to the same version of the policy.
1012 #
1013 # **Important:** If you use IAM Conditions, you must include the `etag` field
1014 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1015 # you to overwrite a version `3` policy with a version `1` policy, and all of
1016 # the conditions in the version `3` policy are lost.
1017 &quot;version&quot;: 42, # Specifies the format of the policy.
1018 #
1019 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1020 # are rejected.
1021 #
1022 # Any operation that affects conditional role bindings must specify version
1023 # `3`. This requirement applies to the following operations:
1024 #
1025 # * Getting a policy that includes a conditional role binding
1026 # * Adding a conditional role binding to a policy
1027 # * Changing a conditional role binding in a policy
1028 # * Removing any role binding, with or without a condition, from a policy
1029 # that includes conditions
1030 #
1031 # **Important:** If you use IAM Conditions, you must include the `etag` field
1032 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1033 # you to overwrite a version `3` policy with a version `1` policy, and all of
1034 # the conditions in the version `3` policy are lost.
1035 #
1036 # If a policy does not include any conditions, operations on that policy may
1037 # specify any valid version or leave the field unset.
1038 #
1039 # To learn which resources support conditions in their IAM policies, see the
1040 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 },
1042 }
1043
1044 x__xgafv: string, V1 error format.
1045 Allowed values
1046 1 - v1 error format
1047 2 - v2 error format
1048
1049Returns:
1050 An object of the form:
1051
1052 { # An Identity and Access Management (IAM) policy, which specifies access
1053 # controls for Google Cloud resources.
1054 #
1055 #
1056 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1057 # `members` to a single `role`. Members can be user accounts, service accounts,
1058 # Google groups, and domains (such as G Suite). A `role` is a named list of
1059 # permissions; each `role` can be an IAM predefined role or a user-created
1060 # custom role.
1061 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001062 # For some types of Google Cloud resources, a `binding` can also specify a
1063 # `condition`, which is a logical expression that allows access to a resource
1064 # only if the expression evaluates to `true`. A condition can add constraints
1065 # based on attributes of the request, the resource, or both. To learn which
1066 # resources support conditions in their IAM policies, see the
1067 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001068 #
1069 # **JSON example:**
1070 #
1071 # {
1072 # &quot;bindings&quot;: [
1073 # {
1074 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1075 # &quot;members&quot;: [
1076 # &quot;user:mike@example.com&quot;,
1077 # &quot;group:admins@example.com&quot;,
1078 # &quot;domain:google.com&quot;,
1079 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
1080 # ]
1081 # },
1082 # {
1083 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001084 # &quot;members&quot;: [
1085 # &quot;user:eve@example.com&quot;
1086 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 # &quot;condition&quot;: {
1088 # &quot;title&quot;: &quot;expirable access&quot;,
1089 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1090 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
1091 # }
1092 # }
1093 # ],
1094 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1095 # &quot;version&quot;: 3
1096 # }
1097 #
1098 # **YAML example:**
1099 #
1100 # bindings:
1101 # - members:
1102 # - user:mike@example.com
1103 # - group:admins@example.com
1104 # - domain:google.com
1105 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1106 # role: roles/resourcemanager.organizationAdmin
1107 # - members:
1108 # - user:eve@example.com
1109 # role: roles/resourcemanager.organizationViewer
1110 # condition:
1111 # title: expirable access
1112 # description: Does not grant access after Sep 2020
1113 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
1114 # - etag: BwWWja0YfJA=
1115 # - version: 3
1116 #
1117 # For a description of IAM and its features, see the
1118 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001119 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
1120 # `condition` that determines how and when the `bindings` are applied. Each
1121 # of the `bindings` must contain at least one member.
1122 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001123 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1124 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001126 #
1127 # If the condition evaluates to `true`, then this binding applies to the
1128 # current request.
1129 #
1130 # If the condition evaluates to `false`, then this binding does not apply to
1131 # the current request. However, a different role binding might grant the same
1132 # role to one or more of the members in this binding.
1133 #
1134 # To learn which resources support conditions in their IAM policies, see the
1135 # [IAM
1136 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1138 # are documented at https://github.com/google/cel-spec.
1139 #
1140 # Example (Comparison):
1141 #
1142 # title: &quot;Summary size limit&quot;
1143 # description: &quot;Determines if a summary is less than 100 chars&quot;
1144 # expression: &quot;document.summary.size() &lt; 100&quot;
1145 #
1146 # Example (Equality):
1147 #
1148 # title: &quot;Requestor is owner&quot;
1149 # description: &quot;Determines if requestor is the document owner&quot;
1150 # expression: &quot;document.owner == request.auth.claims.email&quot;
1151 #
1152 # Example (Logic):
1153 #
1154 # title: &quot;Public documents&quot;
1155 # description: &quot;Determine whether the document should be publicly visible&quot;
1156 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1157 #
1158 # Example (Data Manipulation):
1159 #
1160 # title: &quot;Notification string&quot;
1161 # description: &quot;Create a notification string with a timestamp.&quot;
1162 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1163 #
1164 # The exact variables and functions that may be referenced within an expression
1165 # are determined by the service that evaluates it. See the service
1166 # documentation for additional information.
1167 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1168 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001169 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1170 # syntax.
1171 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1172 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1174 # its purpose. This can be used e.g. in UIs which allow to enter the
1175 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 },
1177 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1178 # `members` can have the following values:
1179 #
1180 # * `allUsers`: A special identifier that represents anyone who is
1181 # on the internet; with or without a Google account.
1182 #
1183 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1184 # who is authenticated with a Google account or a service account.
1185 #
1186 # * `user:{emailid}`: An email address that represents a specific Google
1187 # account. For example, `alice@example.com` .
1188 #
1189 #
1190 # * `serviceAccount:{emailid}`: An email address that represents a service
1191 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1192 #
1193 # * `group:{emailid}`: An email address that represents a Google group.
1194 # For example, `admins@example.com`.
1195 #
1196 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1197 # identifier) representing a user that has been recently deleted. For
1198 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1199 # recovered, this value reverts to `user:{emailid}` and the recovered user
1200 # retains the role in the binding.
1201 #
1202 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1203 # unique identifier) representing a service account that has been recently
1204 # deleted. For example,
1205 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1206 # If the service account is undeleted, this value reverts to
1207 # `serviceAccount:{emailid}` and the undeleted service account retains the
1208 # role in the binding.
1209 #
1210 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1211 # identifier) representing a Google group that has been recently
1212 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1213 # the group is recovered, this value reverts to `group:{emailid}` and the
1214 # recovered group retains the role in the binding.
1215 #
1216 #
1217 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1218 # users of that domain. For example, `google.com` or `example.com`.
1219 #
1220 &quot;A String&quot;,
1221 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001222 },
1223 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001224 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1225 # prevent simultaneous updates of a policy from overwriting each other.
1226 # It is strongly suggested that systems make use of the `etag` in the
1227 # read-modify-write cycle to perform policy updates in order to avoid race
1228 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1229 # systems are expected to put that etag in the request to `setIamPolicy` to
1230 # ensure that their change will be applied to the same version of the policy.
1231 #
1232 # **Important:** If you use IAM Conditions, you must include the `etag` field
1233 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1234 # you to overwrite a version `3` policy with a version `1` policy, and all of
1235 # the conditions in the version `3` policy are lost.
1236 &quot;version&quot;: 42, # Specifies the format of the policy.
1237 #
1238 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1239 # are rejected.
1240 #
1241 # Any operation that affects conditional role bindings must specify version
1242 # `3`. This requirement applies to the following operations:
1243 #
1244 # * Getting a policy that includes a conditional role binding
1245 # * Adding a conditional role binding to a policy
1246 # * Changing a conditional role binding in a policy
1247 # * Removing any role binding, with or without a condition, from a policy
1248 # that includes conditions
1249 #
1250 # **Important:** If you use IAM Conditions, you must include the `etag` field
1251 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1252 # you to overwrite a version `3` policy with a version `1` policy, and all of
1253 # the conditions in the version `3` policy are lost.
1254 #
1255 # If a policy does not include any conditions, operations on that policy may
1256 # specify any valid version or leave the field unset.
1257 #
1258 # To learn which resources support conditions in their IAM policies, see the
1259 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001260 }</pre>
1261</div>
1262
1263<div class="method">
1264 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
1265 <pre>Returns permissions that the caller has on the specified database or backup
1266resource.
1267
1268Attempting this RPC on a non-existent Cloud Spanner database will
1269result in a NOT_FOUND error if the user has
1270`spanner.databases.list` permission on the containing Cloud
1271Spanner instance. Otherwise returns an empty set of permissions.
1272Calling this method on a backup that does not exist will
1273result in a NOT_FOUND error if the user has
1274`spanner.backups.list` permission on the containing instance.
1275
1276Args:
1277 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)
1278 body: object, The request body.
1279 The object takes the form of:
1280
1281{ # Request message for `TestIamPermissions` method.
1282 &quot;permissions&quot;: [ # REQUIRED: The set of permissions to check for &#x27;resource&#x27;.
1283 # Permissions with wildcards (such as &#x27;*&#x27;, &#x27;spanner.*&#x27;, &#x27;spanner.instances.*&#x27;) are not allowed.
1284 &quot;A String&quot;,
1285 ],
1286 }
1287
1288 x__xgafv: string, V1 error format.
1289 Allowed values
1290 1 - v1 error format
1291 2 - v2 error format
1292
1293Returns:
1294 An object of the form:
1295
1296 { # Response message for `TestIamPermissions` method.
1297 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1298 # allowed.
1299 &quot;A String&quot;,
1300 ],
1301 }</pre>
1302</div>
1303
1304</body></html>