Option for google::cloud::Options to indicate which replicas or regions should be used for reads/queries in read-only or single-use transactions.
Use of DirectedReadOptions within a read-write transaction will result in a kInvalidArgument error.
The IncludeReplicas variant lists the replicas to try (in order) to process the request, and what to do if the list is exhausted without finding a healthy replica.
Alternately, the ExcludeReplicas variant lists replicas that should be excluded from serving the request.
Type Aliases
Type
Alias Of: absl::variant< absl::monostate, IncludeReplicas, ExcludeReplicas >
[[["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-07-09 UTC."],[[["This webpage provides documentation for the `DirectedReadOption` in the Google Cloud Spanner C++ client library, with version 2.37.0-rc being the latest release candidate."],["The documentation includes version history, ranging from the latest release candidate version down to version 2.11.0, each linking to the respective documentation for `DirectedReadOption`."],["`DirectedReadOption` allows users to specify which replicas or regions to utilize when performing reads or queries in read-only or single-use transactions."],["`IncludeReplicas` and `ExcludeReplicas` are the two main variants of `DirectedReadOption`, allowing you to specify replicas to use or omit respectively, to facilitate more fine-grained control over where data is read from."],["Attempting to use `DirectedReadOptions` within a read-write transaction will lead to a `kInvalidArgument` error, meaning it is not intended for this use case."]]],[]]