public sealed class BatchCreateSessionsRequest : IMessage<BatchCreateSessionsRequest>, IEquatable<BatchCreateSessionsRequest>, IDeepCloneable<BatchCreateSessionsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Spanner v1 API class BatchCreateSessionsRequest.
The request for
[BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
public DatabaseName DatabaseAsDatabaseName { get; set; }
Google.Cloud.Spanner.Common.V1.DatabaseName-typed view over the Database resource name property.
Property Value
Type
Description
Google.Cloud.Spanner.Common.V1.DatabaseName
SessionCount
public int SessionCount { get; set; }
Required. The number of sessions to be created in this batch call.
The API may return fewer than the requested number of sessions. If a
specific number of sessions are desired, the client can make additional
calls to BatchCreateSessions (adjusting
[session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
as necessary).
[[["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 document provides reference documentation for the \u003ccode\u003eBatchCreateSessionsRequest\u003c/code\u003e class within the Google Cloud Spanner v1 API for .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class is 5.0.0-beta05, but multiple previous versions are also documented, ranging back to version 3.5.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBatchCreateSessionsRequest\u003c/code\u003e is used to request the creation of multiple sessions in a specified database.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements multiple 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"],["\u003cp\u003eThe class contains properties such as \u003ccode\u003eDatabase\u003c/code\u003e, \u003ccode\u003eDatabaseAsDatabaseName\u003c/code\u003e, \u003ccode\u003eSessionCount\u003c/code\u003e, and \u003ccode\u003eSessionTemplate\u003c/code\u003e, used to define which database and how many sessions should be made.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner v1 API - Class BatchCreateSessionsRequest (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.BatchCreateSessionsRequest)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/5.0.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.6.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.5.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.4.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.3.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.2.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.1.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.0.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.15.1/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.14.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.13.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.12.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.11.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.10.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.9.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.8.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.7.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.6.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.5.0/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest) \n\n public sealed class BatchCreateSessionsRequest : IMessage\u003cBatchCreateSessionsRequest\u003e, IEquatable\u003cBatchCreateSessionsRequest\u003e, IDeepCloneable\u003cBatchCreateSessionsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner v1 API class BatchCreateSessionsRequest.\n\nThe request for\n\\[BatchCreateSessions\\]\\[google.spanner.v1.Spanner.BatchCreateSessions\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BatchCreateSessionsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BatchCreateSessionsRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BatchCreateSessionsRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BatchCreateSessionsRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest), [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### BatchCreateSessionsRequest()\n\n public BatchCreateSessionsRequest()\n\n### BatchCreateSessionsRequest(BatchCreateSessionsRequest)\n\n public BatchCreateSessionsRequest(BatchCreateSessionsRequest other)\n\nProperties\n----------\n\n### Database\n\n public string Database { get; set; }\n\nRequired. The database in which the new sessions are created.\n\n### DatabaseAsDatabaseName\n\n public DatabaseName DatabaseAsDatabaseName { get; set; }\n\nGoogle.Cloud.Spanner.Common.V1.DatabaseName-typed view over the [Database](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest#Google_Cloud_Spanner_V1_BatchCreateSessionsRequest_Database) resource name property.\n\n### SessionCount\n\n public int SessionCount { get; set; }\n\nRequired. The number of sessions to be created in this batch call.\nThe API may return fewer than the requested number of sessions. If a\nspecific number of sessions are desired, the client can make additional\ncalls to BatchCreateSessions (adjusting\n\\[session_count\\]\\[google.spanner.v1.BatchCreateSessionsRequest.session_count\\]\nas necessary).\n\n### SessionTemplate\n\n public Session SessionTemplate { get; set; }\n\nParameters to be applied to each created session."]]