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-08-22 UTC."],[[["\u003cp\u003eThe webpage provides documentation for \u003ccode\u003eDirectedReadOption\u003c/code\u003e, a feature to specify which replicas or regions should be used for read operations in read-only or single-use transactions.\u003c/p\u003e\n"],["\u003cp\u003eIt lists various versions of the documentation, with \u003ccode\u003e2.37.0-rc\u003c/code\u003e being the latest release candidate and \u003ccode\u003e2.19.0\u003c/code\u003e being the current version.\u003c/p\u003e\n"],["\u003cp\u003eUsing \u003ccode\u003eDirectedReadOptions\u003c/code\u003e in a read-write transaction will result in an error, \u003ccode\u003ekInvalidArgument\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDirectedReadOption\u003c/code\u003e supports two variants, \u003ccode\u003eIncludeReplicas\u003c/code\u003e, which lists replicas to try in order, and \u003ccode\u003eExcludeReplicas\u003c/code\u003e, which lists replicas to avoid.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDirectedReadOption\u003c/code\u003e type is an alias of \u003ccode\u003eabsl::variant< absl::monostate, IncludeReplicas, ExcludeReplicas >\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]