Session

Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive transactions. Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone reads and queries use a transaction internally, and count toward the one transaction limit. Active sessions use additional server resources, so it is a good idea to delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner may delete sessions for which no operations are sent for more than an hour. If a session is deleted, requests to it return NOT_FOUND. Idle sessions can be kept alive by sending a trivial SQL query periodically, e.g., "SELECT 1". Auto-naming is currently not supported for this resource.

Properties

Link copied to clipboard

The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.

Link copied to clipboard
val createTime: Output<String>

The timestamp when the session is created.

Link copied to clipboard
val creatorRole: Output<String>

The database role which created this session.

Link copied to clipboard
val databaseId: Output<String>
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>

The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])?. * Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?. * No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.

Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard
val project: Output<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>