Google Cloud Spanner v1 API - Class Session (5.0.0-beta04)

public sealed class Session : IMessage<Session>, IEquatable<Session>, IDeepCloneable<Session>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Spanner v1 API class Session.

A session in the Cloud Spanner API.

Inheritance

object > Session

Namespace

Google.Cloud.Spanner.V1

Assembly

Google.Cloud.Spanner.V1.dll

Constructors

Session()

public Session()

Session(Session)

public Session(Session other)
Parameter
Name Description
other Session

Properties

ApproximateLastUseTime

public Timestamp ApproximateLastUseTime { get; set; }

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

Property Value
Type Description
Timestamp

CreateTime

public Timestamp CreateTime { get; set; }

Output only. The timestamp when the session is created.

Property Value
Type Description
Timestamp

CreatorRole

public string CreatorRole { get; set; }

The database role which created this session.

Property Value
Type Description
string

Labels

public MapField<string, string> Labels { get; }

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.

Property Value
Type Description
MapFieldstringstring

Multiplexed

public bool Multiplexed { get; set; }

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.

Property Value
Type Description
bool

Name

public string Name { get; set; }

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

Property Value
Type Description
string

SessionName

public SessionName SessionName { get; set; }

SessionName-typed view over the Name resource name property.

Property Value
Type Description
SessionName