Method: projects.instances.databases.sessions.adaptMessage

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.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
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

Request body

The request body contains data with the following structure:

JSON representation
{
  "protocol": string,
  "payload": string,
  "attachments": {
    string: string,
    ...
  }
}
Fields
protocol

string

Required. Identifier for the underlying wire protocol.

payload

string (bytes format)

Optional. Uninterpreted bytes from the underlying wire protocol.

A base64-encoded string.

attachments

map (key: string, value: string)

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

Response body

Message sent by the adapter to the client.

If successful, the response body contains data with the following structure:

JSON representation
{
  "payload": string,
  "stateUpdates": {
    string: string,
    ...
  }
}
Fields
payload

string (bytes format)

Optional. Uninterpreted bytes from the underlying wire protocol.

A base64-encoded string.

stateUpdates

map (key: string, value: string)

Optional. Opaque state updates to be applied by 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.