• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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">
88  <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p>
89<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">
94  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
95<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">
100  <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
101<p class="firstline">Gets the access control policy for a database resource.</p>
102<p class="toc_element">
103  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
104<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">
109  <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
110<p class="firstline">Sets the access control policy on a database resource.</p>
111<p class="toc_element">
112  <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
113<p class="firstline">Returns permissions that the caller has on the specified database resource.</p>
114<p class="toc_element">
115  <code><a href="#updateDdl">updateDdl(database, body, x__xgafv=None)</a></code></p>
116<p class="firstline">Updates the schema of a Cloud Spanner database by</p>
117<h3>Method Details</h3>
118<div class="method">
119    <code class="details" id="create">create(parent, body, x__xgafv=None)</code>
120  <pre>Creates a new Cloud Spanner database and starts to prepare it for serving.
121The returned long-running operation will
122have a name of the format `<database_name>/operations/<operation_id>` and
123can be used to track preparation of the database. The
124metadata field type is
125CreateDatabaseMetadata. The
126response field type is
127Database, if successful.
128
129Args:
130  parent: string, Required. The name of the instance that will serve the new database.
131Values are of the form `projects/<project>/instances/<instance>`. (required)
132  body: object, The request body. (required)
133    The object takes the form of:
134
135{ # The request for CreateDatabase.
136    "extraStatements": [ # An optional list of DDL statements to run inside the newly created
137        # database. Statements can create tables, indexes, etc. These
138        # statements execute atomically with the creation of the database:
139        # if there is an error in any statement, the database is not created.
140      "A String",
141    ],
142    "createStatement": "A String", # Required. A `CREATE DATABASE` statement, which specifies the ID of the
143        # new database.  The database ID must conform to the regular expression
144        # `a-z*[a-z0-9]` and be between 2 and 30 characters in length.
145        # If the database ID is a reserved word or if it contains a hyphen, the
146        # database ID must be enclosed in backticks (`` ` ``).
147  }
148
149  x__xgafv: string, V1 error format.
150    Allowed values
151      1 - v1 error format
152      2 - v2 error format
153
154Returns:
155  An object of the form:
156
157    { # This resource represents a long-running operation that is the result of a
158      # network API call.
159    "metadata": { # Service-specific metadata associated with the operation.  It typically
160        # contains progress information and common metadata such as create time.
161        # Some services might not provide such metadata.  Any method that returns a
162        # long-running operation should document the metadata type, if any.
163      "a_key": "", # Properties of the object. Contains field @type with type URL.
164    },
165    "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.
166        # different programming environments, including REST APIs and RPC APIs. It is
167        # used by [gRPC](https://github.com/grpc). The error model is designed to be:
168        #
169        # - Simple to use and understand for most users
170        # - Flexible enough to meet unexpected needs
171        #
172        # # Overview
173        #
174        # The `Status` message contains three pieces of data: error code, error
175        # message, and error details. The error code should be an enum value of
176        # google.rpc.Code, but it may accept additional error codes if needed.  The
177        # error message should be a developer-facing English message that helps
178        # developers *understand* and *resolve* the error. If a localized user-facing
179        # error message is needed, put the localized message in the error details or
180        # localize it in the client. The optional error details may contain arbitrary
181        # information about the error. There is a predefined set of error detail types
182        # in the package `google.rpc` that can be used for common error conditions.
183        #
184        # # Language mapping
185        #
186        # The `Status` message is the logical representation of the error model, but it
187        # is not necessarily the actual wire format. When the `Status` message is
188        # exposed in different client libraries and different wire protocols, it can be
189        # mapped differently. For example, it will likely be mapped to some exceptions
190        # in Java, but more likely mapped to some error codes in C.
191        #
192        # # Other uses
193        #
194        # The error model and the `Status` message can be used in a variety of
195        # environments, either with or without APIs, to provide a
196        # consistent developer experience across different environments.
197        #
198        # Example uses of this error model include:
199        #
200        # - Partial errors. If a service needs to return partial errors to the client,
201        #     it may embed the `Status` in the normal response to indicate the partial
202        #     errors.
203        #
204        # - Workflow errors. A typical workflow has multiple steps. Each step may
205        #     have a `Status` message for error reporting.
206        #
207        # - Batch operations. If a client uses batch request and batch response, the
208        #     `Status` message should be used directly inside batch response, one for
209        #     each error sub-response.
210        #
211        # - Asynchronous operations. If an API call embeds asynchronous operation
212        #     results in its response, the status of those operations should be
213        #     represented directly using the `Status` message.
214        #
215        # - Logging. If some API errors are stored in logs, the message `Status` could
216        #     be used directly after any stripping needed for security/privacy reasons.
217      "message": "A String", # A developer-facing error message, which should be in English. Any
218          # user-facing error message should be localized and sent in the
219          # google.rpc.Status.details field, or localized by the client.
220      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
221      "details": [ # A list of messages that carry the error details.  There is a common set of
222          # message types for APIs to use.
223        {
224          "a_key": "", # Properties of the object. Contains field @type with type URL.
225        },
226      ],
227    },
228    "done": True or False, # If the value is `false`, it means the operation is still in progress.
229        # If `true`, the operation is completed, and either `error` or `response` is
230        # available.
231    "response": { # The normal response of the operation in case of success.  If the original
232        # method returns no data on success, such as `Delete`, the response is
233        # `google.protobuf.Empty`.  If the original method is standard
234        # `Get`/`Create`/`Update`, the response should be the resource.  For other
235        # methods, the response should have the type `XxxResponse`, where `Xxx`
236        # is the original method name.  For example, if the original method name
237        # is `TakeSnapshot()`, the inferred response type is
238        # `TakeSnapshotResponse`.
239      "a_key": "", # Properties of the object. Contains field @type with type URL.
240    },
241    "name": "A String", # The server-assigned name, which is only unique within the same service that
242        # originally returns it. If you use the default HTTP mapping, the
243        # `name` should be a resource name ending with `operations/{unique_id}`.
244  }</pre>
245</div>
246
247<div class="method">
248    <code class="details" id="dropDatabase">dropDatabase(database, x__xgafv=None)</code>
249  <pre>Drops (aka deletes) a Cloud Spanner database.
250
251Args:
252  database: string, Required. The database to be dropped. (required)
253  x__xgafv: string, V1 error format.
254    Allowed values
255      1 - v1 error format
256      2 - v2 error format
257
258Returns:
259  An object of the form:
260
261    { # A generic empty message that you can re-use to avoid defining duplicated
262      # empty messages in your APIs. A typical example is to use it as the request
263      # or the response type of an API method. For instance:
264      #
265      #     service Foo {
266      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
267      #     }
268      #
269      # The JSON representation for `Empty` is empty JSON object `{}`.
270  }</pre>
271</div>
272
273<div class="method">
274    <code class="details" id="get">get(name, x__xgafv=None)</code>
275  <pre>Gets the state of a Cloud Spanner database.
276
277Args:
278  name: string, Required. The name of the requested database. Values are of the form
279`projects/<project>/instances/<instance>/databases/<database>`. (required)
280  x__xgafv: string, V1 error format.
281    Allowed values
282      1 - v1 error format
283      2 - v2 error format
284
285Returns:
286  An object of the form:
287
288    { # A Cloud Spanner database.
289    "state": "A String", # Output only. The current database state.
290    "name": "A String", # Required. The name of the database. Values are of the form
291        # `projects/<project>/instances/<instance>/databases/<database>`,
292        # where `<database>` is as specified in the `CREATE DATABASE`
293        # statement. This name can be passed to other API methods to
294        # identify the database.
295  }</pre>
296</div>
297
298<div class="method">
299    <code class="details" id="getDdl">getDdl(database, x__xgafv=None)</code>
300  <pre>Returns the schema of a Cloud Spanner database as a list of formatted
301DDL statements. This method does not show pending schema updates, those may
302be queried using the Operations API.
303
304Args:
305  database: string, Required. The database whose schema we wish to get. (required)
306  x__xgafv: string, V1 error format.
307    Allowed values
308      1 - v1 error format
309      2 - v2 error format
310
311Returns:
312  An object of the form:
313
314    { # The response for GetDatabaseDdl.
315    "statements": [ # A list of formatted DDL statements defining the schema of the database
316        # specified in the request.
317      "A String",
318    ],
319  }</pre>
320</div>
321
322<div class="method">
323    <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
324  <pre>Gets the access control policy for a database resource.
325Returns an empty policy if a database exists but does
326not have a policy set.
327
328Authorization requires `spanner.databases.getIamPolicy` permission on
329resource.
330
331Args:
332  resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources. (required)
333  body: object, The request body.
334    The object takes the form of:
335
336{ # Request message for `GetIamPolicy` method.
337  }
338
339  x__xgafv: string, V1 error format.
340    Allowed values
341      1 - v1 error format
342      2 - v2 error format
343
344Returns:
345  An object of the form:
346
347    { # Defines an Identity and Access Management (IAM) policy. It is used to
348      # specify access control policies for Cloud Platform resources.
349      #
350      #
351      # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
352      # `members` to a `role`, where the members can be user accounts, Google groups,
353      # Google domains, and service accounts. A `role` is a named list of permissions
354      # defined by IAM.
355      #
356      # **JSON Example**
357      #
358      #     {
359      #       "bindings": [
360      #         {
361      #           "role": "roles/owner",
362      #           "members": [
363      #             "user:mike@example.com",
364      #             "group:admins@example.com",
365      #             "domain:google.com",
366      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
367      #           ]
368      #         },
369      #         {
370      #           "role": "roles/viewer",
371      #           "members": ["user:sean@example.com"]
372      #         }
373      #       ]
374      #     }
375      #
376      # **YAML Example**
377      #
378      #     bindings:
379      #     - members:
380      #       - user:mike@example.com
381      #       - group:admins@example.com
382      #       - domain:google.com
383      #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
384      #       role: roles/owner
385      #     - members:
386      #       - user:sean@example.com
387      #       role: roles/viewer
388      #
389      #
390      # For a description of IAM and its features, see the
391      # [IAM developer's guide](https://cloud.google.com/iam/docs).
392    "bindings": [ # Associates a list of `members` to a `role`.
393        # `bindings` with no members will result in an error.
394      { # Associates `members` with a `role`.
395        "role": "A String", # Role that is assigned to `members`.
396            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
397        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
398            # `members` can have the following values:
399            #
400            # * `allUsers`: A special identifier that represents anyone who is
401            #    on the internet; with or without a Google account.
402            #
403            # * `allAuthenticatedUsers`: A special identifier that represents anyone
404            #    who is authenticated with a Google account or a service account.
405            #
406            # * `user:{emailid}`: An email address that represents a specific Google
407            #    account. For example, `alice@gmail.com` .
408            #
409            #
410            # * `serviceAccount:{emailid}`: An email address that represents a service
411            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
412            #
413            # * `group:{emailid}`: An email address that represents a Google group.
414            #    For example, `admins@example.com`.
415            #
416            #
417            # * `domain:{domain}`: The G Suite domain (primary) that represents all the
418            #    users of that domain. For example, `google.com` or `example.com`.
419            #
420          "A String",
421        ],
422        "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
423            # NOTE: An unsatisfied condition will not allow user access via current
424            # binding. Different bindings, including their conditions, are examined
425            # independently.
426            #
427            #     title: "User account presence"
428            #     description: "Determines whether the request has a user account"
429            #     expression: "size(request.user) > 0"
430          "location": "A String", # An optional string indicating the location of the expression for error
431              # reporting, e.g. a file name and a position in the file.
432          "expression": "A String", # Textual representation of an expression in
433              # Common Expression Language syntax.
434              #
435              # The application context of the containing message determines which
436              # well-known feature set of CEL is supported.
437          "description": "A String", # An optional description of the expression. This is a longer text which
438              # describes the expression, e.g. when hovered over it in a UI.
439          "title": "A String", # An optional title for the expression, i.e. a short string describing
440              # its purpose. This can be used e.g. in UIs which allow to enter the
441              # expression.
442        },
443      },
444    ],
445    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
446        # prevent simultaneous updates of a policy from overwriting each other.
447        # It is strongly suggested that systems make use of the `etag` in the
448        # read-modify-write cycle to perform policy updates in order to avoid race
449        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
450        # systems are expected to put that etag in the request to `setIamPolicy` to
451        # ensure that their change will be applied to the same version of the policy.
452        #
453        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
454        # policy is overwritten blindly.
455    "version": 42, # Deprecated.
456  }</pre>
457</div>
458
459<div class="method">
460    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
461  <pre>Lists Cloud Spanner databases.
462
463Args:
464  parent: string, Required. The instance whose databases should be listed.
465Values are of the form `projects/<project>/instances/<instance>`. (required)
466  pageSize: integer, Number of databases to be returned in the response. If 0 or less,
467defaults to the server's maximum allowed page size.
468  pageToken: string, If non-empty, `page_token` should contain a
469next_page_token from a
470previous ListDatabasesResponse.
471  x__xgafv: string, V1 error format.
472    Allowed values
473      1 - v1 error format
474      2 - v2 error format
475
476Returns:
477  An object of the form:
478
479    { # The response for ListDatabases.
480    "nextPageToken": "A String", # `next_page_token` can be sent in a subsequent
481        # ListDatabases call to fetch more
482        # of the matching databases.
483    "databases": [ # Databases that matched the request.
484      { # A Cloud Spanner database.
485        "state": "A String", # Output only. The current database state.
486        "name": "A String", # Required. The name of the database. Values are of the form
487            # `projects/<project>/instances/<instance>/databases/<database>`,
488            # where `<database>` is as specified in the `CREATE DATABASE`
489            # statement. This name can be passed to other API methods to
490            # identify the database.
491      },
492    ],
493  }</pre>
494</div>
495
496<div class="method">
497    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
498  <pre>Retrieves the next page of results.
499
500Args:
501  previous_request: The request for the previous page. (required)
502  previous_response: The response from the request for the previous page. (required)
503
504Returns:
505  A request object that you can call 'execute()' on to request the next
506  page. Returns None if there are no more items in the collection.
507    </pre>
508</div>
509
510<div class="method">
511    <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
512  <pre>Sets the access control policy on a database resource.
513Replaces any existing policy.
514
515Authorization requires `spanner.databases.setIamPolicy`
516permission on resource.
517
518Args:
519  resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for databases resources. (required)
520  body: object, The request body. (required)
521    The object takes the form of:
522
523{ # Request message for `SetIamPolicy` method.
524    "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
525        # the policy is limited to a few 10s of KB. An empty policy is a
526        # valid policy but certain Cloud Platform services (such as Projects)
527        # might reject them.
528        # specify access control policies for Cloud Platform resources.
529        #
530        #
531        # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
532        # `members` to a `role`, where the members can be user accounts, Google groups,
533        # Google domains, and service accounts. A `role` is a named list of permissions
534        # defined by IAM.
535        #
536        # **JSON Example**
537        #
538        #     {
539        #       "bindings": [
540        #         {
541        #           "role": "roles/owner",
542        #           "members": [
543        #             "user:mike@example.com",
544        #             "group:admins@example.com",
545        #             "domain:google.com",
546        #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
547        #           ]
548        #         },
549        #         {
550        #           "role": "roles/viewer",
551        #           "members": ["user:sean@example.com"]
552        #         }
553        #       ]
554        #     }
555        #
556        # **YAML Example**
557        #
558        #     bindings:
559        #     - members:
560        #       - user:mike@example.com
561        #       - group:admins@example.com
562        #       - domain:google.com
563        #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
564        #       role: roles/owner
565        #     - members:
566        #       - user:sean@example.com
567        #       role: roles/viewer
568        #
569        #
570        # For a description of IAM and its features, see the
571        # [IAM developer's guide](https://cloud.google.com/iam/docs).
572      "bindings": [ # Associates a list of `members` to a `role`.
573          # `bindings` with no members will result in an error.
574        { # Associates `members` with a `role`.
575          "role": "A String", # Role that is assigned to `members`.
576              # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
577          "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
578              # `members` can have the following values:
579              #
580              # * `allUsers`: A special identifier that represents anyone who is
581              #    on the internet; with or without a Google account.
582              #
583              # * `allAuthenticatedUsers`: A special identifier that represents anyone
584              #    who is authenticated with a Google account or a service account.
585              #
586              # * `user:{emailid}`: An email address that represents a specific Google
587              #    account. For example, `alice@gmail.com` .
588              #
589              #
590              # * `serviceAccount:{emailid}`: An email address that represents a service
591              #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
592              #
593              # * `group:{emailid}`: An email address that represents a Google group.
594              #    For example, `admins@example.com`.
595              #
596              #
597              # * `domain:{domain}`: The G Suite domain (primary) that represents all the
598              #    users of that domain. For example, `google.com` or `example.com`.
599              #
600            "A String",
601          ],
602          "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
603              # NOTE: An unsatisfied condition will not allow user access via current
604              # binding. Different bindings, including their conditions, are examined
605              # independently.
606              #
607              #     title: "User account presence"
608              #     description: "Determines whether the request has a user account"
609              #     expression: "size(request.user) > 0"
610            "location": "A String", # An optional string indicating the location of the expression for error
611                # reporting, e.g. a file name and a position in the file.
612            "expression": "A String", # Textual representation of an expression in
613                # Common Expression Language syntax.
614                #
615                # The application context of the containing message determines which
616                # well-known feature set of CEL is supported.
617            "description": "A String", # An optional description of the expression. This is a longer text which
618                # describes the expression, e.g. when hovered over it in a UI.
619            "title": "A String", # An optional title for the expression, i.e. a short string describing
620                # its purpose. This can be used e.g. in UIs which allow to enter the
621                # expression.
622          },
623        },
624      ],
625      "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
626          # prevent simultaneous updates of a policy from overwriting each other.
627          # It is strongly suggested that systems make use of the `etag` in the
628          # read-modify-write cycle to perform policy updates in order to avoid race
629          # conditions: An `etag` is returned in the response to `getIamPolicy`, and
630          # systems are expected to put that etag in the request to `setIamPolicy` to
631          # ensure that their change will be applied to the same version of the policy.
632          #
633          # If no `etag` is provided in the call to `setIamPolicy`, then the existing
634          # policy is overwritten blindly.
635      "version": 42, # Deprecated.
636    },
637  }
638
639  x__xgafv: string, V1 error format.
640    Allowed values
641      1 - v1 error format
642      2 - v2 error format
643
644Returns:
645  An object of the form:
646
647    { # Defines an Identity and Access Management (IAM) policy. It is used to
648      # specify access control policies for Cloud Platform resources.
649      #
650      #
651      # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
652      # `members` to a `role`, where the members can be user accounts, Google groups,
653      # Google domains, and service accounts. A `role` is a named list of permissions
654      # defined by IAM.
655      #
656      # **JSON Example**
657      #
658      #     {
659      #       "bindings": [
660      #         {
661      #           "role": "roles/owner",
662      #           "members": [
663      #             "user:mike@example.com",
664      #             "group:admins@example.com",
665      #             "domain:google.com",
666      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
667      #           ]
668      #         },
669      #         {
670      #           "role": "roles/viewer",
671      #           "members": ["user:sean@example.com"]
672      #         }
673      #       ]
674      #     }
675      #
676      # **YAML Example**
677      #
678      #     bindings:
679      #     - members:
680      #       - user:mike@example.com
681      #       - group:admins@example.com
682      #       - domain:google.com
683      #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
684      #       role: roles/owner
685      #     - members:
686      #       - user:sean@example.com
687      #       role: roles/viewer
688      #
689      #
690      # For a description of IAM and its features, see the
691      # [IAM developer's guide](https://cloud.google.com/iam/docs).
692    "bindings": [ # Associates a list of `members` to a `role`.
693        # `bindings` with no members will result in an error.
694      { # Associates `members` with a `role`.
695        "role": "A String", # Role that is assigned to `members`.
696            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
697        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
698            # `members` can have the following values:
699            #
700            # * `allUsers`: A special identifier that represents anyone who is
701            #    on the internet; with or without a Google account.
702            #
703            # * `allAuthenticatedUsers`: A special identifier that represents anyone
704            #    who is authenticated with a Google account or a service account.
705            #
706            # * `user:{emailid}`: An email address that represents a specific Google
707            #    account. For example, `alice@gmail.com` .
708            #
709            #
710            # * `serviceAccount:{emailid}`: An email address that represents a service
711            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
712            #
713            # * `group:{emailid}`: An email address that represents a Google group.
714            #    For example, `admins@example.com`.
715            #
716            #
717            # * `domain:{domain}`: The G Suite domain (primary) that represents all the
718            #    users of that domain. For example, `google.com` or `example.com`.
719            #
720          "A String",
721        ],
722        "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
723            # NOTE: An unsatisfied condition will not allow user access via current
724            # binding. Different bindings, including their conditions, are examined
725            # independently.
726            #
727            #     title: "User account presence"
728            #     description: "Determines whether the request has a user account"
729            #     expression: "size(request.user) > 0"
730          "location": "A String", # An optional string indicating the location of the expression for error
731              # reporting, e.g. a file name and a position in the file.
732          "expression": "A String", # Textual representation of an expression in
733              # Common Expression Language syntax.
734              #
735              # The application context of the containing message determines which
736              # well-known feature set of CEL is supported.
737          "description": "A String", # An optional description of the expression. This is a longer text which
738              # describes the expression, e.g. when hovered over it in a UI.
739          "title": "A String", # An optional title for the expression, i.e. a short string describing
740              # its purpose. This can be used e.g. in UIs which allow to enter the
741              # expression.
742        },
743      },
744    ],
745    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
746        # prevent simultaneous updates of a policy from overwriting each other.
747        # It is strongly suggested that systems make use of the `etag` in the
748        # read-modify-write cycle to perform policy updates in order to avoid race
749        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
750        # systems are expected to put that etag in the request to `setIamPolicy` to
751        # ensure that their change will be applied to the same version of the policy.
752        #
753        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
754        # policy is overwritten blindly.
755    "version": 42, # Deprecated.
756  }</pre>
757</div>
758
759<div class="method">
760    <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
761  <pre>Returns permissions that the caller has on the specified database resource.
762
763Attempting this RPC on a non-existent Cloud Spanner database will
764result in a NOT_FOUND error if the user has
765`spanner.databases.list` permission on the containing Cloud
766Spanner instance. Otherwise returns an empty set of permissions.
767
768Args:
769  resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources. (required)
770  body: object, The request body. (required)
771    The object takes the form of:
772
773{ # Request message for `TestIamPermissions` method.
774    "permissions": [ # REQUIRED: The set of permissions to check for 'resource'.
775        # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.
776      "A String",
777    ],
778  }
779
780  x__xgafv: string, V1 error format.
781    Allowed values
782      1 - v1 error format
783      2 - v2 error format
784
785Returns:
786  An object of the form:
787
788    { # Response message for `TestIamPermissions` method.
789    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
790        # allowed.
791      "A String",
792    ],
793  }</pre>
794</div>
795
796<div class="method">
797    <code class="details" id="updateDdl">updateDdl(database, body, x__xgafv=None)</code>
798  <pre>Updates the schema of a Cloud Spanner database by
799creating/altering/dropping tables, columns, indexes, etc. The returned
800long-running operation will have a name of
801the format `<database_name>/operations/<operation_id>` and can be used to
802track execution of the schema change(s). The
803metadata field type is
804UpdateDatabaseDdlMetadata.  The operation has no response.
805
806Args:
807  database: string, Required. The database to update. (required)
808  body: object, The request body. (required)
809    The object takes the form of:
810
811{ # Enqueues the given DDL statements to be applied, in order but not
812      # necessarily all at once, to the database schema at some point (or
813      # points) in the future. The server checks that the statements
814      # are executable (syntactically valid, name tables that exist, etc.)
815      # before enqueueing them, but they may still fail upon
816      # later execution (e.g., if a statement from another batch of
817      # statements is applied first and it conflicts in some way, or if
818      # there is some data-related problem like a `NULL` value in a column to
819      # which `NOT NULL` would be added). If a statement fails, all
820      # subsequent statements in the batch are automatically cancelled.
821      #
822      # Each batch of statements is assigned a name which can be used with
823      # the Operations API to monitor
824      # progress. See the
825      # operation_id field for more
826      # details.
827    "statements": [ # DDL statements to be applied to the database.
828      "A String",
829    ],
830    "operationId": "A String", # If empty, the new update request is assigned an
831        # automatically-generated operation ID. Otherwise, `operation_id`
832        # is used to construct the name of the resulting
833        # Operation.
834        #
835        # Specifying an explicit operation ID simplifies determining
836        # whether the statements were executed in the event that the
837        # UpdateDatabaseDdl call is replayed,
838        # or the return value is otherwise lost: the database and
839        # `operation_id` fields can be combined to form the
840        # name of the resulting
841        # longrunning.Operation: `<database>/operations/<operation_id>`.
842        #
843        # `operation_id` should be unique within the database, and must be
844        # a valid identifier: `a-z*`. Note that
845        # automatically-generated operation IDs always begin with an
846        # underscore. If the named operation already exists,
847        # UpdateDatabaseDdl returns
848        # `ALREADY_EXISTS`.
849  }
850
851  x__xgafv: string, V1 error format.
852    Allowed values
853      1 - v1 error format
854      2 - v2 error format
855
856Returns:
857  An object of the form:
858
859    { # This resource represents a long-running operation that is the result of a
860      # network API call.
861    "metadata": { # Service-specific metadata associated with the operation.  It typically
862        # contains progress information and common metadata such as create time.
863        # Some services might not provide such metadata.  Any method that returns a
864        # long-running operation should document the metadata type, if any.
865      "a_key": "", # Properties of the object. Contains field @type with type URL.
866    },
867    "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.
868        # different programming environments, including REST APIs and RPC APIs. It is
869        # used by [gRPC](https://github.com/grpc). The error model is designed to be:
870        #
871        # - Simple to use and understand for most users
872        # - Flexible enough to meet unexpected needs
873        #
874        # # Overview
875        #
876        # The `Status` message contains three pieces of data: error code, error
877        # message, and error details. The error code should be an enum value of
878        # google.rpc.Code, but it may accept additional error codes if needed.  The
879        # error message should be a developer-facing English message that helps
880        # developers *understand* and *resolve* the error. If a localized user-facing
881        # error message is needed, put the localized message in the error details or
882        # localize it in the client. The optional error details may contain arbitrary
883        # information about the error. There is a predefined set of error detail types
884        # in the package `google.rpc` that can be used for common error conditions.
885        #
886        # # Language mapping
887        #
888        # The `Status` message is the logical representation of the error model, but it
889        # is not necessarily the actual wire format. When the `Status` message is
890        # exposed in different client libraries and different wire protocols, it can be
891        # mapped differently. For example, it will likely be mapped to some exceptions
892        # in Java, but more likely mapped to some error codes in C.
893        #
894        # # Other uses
895        #
896        # The error model and the `Status` message can be used in a variety of
897        # environments, either with or without APIs, to provide a
898        # consistent developer experience across different environments.
899        #
900        # Example uses of this error model include:
901        #
902        # - Partial errors. If a service needs to return partial errors to the client,
903        #     it may embed the `Status` in the normal response to indicate the partial
904        #     errors.
905        #
906        # - Workflow errors. A typical workflow has multiple steps. Each step may
907        #     have a `Status` message for error reporting.
908        #
909        # - Batch operations. If a client uses batch request and batch response, the
910        #     `Status` message should be used directly inside batch response, one for
911        #     each error sub-response.
912        #
913        # - Asynchronous operations. If an API call embeds asynchronous operation
914        #     results in its response, the status of those operations should be
915        #     represented directly using the `Status` message.
916        #
917        # - Logging. If some API errors are stored in logs, the message `Status` could
918        #     be used directly after any stripping needed for security/privacy reasons.
919      "message": "A String", # A developer-facing error message, which should be in English. Any
920          # user-facing error message should be localized and sent in the
921          # google.rpc.Status.details field, or localized by the client.
922      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
923      "details": [ # A list of messages that carry the error details.  There is a common set of
924          # message types for APIs to use.
925        {
926          "a_key": "", # Properties of the object. Contains field @type with type URL.
927        },
928      ],
929    },
930    "done": True or False, # If the value is `false`, it means the operation is still in progress.
931        # If `true`, the operation is completed, and either `error` or `response` is
932        # available.
933    "response": { # The normal response of the operation in case of success.  If the original
934        # method returns no data on success, such as `Delete`, the response is
935        # `google.protobuf.Empty`.  If the original method is standard
936        # `Get`/`Create`/`Update`, the response should be the resource.  For other
937        # methods, the response should have the type `XxxResponse`, where `Xxx`
938        # is the original method name.  For example, if the original method name
939        # is `TakeSnapshot()`, the inferred response type is
940        # `TakeSnapshotResponse`.
941      "a_key": "", # Properties of the object. Contains field @type with type URL.
942    },
943    "name": "A String", # The server-assigned name, which is only unique within the same service that
944        # originally returns it. If you use the default HTTP mapping, the
945        # `name` should be a resource name ending with `operations/{unique_id}`.
946  }</pre>
947</div>
948
949</body></html>