Resource: Database
A Cloud Spanner database.
JSON representation | |
---|---|
{ "name": string, "state": enum ( |
Fields | |
---|---|
name |
Required. The name of the database. Values are of the form |
state |
Output only. The current database state. |
createTime |
Output only. If exists, the time at which the database creation started. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
restoreInfo |
Output only. Applicable only for restored databases. Contains information about the restore source. |
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. |
READY_OPTIMIZING |
The database is fully created and ready for use, but is still being optimized for performance and cannot handle full load. In this state, the database still references the backup it was restore from, preventing the backup from being deleted. When optimizations are complete, the full performance of the database will be restored, and the database will transition to |
RestoreInfo
Information about the database restore.
JSON representation | |
---|---|
{ "sourceType": enum ( |
Fields | |
---|---|
sourceType |
The type of the restore source. |
backupInfo |
Information about the backup used to restore the database. The backup may no longer exist. |
RestoreSourceType
Indicates the type of the restore source.
Enums | |
---|---|
TYPE_UNSPECIFIED |
No restore associated. |
BACKUP |
A backup was used as the source of the restore. |
BackupInfo
Information about a backup.
JSON representation | |
---|---|
{ "backup": string, "createTime": string, "sourceDatabase": string } |
Fields | |
---|---|
backup |
Name of the backup. |
createTime |
The backup contains an externally consistent copy of A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
sourceDatabase |
Name of the database the backup was created from. |
Methods |
|
---|---|
|
Creates a new Cloud Spanner database and starts to prepare it for serving. |
|
Drops (aka deletes) a Cloud Spanner database. |
|
Gets the state of a Cloud Spanner database. |
|
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. |
|
Gets the access control policy for a database or backup resource. |
|
Lists Cloud Spanner databases. |
|
Create a new database by restoring from a completed backup. |
|
Sets the access control policy on a database or backup resource. |
|
Returns permissions that the caller has on the specified database or backup resource. |
|
Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. |