Method: projects.instances.databases.sessions.adapter

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 sessions.adaptMessage calls.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
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

Request body

The request body contains an instance of Session.

Response body

A session in the Cloud Spanner Adapter API.

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

JSON representation
{
  "name": string
}
Fields
name

string

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

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.