public class Instance extends InstanceInfo
Instance
adds a layer of service related
functionality over InstanceInfo
.Modifier and Type | Class and Description |
---|---|
static class |
Instance.Builder
Builder of
Instance . |
InstanceInfo.InstanceField, InstanceInfo.State
Modifier and Type | Method and Description |
---|---|
Operation<Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> |
createDatabase(String databaseId,
Iterable<String> statements)
Creates a new database in this instance.
|
void |
delete() |
Database |
getDatabase(String databaseId) |
com.google.api.gax.paging.Page<Database> |
listDatabases() |
Instance |
reload() |
Instance.Builder |
toBuilder() |
Operation<Instance,com.google.spanner.admin.instance.v1.UpdateInstanceMetadata> |
update(InstanceInfo.InstanceField... fieldsToUpdate) |
equals, getDisplayName, getId, getInstanceConfigId, getLabels, getNodeCount, getState, hashCode, newBuilder, toString
public Instance reload()
public void delete()
public Operation<Instance,com.google.spanner.admin.instance.v1.UpdateInstanceMetadata> update(InstanceInfo.InstanceField... fieldsToUpdate)
public com.google.api.gax.paging.Page<Database> listDatabases()
public Operation<Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> createDatabase(String databaseId, Iterable<String> statements) throws SpannerException
databaseId
- the id of the database which will be created. It must conform to the regular
expression [a-z][a-z0-9_\-]*[a-z0-9] and be between 2 and 30 characters in lengthstatements
- DDL statements to run while creating the database, for example CREATE
TABLE MyTable ( ... )
. This should not include CREATE DATABASE
statement.SpannerException
public Instance.Builder toBuilder()
toBuilder
in class InstanceInfo
Copyright © 2018 Google. All rights reserved.