REST Resource: projects.instances.databases

Resource: Database

A Cloud Spanner database.

JSON representation
{
  "name": string,
  "state": enum(State),
}
Fields
name

string

Required. The name of the database. Values are of the form projects/<project>/instances/<instance>/databases/<database>, where <database> is as specified in the CREATE DATABASE statement. This name can be passed to other API methods to identify the database.

state

enum(State)

Output only. The current database state.

State

Indicates the current state of the database.

Enums
STATE_UNSPECIFIED Not specified.
CREATING The database is still being created. Operations on the database may fail with FAILED_PRECONDITION in this state.
READY The database is fully created and ready for use.

Methods

create

Creates a new Cloud Spanner database and starts to prepare it for serving.

dropDatabase

Drops (aka deletes) a Cloud Spanner database.

get

Gets the state of a Cloud Spanner database.

getDdl

Returns the schema of a Cloud Spanner database as a list of formatted DDL statements.

getIamPolicy

Gets the access control policy for a database resource.

list

Lists Cloud Spanner databases.

setIamPolicy

Sets the access control policy on a database resource.

testIamPermissions

Returns permissions that the caller has on the specified database resource.

updateDdl

Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc.
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Spanner Documentation