public sealed class DirectedReadOptions.Types.IncludeReplicas : IMessage<DirectedReadOptions.Types.IncludeReplicas>, IEquatable<DirectedReadOptions.Types.IncludeReplicas>, IDeepCloneable<DirectedReadOptions.Types.IncludeReplicas>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Spanner v1 API class DirectedReadOptions.Types.IncludeReplicas.
An IncludeReplicas contains a repeated set of ReplicaSelection which
indicates the order in which replicas should be considered.
If true, Spanner will not route requests to a replica outside the
include_replicas list when all of the specified replicas are unavailable
or unhealthy. Default value is false.
[[["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\u003eThe latest version available for \u003ccode\u003eDirectedReadOptions.Types.IncludeReplicas\u003c/code\u003e is \u003ccode\u003e5.0.0-beta05\u003c/code\u003e, with multiple prior versions also documented.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDirectedReadOptions.Types.IncludeReplicas\u003c/code\u003e is a class within the Google Cloud Spanner v1 API, designed to define the preferred order of replicas for read operations.\u003c/p\u003e\n"],["\u003cp\u003eThis 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, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eIncludeReplicas\u003c/code\u003e has two constructors: a default constructor, and another that takes an existing \u003ccode\u003eIncludeReplicas\u003c/code\u003e object for copying, and contains the properties \u003ccode\u003eAutoFailoverDisabled\u003c/code\u003e and \u003ccode\u003eReplicaSelections\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAutoFailoverDisabled\u003c/code\u003e property, when set to true, prevents Spanner from routing requests outside the specified \u003ccode\u003einclude_replicas\u003c/code\u003e list if those replicas are unavailable, and the \u003ccode\u003eReplicaSelections\u003c/code\u003e property allows for the configuration of the directed read replica selector.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner v1 API - Class DirectedReadOptions.Types.IncludeReplicas (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.DirectedReadOptions.Types.IncludeReplicas)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/5.0.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.6.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.5.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.4.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.3.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.2.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.1.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.0.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.15.1/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.14.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.13.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.12.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.11.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.10.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.9.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.8.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.7.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.6.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.5.0/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas) \n\n public sealed class DirectedReadOptions.Types.IncludeReplicas : IMessage\u003cDirectedReadOptions.Types.IncludeReplicas\u003e, IEquatable\u003cDirectedReadOptions.Types.IncludeReplicas\u003e, IDeepCloneable\u003cDirectedReadOptions.Types.IncludeReplicas\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner v1 API class DirectedReadOptions.Types.IncludeReplicas.\n\nAn IncludeReplicas contains a repeated set of ReplicaSelection which\nindicates the order in which replicas should be considered. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DirectedReadOptions.Types.IncludeReplicas \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DirectedReadOptions](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions)[Types](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions.Types)[IncludeReplicas](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DirectedReadOptions](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions)[Types](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions.Types)[IncludeReplicas](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DirectedReadOptions](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions)[Types](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions.Types)[IncludeReplicas](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas), [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### IncludeReplicas()\n\n public IncludeReplicas()\n\n### IncludeReplicas(IncludeReplicas)\n\n public IncludeReplicas(DirectedReadOptions.Types.IncludeReplicas other)\n\nProperties\n----------\n\n### AutoFailoverDisabled\n\n public bool AutoFailoverDisabled { get; set; }\n\nIf true, Spanner will not route requests to a replica outside the\ninclude_replicas list when all of the specified replicas are unavailable\nor unhealthy. Default value is `false`.\n\n### ReplicaSelections\n\n public RepeatedField\u003cDirectedReadOptions.Types.ReplicaSelection\u003e ReplicaSelections { get; }\n\nThe directed read replica selector."]]