Index
-
Adapter
(interface) -
AdaptMessageRequest
(message) -
AdaptMessageResponse
(message) -
CreateSessionRequest
(message) -
Session
(message)
Adapter
Cloud Spanner Adapter API
The Cloud Spanner Adapter service allows native drivers of supported database dialects to interact directly with Cloud Spanner by wrapping the underlying wire protocol used by the driver in a gRPC stream.
rpc AdaptMessage(
AdaptMessageRequest
) returns ( AdaptMessageResponse
)
Handles a single message from the client and returns the result as a stream. The server will interpret the message frame and respond with message frames to the client.
- Authorization scopes
-
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/spanner.data
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc CreateSession(
CreateSessionRequest
) returns ( Session
)
Creates a new session to be used for requests made by the adapter. A session identifies a specific incarnation of a database resource and is meant to be reused across many AdaptMessage
calls.
- Authorization scopes
-
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/spanner.data
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
AdaptMessageRequest
Message sent by the client to the adapter.
name
string
Required. The database session in which the adapter request is processed.
Authorization requires the following IAM
permission on the specified resource name
:
-
spanner.databases.adapt
protocol
string
Required. Identifier for the underlying wire protocol.
payload
bytes
Optional. Uninterpreted bytes from the underlying wire protocol.
AdaptMessageResponse
Message sent by the adapter to the client.
Fields | |
---|---|
payload
|
Optional. Uninterpreted bytes from the underlying wire protocol. |
state_updates
|
Optional. Opaque state updates to be applied by the client. |
CreateSessionRequest
The request for [CreateSessionRequest][Adapter.CreateSessionRequest].
Session
A session in the Cloud Spanner Adapter API.
Fields | |
---|---|
name
|
Identifier. The name of the session. This is always system-assigned. |