Optional. If true, specifies a multiplexed session. A multiplexed session
may be used for multiple, concurrent read-only operations but can not be
used for read-write transactions, partitioned reads, or partitioned
queries. Multiplexed sessions can be created via
[CreateSession][google.spanner.v1.Spanner.CreateSession] but not via
[BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
Multiplexed sessions may not be deleted nor listed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation page covers the \u003ccode\u003eSession\u003c/code\u003e class within the Google Cloud Spanner v1 API, including its properties, constructors, and implemented interfaces.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eSession\u003c/code\u003e class available is 5.0.0-beta05, with numerous previous versions from 3.5.0 to 5.0.0-beta04, and it provides a comprehensive look at the history of these versions.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eSession\u003c/code\u003e object represents a session in the Cloud Spanner API and includes properties such as \u003ccode\u003eCreateTime\u003c/code\u003e, \u003ccode\u003eApproximateLastUseTime\u003c/code\u003e, \u003ccode\u003eLabels\u003c/code\u003e, and \u003ccode\u003eMultiplexed\u003c/code\u003e, alongside others.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSession\u003c/code\u003e class can be created with the \u003ccode\u003eSession()\u003c/code\u003e or \u003ccode\u003eSession(Session other)\u003c/code\u003e constructor.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner v1 API - Class Session (5.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.1.0 (latest)](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/5.0.0/Google.Cloud.Spanner.V1.Session)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.6.0/Google.Cloud.Spanner.V1.Session)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.5.0/Google.Cloud.Spanner.V1.Session)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.4.0/Google.Cloud.Spanner.V1.Session)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.3.0/Google.Cloud.Spanner.V1.Session)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.2.0/Google.Cloud.Spanner.V1.Session)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.1.0/Google.Cloud.Spanner.V1.Session)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.0.0/Google.Cloud.Spanner.V1.Session)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.15.1/Google.Cloud.Spanner.V1.Session)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.14.0/Google.Cloud.Spanner.V1.Session)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.13.0/Google.Cloud.Spanner.V1.Session)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.12.0/Google.Cloud.Spanner.V1.Session)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.11.0/Google.Cloud.Spanner.V1.Session)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.10.0/Google.Cloud.Spanner.V1.Session)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.9.0/Google.Cloud.Spanner.V1.Session)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.8.0/Google.Cloud.Spanner.V1.Session)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.7.0/Google.Cloud.Spanner.V1.Session)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.6.0/Google.Cloud.Spanner.V1.Session)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.5.0/Google.Cloud.Spanner.V1.Session) \n\n public sealed class Session : IMessage\u003cSession\u003e, IEquatable\u003cSession\u003e, IDeepCloneable\u003cSession\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner v1 API class Session.\n\nA session in the Cloud Spanner API. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Session \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Session](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Session](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Session](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Spanner.V1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Spanner.V1.dll\n\nConstructors\n------------\n\n### Session()\n\n public Session()\n\n### Session(Session)\n\n public Session(Session other)\n\nProperties\n----------\n\n### ApproximateLastUseTime\n\n public Timestamp ApproximateLastUseTime { get; set; }\n\nOutput only. The approximate timestamp when the session is last used. It is\ntypically earlier than the actual last use time.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. The timestamp when the session is created.\n\n### CreatorRole\n\n public string CreatorRole { get; set; }\n\nThe database role which created this session.\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nThe labels for the session.\n\n- 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])?`.\n- 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])?)?`.\n- No more than 64 labels can be associated with a given session.\n\nSee \u003chttps://goo.gl/xmQnxf\u003e for more information on and examples of labels.\n\n### Multiplexed\n\n public bool Multiplexed { get; set; }\n\nOptional. If true, specifies a multiplexed session. A multiplexed session\nmay be used for multiple, concurrent read-only operations but can not be\nused for read-write transactions, partitioned reads, or partitioned\nqueries. Multiplexed sessions can be created via\n\\[CreateSession\\]\\[google.spanner.v1.Spanner.CreateSession\\] but not via\n\\[BatchCreateSessions\\]\\[google.spanner.v1.Spanner.BatchCreateSessions\\].\nMultiplexed sessions may not be deleted nor listed.\n\n### Name\n\n public string Name { get; set; }\n\nOutput only. The name of the session. This is always system-assigned.\n\n### SessionName\n\n public SessionName SessionName { get; set; }\n\n[SessionName](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session#Google_Cloud_Spanner_V1_Session_Name) resource name property."]]