blob: 24b214076c05252ae09c8492a9ae8c0cf0fa1aec [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 Kim715bd7f2019-06-14 16:50:42 -0700103 <code><a href="#list">list(parent, pageSize=None, pageToken=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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 "extraStatements": [ # 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.
143 "A String",
144 ],
145 "createStatement": "A String", # Required. A `CREATE DATABASE` statement, which specifies the ID of the
146 # 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 Kim715bd7f2019-06-14 16:50:42 -0700162 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
163 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700164 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
165 # three pieces of data: error code, error message, and error details.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700167 # You can find out more about this error model and how to work with it in the
168 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400169 "message": "A String", # A developer-facing error message, which should be in English. Any
170 # user-facing error message should be localized and sent in the
171 # google.rpc.Status.details field, or localized by the client.
172 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700173 "details": [ # A list of messages that carry the error details. There is a common set of
174 # message types for APIs to use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400175 {
176 "a_key": "", # Properties of the object. Contains field @type with type URL.
177 },
178 ],
179 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 "done": True or False, # If the value is `false`, it means the operation is still in progress.
181 # If `true`, the operation is completed, and either `error` or `response` is
182 # available.
183 "response": { # The normal response of the operation in case of success. If the original
184 # method returns no data on success, such as `Delete`, the response is
185 # `google.protobuf.Empty`. If the original method is standard
186 # `Get`/`Create`/`Update`, the response should be the resource. For other
187 # methods, the response should have the type `XxxResponse`, where `Xxx`
188 # is the original method name. For example, if the original method name
189 # is `TakeSnapshot()`, the inferred response type is
190 # `TakeSnapshotResponse`.
191 "a_key": "", # Properties of the object. Contains field @type with type URL.
192 },
193 "name": "A String", # The server-assigned name, which is only unique within the same service that
194 # originally returns it. If you use the default HTTP mapping, the
195 # `name` should be a resource name ending with `operations/{unique_id}`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 "metadata": { # Service-specific metadata associated with the operation. It typically
197 # 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.
200 "a_key": "", # Properties of the object. Contains field @type with type URL.
201 },
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.
249 "state": "A String", # Output only. The current database state.
250 "name": "A String", # Required. The name of the database. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`,
252 # where `&lt;database&gt;` is as specified in the `CREATE DATABASE`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400253 # statement. This name can be passed to other API methods to
254 # identify the database.
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 "createTime": "A String", # Output only. If exists, the time at which the database creation started.
256 "restoreInfo": { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information
257 # about the restore source.
258 "backupInfo": { # Information about a backup. # Information about the backup used to restore the database. The backup
259 # may no longer exist.
260 "backup": "A String", # Name of the backup.
261 "createTime": "A String", # The backup contains an externally consistent copy of `source_database` at
262 # the timestamp specified by `create_time`.
263 "sourceDatabase": "A String", # Name of the database the backup was created from.
264 },
265 "sourceType": "A String", # The type of the restore source.
266 },
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.
287 "statements": [ # A list of formatted DDL statements defining the schema of the database
288 # specified in the request.
289 "A String",
290 ],
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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700311 "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
312 # `GetIamPolicy`. This field is only used by Cloud IAM.
313 "requestedPolicyVersion": 42, # Optional. The policy format version to be returned.
314 #
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 # {
350 # "bindings": [
351 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 # "role": "roles/resourcemanager.organizationAdmin",
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400353 # "members": [
354 # "user:mike@example.com",
355 # "group:admins@example.com",
356 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400358 # ]
359 # },
360 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 # "role": "roles/resourcemanager.organizationViewer",
362 # "members": ["user:eve@example.com"],
363 # "condition": {
364 # "title": "expirable access",
365 # "description": "Does not grant access after Sep 2020",
366 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
367 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400368 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # ],
370 # "etag": "BwWWja0YfJA=",
371 # "version": 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
389 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
390 # - 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/).
395 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
396 # `condition` that determines how and when the `bindings` are applied. Each
397 # of the `bindings` must contain at least one member.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400398 { # Associates `members` with a `role`.
399 "role": "A String", # Role that is assigned to `members`.
400 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400401 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
402 # `members` can have the following values:
403 #
404 # * `allUsers`: A special identifier that represents anyone who is
405 # on the internet; with or without a Google account.
406 #
407 # * `allAuthenticatedUsers`: A special identifier that represents anyone
408 # who is authenticated with a Google account or a service account.
409 #
410 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400412 #
413 #
414 # * `serviceAccount:{emailid}`: An email address that represents a service
415 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
416 #
417 # * `group:{emailid}`: An email address that represents a Google group.
418 # For example, `admins@example.com`.
419 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700420 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
421 # identifier) representing a user that has been recently deleted. For
422 # example, `alice@example.com?uid=123456789012345678901`. If the user is
423 # recovered, this value reverts to `user:{emailid}` and the recovered user
424 # retains the role in the binding.
425 #
426 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
427 # unique identifier) representing a service account that has been recently
428 # deleted. For example,
429 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
430 # If the service account is undeleted, this value reverts to
431 # `serviceAccount:{emailid}` and the undeleted service account retains the
432 # role in the binding.
433 #
434 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
435 # identifier) representing a Google group that has been recently
436 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
437 # the group is recovered, this value reverts to `group:{emailid}` and the
438 # recovered group retains the role in the binding.
439 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 #
441 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400442 # users of that domain. For example, `google.com` or `example.com`.
443 #
444 "A String",
445 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 # NOTE: An unsatisfied condition will not allow user access via current
448 # binding. Different bindings, including their conditions, are examined
449 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -0700450 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
451 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700453 # Example (Comparison):
454 #
455 # title: "Summary size limit"
456 # description: "Determines if a summary is less than 100 chars"
457 # expression: "document.summary.size() &lt; 100"
458 #
459 # Example (Equality):
460 #
461 # title: "Requestor is owner"
462 # description: "Determines if requestor is the document owner"
463 # expression: "document.owner == request.auth.claims.email"
464 #
465 # Example (Logic):
466 #
467 # title: "Public documents"
468 # description: "Determine whether the document should be publicly visible"
469 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
470 #
471 # Example (Data Manipulation):
472 #
473 # title: "Notification string"
474 # description: "Create a notification string with a timestamp."
475 # expression: "'New message received at ' + string(document.create_time)"
476 #
477 # The exact variables and functions that may be referenced within an expression
478 # are determined by the service that evaluates it. See the service
479 # documentation for additional information.
480 "location": "A String", # Optional. String indicating the location of the expression for error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 "expression": "A String", # Textual representation of an expression in Common Expression Language
483 # syntax.
484 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 # its purpose. This can be used e.g. in UIs which allow to enter the
488 # expression.
489 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400490 },
491 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700492 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
493 # prevent simultaneous updates of a policy from overwriting each other.
494 # It is strongly suggested that systems make use of the `etag` in the
495 # read-modify-write cycle to perform policy updates in order to avoid race
496 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
497 # systems are expected to put that etag in the request to `setIamPolicy` to
498 # ensure that their change will be applied to the same version of the policy.
499 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 # **Important:** If you use IAM Conditions, you must include the `etag` field
501 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
502 # you to overwrite a version `3` policy with a version `1` policy, and all of
503 # the conditions in the version `3` policy are lost.
504 "version": 42, # Specifies the format of the policy.
505 #
506 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
507 # are rejected.
508 #
509 # Any operation that affects conditional role bindings must specify version
510 # `3`. This requirement applies to the following operations:
511 #
512 # * Getting a policy that includes a conditional role binding
513 # * Adding a conditional role binding to a policy
514 # * Changing a conditional role binding in a policy
515 # * Removing any role binding, with or without a condition, from a policy
516 # that includes conditions
517 #
518 # **Important:** If you use IAM Conditions, you must include the `etag` field
519 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
520 # you to overwrite a version `3` policy with a version `1` policy, and all of
521 # the conditions in the version `3` policy are lost.
522 #
523 # If a policy does not include any conditions, operations on that policy may
524 # specify any valid version or leave the field unset.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400525 }</pre>
526</div>
527
528<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 <code class="details" id="list">list(parent, pageSize=None, pageToken=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)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 pageSize: integer, Number of databases to be returned in the response. If 0 or less,
536defaults to the server's maximum allowed page size.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400537 pageToken: string, If non-empty, `page_token` should contain a
538next_page_token from a
539previous ListDatabasesResponse.
540 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.
549 "nextPageToken": "A String", # `next_page_token` can be sent in a subsequent
550 # ListDatabases call to fetch more
551 # of the matching databases.
552 "databases": [ # Databases that matched the request.
553 { # A Cloud Spanner database.
554 "state": "A String", # Output only. The current database state.
555 "name": "A String", # Required. The name of the database. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700556 # `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`,
557 # where `&lt;database&gt;` is as specified in the `CREATE DATABASE`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400558 # statement. This name can be passed to other API methods to
559 # identify the database.
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 "createTime": "A String", # Output only. If exists, the time at which the database creation started.
561 "restoreInfo": { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information
562 # about the restore source.
563 "backupInfo": { # Information about a backup. # Information about the backup used to restore the database. The backup
564 # may no longer exist.
565 "backup": "A String", # Name of the backup.
566 "createTime": "A String", # The backup contains an externally consistent copy of `source_database` at
567 # the timestamp specified by `create_time`.
568 "sourceDatabase": "A String", # Name of the database the backup was created from.
569 },
570 "sourceType": "A String", # The type of the restore source.
571 },
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:
586 A request object that you can call 'execute()' on to request the next
587 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.
622 "databaseId": "A String", # Required. The id of the database to create and restore to. This
623 # 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;`.
626 "backup": "A String", # Name of the backup from which to restore. Values are of the form
627 # `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 Kim715bd7f2019-06-14 16:50:42 -0700640 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
641 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
643 # three pieces of data: error code, error message, and error details.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400644 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 # You can find out more about this error model and how to work with it in the
646 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400647 "message": "A String", # A developer-facing error message, which should be in English. Any
648 # user-facing error message should be localized and sent in the
649 # google.rpc.Status.details field, or localized by the client.
650 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700651 "details": [ # A list of messages that carry the error details. There is a common set of
652 # message types for APIs to use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400653 {
654 "a_key": "", # Properties of the object. Contains field @type with type URL.
655 },
656 ],
657 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 "done": True or False, # If the value is `false`, it means the operation is still in progress.
659 # If `true`, the operation is completed, and either `error` or `response` is
660 # available.
661 "response": { # The normal response of the operation in case of success. If the original
662 # method returns no data on success, such as `Delete`, the response is
663 # `google.protobuf.Empty`. If the original method is standard
664 # `Get`/`Create`/`Update`, the response should be the resource. For other
665 # methods, the response should have the type `XxxResponse`, where `Xxx`
666 # is the original method name. For example, if the original method name
667 # is `TakeSnapshot()`, the inferred response type is
668 # `TakeSnapshotResponse`.
669 "a_key": "", # Properties of the object. Contains field @type with type URL.
670 },
671 "name": "A String", # The server-assigned name, which is only unique within the same service that
672 # originally returns it. If you use the default HTTP mapping, the
673 # `name` should be a resource name ending with `operations/{unique_id}`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700674 "metadata": { # Service-specific metadata associated with the operation. It typically
675 # 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.
678 "a_key": "", # Properties of the object. Contains field @type with type URL.
679 },
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.
699 "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
700 # 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 # {
720 # "bindings": [
721 # {
722 # "role": "roles/resourcemanager.organizationAdmin",
723 # "members": [
724 # "user:mike@example.com",
725 # "group:admins@example.com",
726 # "domain:google.com",
727 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
728 # ]
729 # },
730 # {
731 # "role": "roles/resourcemanager.organizationViewer",
732 # "members": ["user:eve@example.com"],
733 # "condition": {
734 # "title": "expirable access",
735 # "description": "Does not grant access after Sep 2020",
736 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
737 # }
738 # }
739 # ],
740 # "etag": "BwWWja0YfJA=",
741 # "version": 3
742 # }
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
759 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
760 # - 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/).
765 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
766 # `condition` that determines how and when the `bindings` are applied. Each
767 # of the `bindings` must contain at least one member.
768 { # Associates `members` with a `role`.
769 "role": "A String", # Role that is assigned to `members`.
770 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
771 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
772 # `members` can have the following values:
773 #
774 # * `allUsers`: A special identifier that represents anyone who is
775 # on the internet; with or without a Google account.
776 #
777 # * `allAuthenticatedUsers`: A special identifier that represents anyone
778 # who is authenticated with a Google account or a service account.
779 #
780 # * `user:{emailid}`: An email address that represents a specific Google
781 # account. For example, `alice@example.com` .
782 #
783 #
784 # * `serviceAccount:{emailid}`: An email address that represents a service
785 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
786 #
787 # * `group:{emailid}`: An email address that represents a Google group.
788 # For example, `admins@example.com`.
789 #
790 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
791 # identifier) representing a user that has been recently deleted. For
792 # example, `alice@example.com?uid=123456789012345678901`. If the user is
793 # recovered, this value reverts to `user:{emailid}` and the recovered user
794 # retains the role in the binding.
795 #
796 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
797 # unique identifier) representing a service account that has been recently
798 # deleted. For example,
799 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
800 # If the service account is undeleted, this value reverts to
801 # `serviceAccount:{emailid}` and the undeleted service account retains the
802 # role in the binding.
803 #
804 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
805 # identifier) representing a Google group that has been recently
806 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
807 # the group is recovered, this value reverts to `group:{emailid}` and the
808 # recovered group retains the role in the binding.
809 #
810 #
811 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
812 # users of that domain. For example, `google.com` or `example.com`.
813 #
814 "A String",
815 ],
816 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
817 # NOTE: An unsatisfied condition will not allow user access via current
818 # binding. Different bindings, including their conditions, are examined
819 # independently.
820 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
821 # are documented at https://github.com/google/cel-spec.
822 #
823 # Example (Comparison):
824 #
825 # title: "Summary size limit"
826 # description: "Determines if a summary is less than 100 chars"
827 # expression: "document.summary.size() &lt; 100"
828 #
829 # Example (Equality):
830 #
831 # title: "Requestor is owner"
832 # description: "Determines if requestor is the document owner"
833 # expression: "document.owner == request.auth.claims.email"
834 #
835 # Example (Logic):
836 #
837 # title: "Public documents"
838 # description: "Determine whether the document should be publicly visible"
839 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
840 #
841 # Example (Data Manipulation):
842 #
843 # title: "Notification string"
844 # description: "Create a notification string with a timestamp."
845 # expression: "'New message received at ' + string(document.create_time)"
846 #
847 # The exact variables and functions that may be referenced within an expression
848 # are determined by the service that evaluates it. See the service
849 # documentation for additional information.
850 "location": "A String", # Optional. String indicating the location of the expression for error
851 # reporting, e.g. a file name and a position in the file.
852 "expression": "A String", # Textual representation of an expression in Common Expression Language
853 # syntax.
854 "description": "A String", # Optional. Description of the expression. This is a longer text which
855 # describes the expression, e.g. when hovered over it in a UI.
856 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
857 # its purpose. This can be used e.g. in UIs which allow to enter the
858 # expression.
859 },
860 },
861 ],
862 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
863 # prevent simultaneous updates of a policy from overwriting each other.
864 # It is strongly suggested that systems make use of the `etag` in the
865 # read-modify-write cycle to perform policy updates in order to avoid race
866 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
867 # systems are expected to put that etag in the request to `setIamPolicy` to
868 # ensure that their change will be applied to the same version of the policy.
869 #
870 # **Important:** If you use IAM Conditions, you must include the `etag` field
871 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
872 # you to overwrite a version `3` policy with a version `1` policy, and all of
873 # the conditions in the version `3` policy are lost.
874 "version": 42, # Specifies the format of the policy.
875 #
876 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
877 # are rejected.
878 #
879 # Any operation that affects conditional role bindings must specify version
880 # `3`. This requirement applies to the following operations:
881 #
882 # * Getting a policy that includes a conditional role binding
883 # * Adding a conditional role binding to a policy
884 # * Changing a conditional role binding in a policy
885 # * Removing any role binding, with or without a condition, from a policy
886 # that includes conditions
887 #
888 # **Important:** If you use IAM Conditions, you must include the `etag` field
889 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
890 # you to overwrite a version `3` policy with a version `1` policy, and all of
891 # the conditions in the version `3` policy are lost.
892 #
893 # If a policy does not include any conditions, operations on that policy may
894 # specify any valid version or leave the field unset.
895 },
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 # {
924 # "bindings": [
925 # {
926 # "role": "roles/resourcemanager.organizationAdmin",
927 # "members": [
928 # "user:mike@example.com",
929 # "group:admins@example.com",
930 # "domain:google.com",
931 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
932 # ]
933 # },
934 # {
935 # "role": "roles/resourcemanager.organizationViewer",
936 # "members": ["user:eve@example.com"],
937 # "condition": {
938 # "title": "expirable access",
939 # "description": "Does not grant access after Sep 2020",
940 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
941 # }
942 # }
943 # ],
944 # "etag": "BwWWja0YfJA=",
945 # "version": 3
946 # }
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
963 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
964 # - 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/).
969 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
970 # `condition` that determines how and when the `bindings` are applied. Each
971 # of the `bindings` must contain at least one member.
972 { # Associates `members` with a `role`.
973 "role": "A String", # Role that is assigned to `members`.
974 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
975 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
976 # `members` can have the following values:
977 #
978 # * `allUsers`: A special identifier that represents anyone who is
979 # on the internet; with or without a Google account.
980 #
981 # * `allAuthenticatedUsers`: A special identifier that represents anyone
982 # who is authenticated with a Google account or a service account.
983 #
984 # * `user:{emailid}`: An email address that represents a specific Google
985 # account. For example, `alice@example.com` .
986 #
987 #
988 # * `serviceAccount:{emailid}`: An email address that represents a service
989 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
990 #
991 # * `group:{emailid}`: An email address that represents a Google group.
992 # For example, `admins@example.com`.
993 #
994 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
995 # identifier) representing a user that has been recently deleted. For
996 # example, `alice@example.com?uid=123456789012345678901`. If the user is
997 # recovered, this value reverts to `user:{emailid}` and the recovered user
998 # retains the role in the binding.
999 #
1000 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1001 # unique identifier) representing a service account that has been recently
1002 # deleted. For example,
1003 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1004 # If the service account is undeleted, this value reverts to
1005 # `serviceAccount:{emailid}` and the undeleted service account retains the
1006 # role in the binding.
1007 #
1008 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1009 # identifier) representing a Google group that has been recently
1010 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1011 # the group is recovered, this value reverts to `group:{emailid}` and the
1012 # recovered group retains the role in the binding.
1013 #
1014 #
1015 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1016 # users of that domain. For example, `google.com` or `example.com`.
1017 #
1018 "A String",
1019 ],
1020 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1021 # NOTE: An unsatisfied condition will not allow user access via current
1022 # binding. Different bindings, including their conditions, are examined
1023 # independently.
1024 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1025 # are documented at https://github.com/google/cel-spec.
1026 #
1027 # Example (Comparison):
1028 #
1029 # title: "Summary size limit"
1030 # description: "Determines if a summary is less than 100 chars"
1031 # expression: "document.summary.size() &lt; 100"
1032 #
1033 # Example (Equality):
1034 #
1035 # title: "Requestor is owner"
1036 # description: "Determines if requestor is the document owner"
1037 # expression: "document.owner == request.auth.claims.email"
1038 #
1039 # Example (Logic):
1040 #
1041 # title: "Public documents"
1042 # description: "Determine whether the document should be publicly visible"
1043 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1044 #
1045 # Example (Data Manipulation):
1046 #
1047 # title: "Notification string"
1048 # description: "Create a notification string with a timestamp."
1049 # expression: "'New message received at ' + string(document.create_time)"
1050 #
1051 # The exact variables and functions that may be referenced within an expression
1052 # are determined by the service that evaluates it. See the service
1053 # documentation for additional information.
1054 "location": "A String", # Optional. String indicating the location of the expression for error
1055 # reporting, e.g. a file name and a position in the file.
1056 "expression": "A String", # Textual representation of an expression in Common Expression Language
1057 # syntax.
1058 "description": "A String", # Optional. Description of the expression. This is a longer text which
1059 # describes the expression, e.g. when hovered over it in a UI.
1060 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
1061 # its purpose. This can be used e.g. in UIs which allow to enter the
1062 # expression.
1063 },
1064 },
1065 ],
1066 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1067 # prevent simultaneous updates of a policy from overwriting each other.
1068 # It is strongly suggested that systems make use of the `etag` in the
1069 # read-modify-write cycle to perform policy updates in order to avoid race
1070 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1071 # systems are expected to put that etag in the request to `setIamPolicy` to
1072 # ensure that their change will be applied to the same version of the policy.
1073 #
1074 # **Important:** If you use IAM Conditions, you must include the `etag` field
1075 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1076 # you to overwrite a version `3` policy with a version `1` policy, and all of
1077 # the conditions in the version `3` policy are lost.
1078 "version": 42, # Specifies the format of the policy.
1079 #
1080 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1081 # are rejected.
1082 #
1083 # Any operation that affects conditional role bindings must specify version
1084 # `3`. This requirement applies to the following operations:
1085 #
1086 # * Getting a policy that includes a conditional role binding
1087 # * Adding a conditional role binding to a policy
1088 # * Changing a conditional role binding in a policy
1089 # * Removing any role binding, with or without a condition, from a policy
1090 # that includes conditions
1091 #
1092 # **Important:** If you use IAM Conditions, you must include the `etag` field
1093 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1094 # you to overwrite a version `3` policy with a version `1` policy, and all of
1095 # the conditions in the version `3` policy are lost.
1096 #
1097 # If a policy does not include any conditions, operations on that policy may
1098 # specify any valid version or leave the field unset.
1099 }</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.
1121 "permissions": [ # REQUIRED: The set of permissions to check for 'resource'.
1122 # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.
1123 "A String",
1124 ],
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.
1136 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1137 # allowed.
1138 "A String",
1139 ],
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.
1174 "statements": [ # Required. DDL statements to be applied to the database.
1175 "A String",
1176 ],
1177 "operationId": "A String", # If empty, the new update request is assigned an
1178 # 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.
1208 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1209 # different programming environments, including REST APIs and RPC APIs. It is
1210 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1211 # three pieces of data: error code, error message, and error details.
1212 #
1213 # You can find out more about this error model and how to work with it in the
1214 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1215 "message": "A String", # A developer-facing error message, which should be in English. Any
1216 # user-facing error message should be localized and sent in the
1217 # google.rpc.Status.details field, or localized by the client.
1218 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1219 "details": [ # A list of messages that carry the error details. There is a common set of
1220 # message types for APIs to use.
1221 {
1222 "a_key": "", # Properties of the object. Contains field @type with type URL.
1223 },
1224 ],
1225 },
1226 "done": True or False, # If the value is `false`, it means the operation is still in progress.
1227 # If `true`, the operation is completed, and either `error` or `response` is
1228 # available.
1229 "response": { # The normal response of the operation in case of success. If the original
1230 # method returns no data on success, such as `Delete`, the response is
1231 # `google.protobuf.Empty`. If the original method is standard
1232 # `Get`/`Create`/`Update`, the response should be the resource. For other
1233 # methods, the response should have the type `XxxResponse`, where `Xxx`
1234 # is the original method name. For example, if the original method name
1235 # is `TakeSnapshot()`, the inferred response type is
1236 # `TakeSnapshotResponse`.
1237 "a_key": "", # Properties of the object. Contains field @type with type URL.
1238 },
1239 "name": "A String", # The server-assigned name, which is only unique within the same service that
1240 # originally returns it. If you use the default HTTP mapping, the
1241 # `name` should be a resource name ending with `operations/{unique_id}`.
1242 "metadata": { # Service-specific metadata associated with the operation. It typically
1243 # 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.
1246 "a_key": "", # Properties of the object. Contains field @type with type URL.
1247 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001248 }</pre>
1249</div>
1250
1251</body></html>