blob: 6dd581340edd689c6ab7a3a3c973242f7f3aa750 [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<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.databases.html">databases</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="spanner_v1.projects.instances.databases.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="spanner_v1.projects.instances.databases.sessions.html">sessions()</a></code>
84</p>
85<p class="firstline">Returns the sessions Resource.</p>
86
87<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070088 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040089<p class="firstline">Creates a new Cloud Spanner database and starts to prepare it for serving.</p>
90<p class="toc_element">
91 <code><a href="#dropDatabase">dropDatabase(database, x__xgafv=None)</a></code></p>
92<p class="firstline">Drops (aka deletes) a Cloud Spanner database.</p>
93<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070094 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040095<p class="firstline">Gets the state of a Cloud Spanner database.</p>
96<p class="toc_element">
97 <code><a href="#getDdl">getDdl(database, x__xgafv=None)</a></code></p>
98<p class="firstline">Returns the schema of a Cloud Spanner database as a list of formatted</p>
99<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700101<p class="firstline">Gets the access control policy for a database or backup resource.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700103 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104<p class="firstline">Lists Cloud Spanner databases.</p>
105<p class="toc_element">
106 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
107<p class="firstline">Retrieves the next page of results.</p>
108<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code><a href="#restore">restore(parent, body=None, x__xgafv=None)</a></code></p>
110<p class="firstline">Create a new database by restoring from a completed backup. The new</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
113<p class="firstline">Sets the access control policy on a database or backup resource.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400114<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
116<p class="firstline">Returns permissions that the caller has on the specified database or backup</p>
117<p class="toc_element">
118 <code><a href="#updateDdl">updateDdl(database, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400119<p class="firstline">Updates the schema of a Cloud Spanner database by</p>
120<h3>Method Details</h3>
121<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123 <pre>Creates a new Cloud Spanner database and starts to prepare it for serving.
124The returned long-running operation will
Dan O'Mearadd494642020-05-01 07:42:23 -0700125have a name of the format `&lt;database_name&gt;/operations/&lt;operation_id&gt;` and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400126can be used to track preparation of the database. The
127metadata field type is
128CreateDatabaseMetadata. The
129response field type is
130Database, if successful.
131
132Args:
133 parent: string, Required. The name of the instance that will serve the new database.
Dan O'Mearadd494642020-05-01 07:42:23 -0700134Values are of the form `projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
135 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400136 The object takes the form of:
137
138{ # The request for CreateDatabase.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;extraStatements&quot;: [ # Optional. A list of DDL statements to run inside the newly created
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400140 # database. Statements can create tables, indexes, etc. These
141 # statements execute atomically with the creation of the database:
142 # if there is an error in any statement, the database is not created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400144 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 &quot;createStatement&quot;: &quot;A String&quot;, # Required. A `CREATE DATABASE` statement, which specifies the ID of the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400146 # new database. The database ID must conform to the regular expression
147 # `a-z*[a-z0-9]` and be between 2 and 30 characters in length.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400148 # If the database ID is a reserved word or if it contains a hyphen, the
149 # database ID must be enclosed in backticks (`` ` ``).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 }
151
152 x__xgafv: string, V1 error format.
153 Allowed values
154 1 - v1 error format
155 2 - v2 error format
156
157Returns:
158 An object of the form:
159
160 { # This resource represents a long-running operation that is the result of a
161 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 # If `true`, the operation is completed, and either `error` or `response` is
164 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166 # method returns no data on success, such as `Delete`, the response is
167 # `google.protobuf.Empty`. If the original method is standard
168 # `Get`/`Create`/`Update`, the response should be the resource. For other
169 # methods, the response should have the type `XxxResponse`, where `Xxx`
170 # is the original method name. For example, if the original method name
171 # is `TakeSnapshot()`, the inferred response type is
172 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 # originally returns it. If you use the default HTTP mapping, the
177 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 &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.
179 # different programming environments, including REST APIs and RPC APIs. It is
180 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
181 # three pieces of data: error code, error message, and error details.
182 #
183 # You can find out more about this error model and how to work with it in the
184 # [API Design Guide](https://cloud.google.com/apis/design/errors).
185 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
186 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
187 # user-facing error message should be localized and sent in the
188 # google.rpc.Status.details field, or localized by the client.
189 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
190 # message types for APIs to use.
191 {
192 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
193 },
194 ],
195 },
196 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 # contains progress information and common metadata such as create time.
198 # Some services might not provide such metadata. Any method that returns a
199 # long-running operation should document the metadata type, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400202 }</pre>
203</div>
204
205<div class="method">
206 <code class="details" id="dropDatabase">dropDatabase(database, x__xgafv=None)</code>
207 <pre>Drops (aka deletes) a Cloud Spanner database.
Dan O'Mearadd494642020-05-01 07:42:23 -0700208Completed backups for the database will be retained according to their
209`expire_time`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400210
211Args:
212 database: string, Required. The database to be dropped. (required)
213 x__xgafv: string, V1 error format.
214 Allowed values
215 1 - v1 error format
216 2 - v2 error format
217
218Returns:
219 An object of the form:
220
221 { # A generic empty message that you can re-use to avoid defining duplicated
222 # empty messages in your APIs. A typical example is to use it as the request
223 # or the response type of an API method. For instance:
224 #
225 # service Foo {
226 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
227 # }
228 #
229 # The JSON representation for `Empty` is empty JSON object `{}`.
230 }</pre>
231</div>
232
233<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700234 <code class="details" id="get">get(name, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400235 <pre>Gets the state of a Cloud Spanner database.
236
237Args:
238 name: string, Required. The name of the requested database. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700239`projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400240 x__xgafv: string, V1 error format.
241 Allowed values
242 1 - v1 error format
243 2 - v2 error format
244
245Returns:
246 An object of the form:
247
248 { # A Cloud Spanner database.
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700250 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`,
251 # where `&lt;database&gt;` is as specified in the `CREATE DATABASE`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400252 # statement. This name can be passed to other API methods to
253 # identify the database.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # about the restore source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
257 &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 # may no longer exist.
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
260 &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
261 &quot;createTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at
Dan O'Mearadd494642020-05-01 07:42:23 -0700262 # the timestamp specified by `create_time`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
266 &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400267 }</pre>
268</div>
269
270<div class="method">
271 <code class="details" id="getDdl">getDdl(database, x__xgafv=None)</code>
272 <pre>Returns the schema of a Cloud Spanner database as a list of formatted
273DDL statements. This method does not show pending schema updates, those may
274be queried using the Operations API.
275
276Args:
277 database: string, Required. The database whose schema we wish to get. (required)
278 x__xgafv: string, V1 error format.
279 Allowed values
280 1 - v1 error format
281 2 - v2 error format
282
283Returns:
284 An object of the form:
285
286 { # The response for GetDatabaseDdl.
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;statements&quot;: [ # A list of formatted DDL statements defining the schema of the database
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400288 # specified in the request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400290 ],
291 }</pre>
292</div>
293
294<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 <pre>Gets the access control policy for a database or backup resource.
297Returns an empty policy if a database or backup exists but does not have a
298policy set.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400299
300Authorization requires `spanner.databases.getIamPolicy` permission on
301resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700302For backups, authorization requires `spanner.backups.getIamPolicy`
303permission on resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400304
305Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700306 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)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400308 The object takes the form of:
309
310{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
312 # `GetIamPolicy`.
313 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 #
315 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
316 # rejected.
317 #
318 # Requests for policies with any conditional bindings must specify version 3.
319 # Policies without any conditional bindings may specify any valid value or
320 # leave the field unset.
321 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400322 }
323
324 x__xgafv: string, V1 error format.
325 Allowed values
326 1 - v1 error format
327 2 - v2 error format
328
329Returns:
330 An object of the form:
331
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 { # An Identity and Access Management (IAM) policy, which specifies access
333 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400334 #
335 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
337 # `members` to a single `role`. Members can be user accounts, service accounts,
338 # Google groups, and domains (such as G Suite). A `role` is a named list of
339 # permissions; each `role` can be an IAM predefined role or a user-created
340 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400341 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 # Optionally, a `binding` can specify a `condition`, which is a logical
343 # expression that allows access to a resource only if the expression evaluates
344 # to `true`. A condition can add constraints based on attributes of the
345 # request, the resource, or both.
346 #
347 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400348 #
349 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400351 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
353 # &quot;members&quot;: [
354 # &quot;user:mike@example.com&quot;,
355 # &quot;group:admins@example.com&quot;,
356 # &quot;domain:google.com&quot;,
357 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400358 # ]
359 # },
360 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
362 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
363 # &quot;condition&quot;: {
364 # &quot;title&quot;: &quot;expirable access&quot;,
365 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
366 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400368 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
371 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400372 # }
373 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700374 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 #
376 # bindings:
377 # - members:
378 # - user:mike@example.com
379 # - group:admins@example.com
380 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
382 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 # - user:eve@example.com
385 # role: roles/resourcemanager.organizationViewer
386 # condition:
387 # title: expirable access
388 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700389 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 # - etag: BwWWja0YfJA=
391 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400393 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700394 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
396 # prevent simultaneous updates of a policy from overwriting each other.
397 # It is strongly suggested that systems make use of the `etag` in the
398 # read-modify-write cycle to perform policy updates in order to avoid race
399 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
400 # systems are expected to put that etag in the request to `setIamPolicy` to
401 # ensure that their change will be applied to the same version of the policy.
402 #
403 # **Important:** If you use IAM Conditions, you must include the `etag` field
404 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
405 # you to overwrite a version `3` policy with a version `1` policy, and all of
406 # the conditions in the version `3` policy are lost.
407 &quot;version&quot;: 42, # Specifies the format of the policy.
408 #
409 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
410 # are rejected.
411 #
412 # Any operation that affects conditional role bindings must specify version
413 # `3`. This requirement applies to the following operations:
414 #
415 # * Getting a policy that includes a conditional role binding
416 # * Adding a conditional role binding to a policy
417 # * Changing a conditional role binding in a policy
418 # * Removing any role binding, with or without a condition, from a policy
419 # that includes conditions
420 #
421 # **Important:** If you use IAM Conditions, you must include the `etag` field
422 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
423 # you to overwrite a version `3` policy with a version `1` policy, and all of
424 # the conditions in the version `3` policy are lost.
425 #
426 # If a policy does not include any conditions, operations on that policy may
427 # specify any valid version or leave the field unset.
428 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700429 # `condition` that determines how and when the `bindings` are applied. Each
430 # of the `bindings` must contain at least one member.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400431 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
433 # NOTE: An unsatisfied condition will not allow user access via current
434 # binding. Different bindings, including their conditions, are examined
435 # independently.
436 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
437 # are documented at https://github.com/google/cel-spec.
438 #
439 # Example (Comparison):
440 #
441 # title: &quot;Summary size limit&quot;
442 # description: &quot;Determines if a summary is less than 100 chars&quot;
443 # expression: &quot;document.summary.size() &lt; 100&quot;
444 #
445 # Example (Equality):
446 #
447 # title: &quot;Requestor is owner&quot;
448 # description: &quot;Determines if requestor is the document owner&quot;
449 # expression: &quot;document.owner == request.auth.claims.email&quot;
450 #
451 # Example (Logic):
452 #
453 # title: &quot;Public documents&quot;
454 # description: &quot;Determine whether the document should be publicly visible&quot;
455 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
456 #
457 # Example (Data Manipulation):
458 #
459 # title: &quot;Notification string&quot;
460 # description: &quot;Create a notification string with a timestamp.&quot;
461 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
462 #
463 # The exact variables and functions that may be referenced within an expression
464 # are determined by the service that evaluates it. See the service
465 # documentation for additional information.
466 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
467 # reporting, e.g. a file name and a position in the file.
468 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
469 # its purpose. This can be used e.g. in UIs which allow to enter the
470 # expression.
471 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
472 # describes the expression, e.g. when hovered over it in a UI.
473 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
474 # syntax.
475 },
476 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400477 # `members` can have the following values:
478 #
479 # * `allUsers`: A special identifier that represents anyone who is
480 # on the internet; with or without a Google account.
481 #
482 # * `allAuthenticatedUsers`: A special identifier that represents anyone
483 # who is authenticated with a Google account or a service account.
484 #
485 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400487 #
488 #
489 # * `serviceAccount:{emailid}`: An email address that represents a service
490 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
491 #
492 # * `group:{emailid}`: An email address that represents a Google group.
493 # For example, `admins@example.com`.
494 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
496 # identifier) representing a user that has been recently deleted. For
497 # example, `alice@example.com?uid=123456789012345678901`. If the user is
498 # recovered, this value reverts to `user:{emailid}` and the recovered user
499 # retains the role in the binding.
500 #
501 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
502 # unique identifier) representing a service account that has been recently
503 # deleted. For example,
504 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
505 # If the service account is undeleted, this value reverts to
506 # `serviceAccount:{emailid}` and the undeleted service account retains the
507 # role in the binding.
508 #
509 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
510 # identifier) representing a Google group that has been recently
511 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
512 # the group is recovered, this value reverts to `group:{emailid}` and the
513 # recovered group retains the role in the binding.
514 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 #
516 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 # users of that domain. For example, `google.com` or `example.com`.
518 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400520 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700521 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
522 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400523 },
524 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400525 }</pre>
526</div>
527
528<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400530 <pre>Lists Cloud Spanner databases.
531
532Args:
533 parent: string, Required. The instance whose databases should be listed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700534Values are of the form `projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400535 pageToken: string, If non-empty, `page_token` should contain a
536next_page_token from a
537previous ListDatabasesResponse.
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 pageSize: integer, Number of databases to be returned in the response. If 0 or less,
539defaults to the server&#x27;s maximum allowed page size.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400540 x__xgafv: string, V1 error format.
541 Allowed values
542 1 - v1 error format
543 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400544
545Returns:
546 An object of the form:
547
548 { # The response for ListDatabases.
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400550 # ListDatabases call to fetch more
551 # of the matching databases.
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;databases&quot;: [ # Databases that matched the request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400553 { # A Cloud Spanner database.
Bu Sun Kim65020912020-05-20 12:08:20 -0700554 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`,
556 # where `&lt;database&gt;` is as specified in the `CREATE DATABASE`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400557 # statement. This name can be passed to other API methods to
558 # identify the database.
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 # about the restore source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
562 &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # may no longer exist.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
565 &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
566 &quot;createTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at
Dan O'Mearadd494642020-05-01 07:42:23 -0700567 # the timestamp specified by `create_time`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700569 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700570 &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
571 &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400572 },
573 ],
574 }</pre>
575</div>
576
577<div class="method">
578 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
579 <pre>Retrieves the next page of results.
580
581Args:
582 previous_request: The request for the previous page. (required)
583 previous_response: The response from the request for the previous page. (required)
584
585Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400587 page. Returns None if there are no more items in the collection.
588 </pre>
589</div>
590
591<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 <code class="details" id="restore">restore(parent, body=None, x__xgafv=None)</code>
593 <pre>Create a new database by restoring from a completed backup. The new
594database must be in the same project and in an instance with the same
595instance configuration as the instance containing
596the backup. The returned database long-running
597operation has a name of the format
598`projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;/operations/&lt;operation_id&gt;`,
599and can be used to track the progress of the operation, and to cancel it.
600The metadata field type is
601RestoreDatabaseMetadata.
602The response type
603is Database, if
604successful. Cancelling the returned operation will stop the restore and
605delete the database.
606There can be only one database being restored into an instance at a time.
607Once the restore operation completes, a new restore operation can be
608initiated, without waiting for the optimize operation associated with the
609first restore to complete.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400610
611Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700612 parent: string, Required. The name of the instance in which to create the
613restored database. This instance must be in the same project and
614have the same instance configuration as the instance containing
615the source backup. Values are of the form
616`projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
617 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400618 The object takes the form of:
619
Dan O'Mearadd494642020-05-01 07:42:23 -0700620{ # The request for
621 # RestoreDatabase.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;databaseId&quot;: &quot;A String&quot;, # Required. The id of the database to create and restore to. This
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 # database must not already exist. The `database_id` appended to
624 # `parent` forms the full database name of the form
625 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database_id&gt;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;backup&quot;: &quot;A String&quot;, # Name of the backup from which to restore. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/backups/&lt;backup&gt;`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400628 }
629
630 x__xgafv: string, V1 error format.
631 Allowed values
632 1 - v1 error format
633 2 - v2 error format
634
635Returns:
636 An object of the form:
637
638 { # This resource represents a long-running operation that is the result of a
639 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700641 # If `true`, the operation is completed, and either `error` or `response` is
642 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 # method returns no data on success, such as `Delete`, the response is
645 # `google.protobuf.Empty`. If the original method is standard
646 # `Get`/`Create`/`Update`, the response should be the resource. For other
647 # methods, the response should have the type `XxxResponse`, where `Xxx`
648 # is the original method name. For example, if the original method name
649 # is `TakeSnapshot()`, the inferred response type is
650 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700651 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 # originally returns it. If you use the default HTTP mapping, the
655 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700656 &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.
657 # different programming environments, including REST APIs and RPC APIs. It is
658 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
659 # three pieces of data: error code, error message, and error details.
660 #
661 # You can find out more about this error model and how to work with it in the
662 # [API Design Guide](https://cloud.google.com/apis/design/errors).
663 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
664 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
665 # user-facing error message should be localized and sent in the
666 # google.rpc.Status.details field, or localized by the client.
667 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
668 # message types for APIs to use.
669 {
670 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
671 },
672 ],
673 },
674 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
Dan O'Mearadd494642020-05-01 07:42:23 -0700675 # contains progress information and common metadata such as create time.
676 # Some services might not provide such metadata. Any method that returns a
677 # long-running operation should document the metadata type, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700679 },
680 }</pre>
681</div>
682
683<div class="method">
684 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
685 <pre>Sets the access control policy on a database or backup resource.
686Replaces any existing policy.
687
688Authorization requires `spanner.databases.setIamPolicy`
689permission on resource.
690For backups, authorization requires `spanner.backups.setIamPolicy`
691permission on resource.
692
693Args:
694 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)
695 body: object, The request body.
696 The object takes the form of:
697
698{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700699 &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
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 # the policy is limited to a few 10s of KB. An empty policy is a
701 # valid policy but certain Cloud Platform services (such as Projects)
702 # might reject them.
703 # controls for Google Cloud resources.
704 #
705 #
706 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
707 # `members` to a single `role`. Members can be user accounts, service accounts,
708 # Google groups, and domains (such as G Suite). A `role` is a named list of
709 # permissions; each `role` can be an IAM predefined role or a user-created
710 # custom role.
711 #
712 # Optionally, a `binding` can specify a `condition`, which is a logical
713 # expression that allows access to a resource only if the expression evaluates
714 # to `true`. A condition can add constraints based on attributes of the
715 # request, the resource, or both.
716 #
717 # **JSON example:**
718 #
719 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 # &quot;bindings&quot;: [
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
723 # &quot;members&quot;: [
724 # &quot;user:mike@example.com&quot;,
725 # &quot;group:admins@example.com&quot;,
726 # &quot;domain:google.com&quot;,
727 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700728 # ]
729 # },
730 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700731 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
732 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
733 # &quot;condition&quot;: {
734 # &quot;title&quot;: &quot;expirable access&quot;,
735 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
736 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700737 # }
738 # }
739 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
741 # &quot;version&quot;: 3
Dan O'Mearadd494642020-05-01 07:42:23 -0700742 # }
743 #
744 # **YAML example:**
745 #
746 # bindings:
747 # - members:
748 # - user:mike@example.com
749 # - group:admins@example.com
750 # - domain:google.com
751 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
752 # role: roles/resourcemanager.organizationAdmin
753 # - members:
754 # - user:eve@example.com
755 # role: roles/resourcemanager.organizationViewer
756 # condition:
757 # title: expirable access
758 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700760 # - etag: BwWWja0YfJA=
761 # - version: 3
762 #
763 # For a description of IAM and its features, see the
764 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
766 # prevent simultaneous updates of a policy from overwriting each other.
767 # It is strongly suggested that systems make use of the `etag` in the
768 # read-modify-write cycle to perform policy updates in order to avoid race
769 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
770 # systems are expected to put that etag in the request to `setIamPolicy` to
771 # ensure that their change will be applied to the same version of the policy.
772 #
773 # **Important:** If you use IAM Conditions, you must include the `etag` field
774 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
775 # you to overwrite a version `3` policy with a version `1` policy, and all of
776 # the conditions in the version `3` policy are lost.
777 &quot;version&quot;: 42, # Specifies the format of the policy.
778 #
779 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
780 # are rejected.
781 #
782 # Any operation that affects conditional role bindings must specify version
783 # `3`. This requirement applies to the following operations:
784 #
785 # * Getting a policy that includes a conditional role binding
786 # * Adding a conditional role binding to a policy
787 # * Changing a conditional role binding in a policy
788 # * Removing any role binding, with or without a condition, from a policy
789 # that includes conditions
790 #
791 # **Important:** If you use IAM Conditions, you must include the `etag` field
792 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
793 # you to overwrite a version `3` policy with a version `1` policy, and all of
794 # the conditions in the version `3` policy are lost.
795 #
796 # If a policy does not include any conditions, operations on that policy may
797 # specify any valid version or leave the field unset.
798 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 # `condition` that determines how and when the `bindings` are applied. Each
800 # of the `bindings` must contain at least one member.
801 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
803 # NOTE: An unsatisfied condition will not allow user access via current
804 # binding. Different bindings, including their conditions, are examined
805 # independently.
806 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
807 # are documented at https://github.com/google/cel-spec.
808 #
809 # Example (Comparison):
810 #
811 # title: &quot;Summary size limit&quot;
812 # description: &quot;Determines if a summary is less than 100 chars&quot;
813 # expression: &quot;document.summary.size() &lt; 100&quot;
814 #
815 # Example (Equality):
816 #
817 # title: &quot;Requestor is owner&quot;
818 # description: &quot;Determines if requestor is the document owner&quot;
819 # expression: &quot;document.owner == request.auth.claims.email&quot;
820 #
821 # Example (Logic):
822 #
823 # title: &quot;Public documents&quot;
824 # description: &quot;Determine whether the document should be publicly visible&quot;
825 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
826 #
827 # Example (Data Manipulation):
828 #
829 # title: &quot;Notification string&quot;
830 # description: &quot;Create a notification string with a timestamp.&quot;
831 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
832 #
833 # The exact variables and functions that may be referenced within an expression
834 # are determined by the service that evaluates it. See the service
835 # documentation for additional information.
836 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
837 # reporting, e.g. a file name and a position in the file.
838 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
839 # its purpose. This can be used e.g. in UIs which allow to enter the
840 # expression.
841 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
842 # describes the expression, e.g. when hovered over it in a UI.
843 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
844 # syntax.
845 },
846 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700847 # `members` can have the following values:
848 #
849 # * `allUsers`: A special identifier that represents anyone who is
850 # on the internet; with or without a Google account.
851 #
852 # * `allAuthenticatedUsers`: A special identifier that represents anyone
853 # who is authenticated with a Google account or a service account.
854 #
855 # * `user:{emailid}`: An email address that represents a specific Google
856 # account. For example, `alice@example.com` .
857 #
858 #
859 # * `serviceAccount:{emailid}`: An email address that represents a service
860 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
861 #
862 # * `group:{emailid}`: An email address that represents a Google group.
863 # For example, `admins@example.com`.
864 #
865 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
866 # identifier) representing a user that has been recently deleted. For
867 # example, `alice@example.com?uid=123456789012345678901`. If the user is
868 # recovered, this value reverts to `user:{emailid}` and the recovered user
869 # retains the role in the binding.
870 #
871 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
872 # unique identifier) representing a service account that has been recently
873 # deleted. For example,
874 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
875 # If the service account is undeleted, this value reverts to
876 # `serviceAccount:{emailid}` and the undeleted service account retains the
877 # role in the binding.
878 #
879 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
880 # identifier) representing a Google group that has been recently
881 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
882 # the group is recovered, this value reverts to `group:{emailid}` and the
883 # recovered group retains the role in the binding.
884 #
885 #
886 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
887 # users of that domain. For example, `google.com` or `example.com`.
888 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
892 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 },
894 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700895 },
896 }
897
898 x__xgafv: string, V1 error format.
899 Allowed values
900 1 - v1 error format
901 2 - v2 error format
902
903Returns:
904 An object of the form:
905
906 { # An Identity and Access Management (IAM) policy, which specifies access
907 # controls for Google Cloud resources.
908 #
909 #
910 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
911 # `members` to a single `role`. Members can be user accounts, service accounts,
912 # Google groups, and domains (such as G Suite). A `role` is a named list of
913 # permissions; each `role` can be an IAM predefined role or a user-created
914 # custom role.
915 #
916 # Optionally, a `binding` can specify a `condition`, which is a logical
917 # expression that allows access to a resource only if the expression evaluates
918 # to `true`. A condition can add constraints based on attributes of the
919 # request, the resource, or both.
920 #
921 # **JSON example:**
922 #
923 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 # &quot;bindings&quot;: [
Dan O'Mearadd494642020-05-01 07:42:23 -0700925 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
927 # &quot;members&quot;: [
928 # &quot;user:mike@example.com&quot;,
929 # &quot;group:admins@example.com&quot;,
930 # &quot;domain:google.com&quot;,
931 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700932 # ]
933 # },
934 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
936 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
937 # &quot;condition&quot;: {
938 # &quot;title&quot;: &quot;expirable access&quot;,
939 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
940 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700941 # }
942 # }
943 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700944 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
945 # &quot;version&quot;: 3
Dan O'Mearadd494642020-05-01 07:42:23 -0700946 # }
947 #
948 # **YAML example:**
949 #
950 # bindings:
951 # - members:
952 # - user:mike@example.com
953 # - group:admins@example.com
954 # - domain:google.com
955 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
956 # role: roles/resourcemanager.organizationAdmin
957 # - members:
958 # - user:eve@example.com
959 # role: roles/resourcemanager.organizationViewer
960 # condition:
961 # title: expirable access
962 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 # - etag: BwWWja0YfJA=
965 # - version: 3
966 #
967 # For a description of IAM and its features, see the
968 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
970 # prevent simultaneous updates of a policy from overwriting each other.
971 # It is strongly suggested that systems make use of the `etag` in the
972 # read-modify-write cycle to perform policy updates in order to avoid race
973 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
974 # systems are expected to put that etag in the request to `setIamPolicy` to
975 # ensure that their change will be applied to the same version of the policy.
976 #
977 # **Important:** If you use IAM Conditions, you must include the `etag` field
978 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
979 # you to overwrite a version `3` policy with a version `1` policy, and all of
980 # the conditions in the version `3` policy are lost.
981 &quot;version&quot;: 42, # Specifies the format of the policy.
982 #
983 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
984 # are rejected.
985 #
986 # Any operation that affects conditional role bindings must specify version
987 # `3`. This requirement applies to the following operations:
988 #
989 # * Getting a policy that includes a conditional role binding
990 # * Adding a conditional role binding to a policy
991 # * Changing a conditional role binding in a policy
992 # * Removing any role binding, with or without a condition, from a policy
993 # that includes conditions
994 #
995 # **Important:** If you use IAM Conditions, you must include the `etag` field
996 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
997 # you to overwrite a version `3` policy with a version `1` policy, and all of
998 # the conditions in the version `3` policy are lost.
999 #
1000 # If a policy does not include any conditions, operations on that policy may
1001 # specify any valid version or leave the field unset.
1002 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 # `condition` that determines how and when the `bindings` are applied. Each
1004 # of the `bindings` must contain at least one member.
1005 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1007 # NOTE: An unsatisfied condition will not allow user access via current
1008 # binding. Different bindings, including their conditions, are examined
1009 # independently.
1010 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1011 # are documented at https://github.com/google/cel-spec.
1012 #
1013 # Example (Comparison):
1014 #
1015 # title: &quot;Summary size limit&quot;
1016 # description: &quot;Determines if a summary is less than 100 chars&quot;
1017 # expression: &quot;document.summary.size() &lt; 100&quot;
1018 #
1019 # Example (Equality):
1020 #
1021 # title: &quot;Requestor is owner&quot;
1022 # description: &quot;Determines if requestor is the document owner&quot;
1023 # expression: &quot;document.owner == request.auth.claims.email&quot;
1024 #
1025 # Example (Logic):
1026 #
1027 # title: &quot;Public documents&quot;
1028 # description: &quot;Determine whether the document should be publicly visible&quot;
1029 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1030 #
1031 # Example (Data Manipulation):
1032 #
1033 # title: &quot;Notification string&quot;
1034 # description: &quot;Create a notification string with a timestamp.&quot;
1035 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1036 #
1037 # The exact variables and functions that may be referenced within an expression
1038 # are determined by the service that evaluates it. See the service
1039 # documentation for additional information.
1040 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1041 # reporting, e.g. a file name and a position in the file.
1042 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1043 # its purpose. This can be used e.g. in UIs which allow to enter the
1044 # expression.
1045 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1046 # describes the expression, e.g. when hovered over it in a UI.
1047 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1048 # syntax.
1049 },
1050 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001051 # `members` can have the following values:
1052 #
1053 # * `allUsers`: A special identifier that represents anyone who is
1054 # on the internet; with or without a Google account.
1055 #
1056 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1057 # who is authenticated with a Google account or a service account.
1058 #
1059 # * `user:{emailid}`: An email address that represents a specific Google
1060 # account. For example, `alice@example.com` .
1061 #
1062 #
1063 # * `serviceAccount:{emailid}`: An email address that represents a service
1064 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1065 #
1066 # * `group:{emailid}`: An email address that represents a Google group.
1067 # For example, `admins@example.com`.
1068 #
1069 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1070 # identifier) representing a user that has been recently deleted. For
1071 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1072 # recovered, this value reverts to `user:{emailid}` and the recovered user
1073 # retains the role in the binding.
1074 #
1075 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1076 # unique identifier) representing a service account that has been recently
1077 # deleted. For example,
1078 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1079 # If the service account is undeleted, this value reverts to
1080 # `serviceAccount:{emailid}` and the undeleted service account retains the
1081 # role in the binding.
1082 #
1083 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1084 # identifier) representing a Google group that has been recently
1085 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1086 # the group is recovered, this value reverts to `group:{emailid}` and the
1087 # recovered group retains the role in the binding.
1088 #
1089 #
1090 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1091 # users of that domain. For example, `google.com` or `example.com`.
1092 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001093 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001094 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001095 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1096 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001097 },
1098 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001099 }</pre>
1100</div>
1101
1102<div class="method">
1103 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
1104 <pre>Returns permissions that the caller has on the specified database or backup
1105resource.
1106
1107Attempting this RPC on a non-existent Cloud Spanner database will
1108result in a NOT_FOUND error if the user has
1109`spanner.databases.list` permission on the containing Cloud
1110Spanner instance. Otherwise returns an empty set of permissions.
1111Calling this method on a backup that does not exist will
1112result in a NOT_FOUND error if the user has
1113`spanner.backups.list` permission on the containing instance.
1114
1115Args:
1116 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)
1117 body: object, The request body.
1118 The object takes the form of:
1119
1120{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001121 &quot;permissions&quot;: [ # REQUIRED: The set of permissions to check for &#x27;resource&#x27;.
1122 # Permissions with wildcards (such as &#x27;*&#x27;, &#x27;spanner.*&#x27;, &#x27;spanner.instances.*&#x27;) are not allowed.
1123 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001124 ],
1125 }
1126
1127 x__xgafv: string, V1 error format.
1128 Allowed values
1129 1 - v1 error format
1130 2 - v2 error format
1131
1132Returns:
1133 An object of the form:
1134
1135 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Dan O'Mearadd494642020-05-01 07:42:23 -07001137 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001138 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001139 ],
1140 }</pre>
1141</div>
1142
1143<div class="method">
1144 <code class="details" id="updateDdl">updateDdl(database, body=None, x__xgafv=None)</code>
1145 <pre>Updates the schema of a Cloud Spanner database by
1146creating/altering/dropping tables, columns, indexes, etc. The returned
1147long-running operation will have a name of
1148the format `&lt;database_name&gt;/operations/&lt;operation_id&gt;` and can be used to
1149track execution of the schema change(s). The
1150metadata field type is
1151UpdateDatabaseDdlMetadata. The operation has no response.
1152
1153Args:
1154 database: string, Required. The database to update. (required)
1155 body: object, The request body.
1156 The object takes the form of:
1157
1158{ # Enqueues the given DDL statements to be applied, in order but not
1159 # necessarily all at once, to the database schema at some point (or
1160 # points) in the future. The server checks that the statements
1161 # are executable (syntactically valid, name tables that exist, etc.)
1162 # before enqueueing them, but they may still fail upon
1163 # later execution (e.g., if a statement from another batch of
1164 # statements is applied first and it conflicts in some way, or if
1165 # there is some data-related problem like a `NULL` value in a column to
1166 # which `NOT NULL` would be added). If a statement fails, all
1167 # subsequent statements in the batch are automatically cancelled.
1168 #
1169 # Each batch of statements is assigned a name which can be used with
1170 # the Operations API to monitor
1171 # progress. See the
1172 # operation_id field for more
1173 # details.
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 &quot;statements&quot;: [ # Required. DDL statements to be applied to the database.
1175 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001176 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 &quot;operationId&quot;: &quot;A String&quot;, # If empty, the new update request is assigned an
Dan O'Mearadd494642020-05-01 07:42:23 -07001178 # automatically-generated operation ID. Otherwise, `operation_id`
1179 # is used to construct the name of the resulting
1180 # Operation.
1181 #
1182 # Specifying an explicit operation ID simplifies determining
1183 # whether the statements were executed in the event that the
1184 # UpdateDatabaseDdl call is replayed,
1185 # or the return value is otherwise lost: the database and
1186 # `operation_id` fields can be combined to form the
1187 # name of the resulting
1188 # longrunning.Operation: `&lt;database&gt;/operations/&lt;operation_id&gt;`.
1189 #
1190 # `operation_id` should be unique within the database, and must be
1191 # a valid identifier: `a-z*`. Note that
1192 # automatically-generated operation IDs always begin with an
1193 # underscore. If the named operation already exists,
1194 # UpdateDatabaseDdl returns
1195 # `ALREADY_EXISTS`.
1196 }
1197
1198 x__xgafv: string, V1 error format.
1199 Allowed values
1200 1 - v1 error format
1201 2 - v2 error format
1202
1203Returns:
1204 An object of the form:
1205
1206 { # This resource represents a long-running operation that is the result of a
1207 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -07001209 # If `true`, the operation is completed, and either `error` or `response` is
1210 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -07001211 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -07001212 # method returns no data on success, such as `Delete`, the response is
1213 # `google.protobuf.Empty`. If the original method is standard
1214 # `Get`/`Create`/`Update`, the response should be the resource. For other
1215 # methods, the response should have the type `XxxResponse`, where `Xxx`
1216 # is the original method name. For example, if the original method name
1217 # is `TakeSnapshot()`, the inferred response type is
1218 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001219 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001220 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -07001222 # originally returns it. If you use the default HTTP mapping, the
1223 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001224 &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.
1225 # different programming environments, including REST APIs and RPC APIs. It is
1226 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1227 # three pieces of data: error code, error message, and error details.
1228 #
1229 # You can find out more about this error model and how to work with it in the
1230 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1231 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1232 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1233 # user-facing error message should be localized and sent in the
1234 # google.rpc.Status.details field, or localized by the client.
1235 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1236 # message types for APIs to use.
1237 {
1238 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1239 },
1240 ],
1241 },
1242 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 # contains progress information and common metadata such as create time.
1244 # Some services might not provide such metadata. Any method that returns a
1245 # long-running operation should document the metadata type, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001247 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001248 }</pre>
1249</div>
1250
1251</body></html>