In some cases, you may need to override the default endpoint used by the client library. Use the EndpointOption when initializing the client library to change this default.
For example, this will override the default endpoint for oslogin_v1::OsLoginServiceClient:
// This configuration is common with Private Google Access:
// https://cloud.google.com/vpc/docs/private-google-access
auto options = google::cloud::Options{}.set<google::cloud::EndpointOption>(
"private.googleapis.com");
auto client = google::cloud::oslogin_v1::OsLoginServiceClient(
google::cloud::oslogin_v1::MakeOsLoginServiceConnection(options));
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-14 UTC."],[[["The latest release candidate version for the oslogin documentation is 2.37.0-rc, and it can be found at /cpp/docs/reference/oslogin/latest/oslogin-override-endpoint."],["This documentation provides a history of prior versions of the oslogin documentation, ranging from version 2.36.0 down to 2.11.0, all available to view from their corresponding link."],["Users have the ability to override the default endpoint used by the client library through the use of the EndpointOption when initializing, as needed."],["The default endpoint can be changed by setting the `google::cloud::EndpointOption` within the options when configuring a client, as illustrated in the example of overriding the endpoint for `oslogin_v1::OsLoginServiceClient`."]]],[]]