public sealed class BeginTransactionRequest : IMessage<BeginTransactionRequest>, IEquatable<BeginTransactionRequest>, IDeepCloneable<BeginTransactionRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Spanner v1 API class BeginTransactionRequest.
The request for
[BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
Optional. Required for read-write transactions on a multiplexed session
that commit mutations but do not perform any reads or queries. Clients
should randomly select one of the mutations from the mutation set and send
it as a part of this request.
This feature is not yet supported and will result in an UNIMPLEMENTED
error.
public RequestOptions RequestOptions { get; set; }
Common options for this request.
Priority is ignored for this request. Setting the priority in this
request_options struct will not do anything. To set the priority for a
transaction, set it on the reads and writes that are part of this
transaction instead.
[[["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\u003eBeginTransactionRequest\u003c/code\u003e class within the Google Cloud Spanner v1 API, specifically for .NET development.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is \u003ccode\u003e5.0.0-beta05\u003c/code\u003e, with several older versions ranging from \u003ccode\u003e5.0.0-beta04\u003c/code\u003e down to \u003ccode\u003e3.5.0\u003c/code\u003e also documented.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBeginTransactionRequest\u003c/code\u003e class is used to initiate a new transaction, with necessary parameters such as \u003ccode\u003eSession\u003c/code\u003e and \u003ccode\u003eOptions\u003c/code\u003e being required.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBeginTransactionRequest\u003c/code\u003e 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\u003eKey properties of \u003ccode\u003eBeginTransactionRequest\u003c/code\u003e include \u003ccode\u003eMutationKey\u003c/code\u003e, \u003ccode\u003eOptions\u003c/code\u003e, \u003ccode\u003eRequestOptions\u003c/code\u003e, \u003ccode\u003eSession\u003c/code\u003e, and \u003ccode\u003eSessionAsSessionName\u003c/code\u003e, which define the transaction's characteristics and the session it operates within.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner v1 API - Class BeginTransactionRequest (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.BeginTransactionRequest)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/5.0.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.6.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.5.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.4.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.3.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.2.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.1.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.0.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.15.1/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.14.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.13.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.12.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.11.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.10.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.9.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.8.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.7.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.6.0/Google.Cloud.Spanner.V1.BeginTransactionRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.5.0/Google.Cloud.Spanner.V1.BeginTransactionRequest) \n\n public sealed class BeginTransactionRequest : IMessage\u003cBeginTransactionRequest\u003e, IEquatable\u003cBeginTransactionRequest\u003e, IDeepCloneable\u003cBeginTransactionRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner v1 API class BeginTransactionRequest.\n\nThe request for\n\\[BeginTransaction\\]\\[google.spanner.v1.Spanner.BeginTransaction\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BeginTransactionRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BeginTransactionRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BeginTransactionRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BeginTransactionRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest), [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### BeginTransactionRequest()\n\n public BeginTransactionRequest()\n\n### BeginTransactionRequest(BeginTransactionRequest)\n\n public BeginTransactionRequest(BeginTransactionRequest other)\n\nProperties\n----------\n\n### MutationKey\n\n public Mutation MutationKey { get; set; }\n\nOptional. Required for read-write transactions on a multiplexed session\nthat commit mutations but do not perform any reads or queries. Clients\nshould randomly select one of the mutations from the mutation set and send\nit as a part of this request.\nThis feature is not yet supported and will result in an UNIMPLEMENTED\nerror.\n\n### Options\n\n public TransactionOptions Options { get; set; }\n\nRequired. Options for the new transaction.\n\n### RequestOptions\n\n public RequestOptions RequestOptions { get; set; }\n\nCommon options for this request.\nPriority is ignored for this request. Setting the priority in this\nrequest_options struct will not do anything. To set the priority for a\ntransaction, set it on the reads and writes that are part of this\ntransaction instead.\n\n### Session\n\n public string Session { get; set; }\n\nRequired. The session in which the transaction runs.\n\n### SessionAsSessionName\n\n public SessionName SessionAsSessionName { get; set; }\n\n[SessionName](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName)-typed view over the [Session](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest#Google_Cloud_Spanner_V1_BeginTransactionRequest_Session) resource name property."]]