Package google.spanner.adapter.v1

Index

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.

AdaptMessage

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.

CreateSession

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.

Fields
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.

attachments

map<string, string>

Optional. Opaque request state passed by the client to the server.

AdaptMessageResponse

Message sent by the adapter to the client.

Fields
payload

bytes

Optional. Uninterpreted bytes from the underlying wire protocol.

state_updates

map<string, string>

Optional. Opaque state updates to be applied by the client.

CreateSessionRequest

The request for [CreateSessionRequest][Adapter.CreateSessionRequest].

Fields
parent

string

Required. The database in which the new session is created.

Authorization requires the following IAM permission on the specified resource parent:

  • spanner.sessions.create
session

Session

Required. The session to create.

Session

A session in the Cloud Spanner Adapter API.

Fields
name

string

Identifier. The name of the session. This is always system-assigned.