SessionArgs

data class SessionArgs(val creatorRole: Output<String>? = null, val databaseId: Output<String>? = null, val instanceId: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val project: Output<String>? = null) : ConvertibleToJava<SessionArgs>

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.

Constructors

Link copied to clipboard
constructor(creatorRole: Output<String>? = null, databaseId: Output<String>? = null, instanceId: Output<String>? = null, labels: Output<Map<String, String>>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val creatorRole: Output<String>? = null

The database role which created this session.

Link copied to clipboard
val databaseId: Output<String>? = null
Link copied to clipboard
val instanceId: Output<String>? = null
Link copied to clipboard
val labels: Output<Map<String, String>>? = null

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 project: Output<String>? = null

Functions

Link copied to clipboard
open override fun toJava(): SessionArgs