Index
InstanceAdmin
(interface)CreateInstanceMetadata
(message)CreateInstanceRequest
(message)DeleteInstanceRequest
(message)GetInstanceConfigRequest
(message)GetInstanceRequest
(message)Instance
(message)Instance.State
(enum)InstanceConfig
(message)ListInstanceConfigsRequest
(message)ListInstanceConfigsResponse
(message)ListInstancesRequest
(message)ListInstancesResponse
(message)ReplicaInfo
(message)ReplicaInfo.ReplicaType
(enum)UpdateInstanceMetadata
(message)UpdateInstanceRequest
(message)
InstanceAdmin
Cloud Spanner Instance Admin API
The Cloud Spanner Instance Admin API can be used to create, delete, modify and list instances. Instances are dedicated Cloud Spanner serving and storage resources to be used by Cloud Spanner databases.
Each instance has a "configuration", which dictates where the serving resources for the Cloud Spanner instance are located (e.g., US-central, Europe). Configurations are created by Google based on resource availability.
Cloud Spanner billing is based on the instances that exist and their sizes. After an instance exists, there are no additional per-database or per-operation charges for use of the instance (though there may be additional network bandwidth charges). Instances offer isolation: problems with databases in one instance will not affect other instances. However, within an instance databases can affect each other. For example, if one database in an instance receives a lot of requests and consumes most of the instance resources, fewer resources are available for other databases in that instance, and their performance may suffer.
CreateInstance | |
---|---|
Creates an instance and begins preparing it to begin serving. The returned Immediately upon completion of this request:
Until completion of the returned operation:
Upon completion of the returned operation:
The returned
|
DeleteInstance | |
---|---|
Deletes an instance. Immediately upon completion of the request:
Soon afterward:
|
GetIamPolicy | |
---|---|
Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set. Authorization requires
|
GetInstance | |
---|---|
Gets information about a particular instance.
|
GetInstanceConfig | |
---|---|
Gets information about a particular instance configuration.
|
ListInstanceConfigs | |
---|---|
Lists the supported instance configurations for a given project.
|
ListInstances | |
---|---|
Lists all instances in the given project.
|
SetIamPolicy | |
---|---|
Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires
|
TestIamPermissions | |
---|---|
Returns permissions that the caller has on the specified instance resource. Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has
|
UpdateInstance | |
---|---|
Updates an instance, and begins allocating or releasing resources as requested. The returned Immediately upon completion of this request:
Until completion of the returned operation:
Upon completion of the returned operation:
The returned Authorization requires
|
CreateInstanceMetadata
Metadata type for the operation returned by CreateInstance
.
Fields | |
---|---|
instance |
The instance being created. |
start_time |
The time at which the |
cancel_time |
The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again. |
end_time |
The time at which this operation failed or was completed successfully. |
CreateInstanceRequest
The request for CreateInstance
.
Fields | |
---|---|
parent |
Required. The name of the project in which to create the instance. Values are of the form Authorization requires the following IAM permission on the specified resource
|
instance_id |
Required. The ID of the instance to create. Valid identifiers are of the form |
instance |
Required. The instance to create. The name may be omitted, but if specified must be |
DeleteInstanceRequest
The request for DeleteInstance
.
Fields | |
---|---|
name |
Required. The name of the instance to be deleted. Values are of the form Authorization requires the following IAM permission on the specified resource
|
GetInstanceConfigRequest
The request for GetInstanceConfigRequest
.
Fields | |
---|---|
name |
Required. The name of the requested instance configuration. Values are of the form Authorization requires the following IAM permission on the specified resource
|
GetInstanceRequest
The request for GetInstance
.
Fields | |
---|---|
name |
Required. The name of the requested instance. Values are of the form Authorization requires the following IAM permission on the specified resource
|
field_mask |
If field_mask is present, specifies the subset of |
Instance
An isolated set of Cloud Spanner resources on which databases can be hosted.
Fields | |
---|---|
name |
Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form |
config |
Required. The name of the instance's configuration. Values are of the form |
display_name |
Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. |
node_count |
The number of nodes allocated to this instance. This may be zero in API responses for instances that are not yet in state See the documentation for more information about nodes. |
state |
Output only. The current instance state. For |
labels |
Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.).
See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. And so you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + "_" + value would prove problematic if we were to allow "_" in a future release. |
endpoint_uris[] |
Deprecated. This field is not populated. |
State
Indicates the current state of the instance.
Enums | |
---|---|
STATE_UNSPECIFIED |
Not specified. |
CREATING |
The instance is still being created. Resources may not be available yet, and operations such as database creation may not work. |
READY |
The instance is fully created and ready to do work such as creating databases. |
InstanceConfig
A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.
Fields | |
---|---|
name |
A unique identifier for the instance configuration. Values are of the form |
display_name |
The name of this instance configuration as it appears in UIs. |
replicas[] |
The geographic placement of nodes in this instance configuration and their replication properties. |
ListInstanceConfigsRequest
The request for ListInstanceConfigs
.
Fields | |
---|---|
parent |
Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form Authorization requires the following IAM permission on the specified resource
|
page_size |
Number of instance configurations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. |
page_token |
If non-empty, |
ListInstanceConfigsResponse
The response for ListInstanceConfigs
.
Fields | |
---|---|
instance_configs[] |
The list of requested instance configurations. |
next_page_token |
|
ListInstancesRequest
The request for ListInstances
.
Fields | |
---|---|
parent |
Required. The name of the project for which a list of instances is requested. Values are of the form Authorization requires the following IAM permission on the specified resource
|
page_size |
Number of instances to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. |
page_token |
If non-empty, |
filter |
An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are:
Some examples of using filters are:
|
ListInstancesResponse
The response for ListInstances
.
Fields | |
---|---|
instances[] |
The list of requested instances. |
next_page_token |
|
ReplicaInfo
Fields | |
---|---|
location |
The location of the serving resources, e.g. "us-central1". |
type |
The type of replica. |
default_leader_location |
If true, this location is designated as the default leader location where leader replicas are placed. See the region types documentation for more details. |
ReplicaType
Indicates the type of replica. See the replica types documentation for more details.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Not specified. |
READ_WRITE |
Read-write replicas support both reads and writes. These replicas:
|
READ_ONLY |
Read-only replicas only support reads (not writes). Read-only replicas:
|
WITNESS |
Witness replicas don't support reads but do participate in voting to commit writes. Witness replicas:
|
UpdateInstanceMetadata
Metadata type for the operation returned by UpdateInstance
.
Fields | |
---|---|
instance |
The desired end state of the update. |
start_time |
The time at which |
cancel_time |
The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again. |
end_time |
The time at which this operation failed or was completed successfully. |
UpdateInstanceRequest
The request for UpdateInstance
.
Fields | |
---|---|
instance |
Required. The instance to update, which must always include the instance name. Otherwise, only fields mentioned in |
field_mask |
Required. A mask specifying which fields in |