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 resourcemanager_v3::FoldersClient:
// This service supports specifying a regional or locational endpoint prefix
// when creating the FoldersConnection.
// For example, to connect to
// "europe-central2-cloudresourcemanager.googleapis.com":
auto client = google::cloud::resourcemanager_v3::FoldersClient(
google::cloud::resourcemanager_v3::MakeFoldersConnection(
"europe-central2"));
// 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 vpc_client = google::cloud::resourcemanager_v3::FoldersClient(
google::cloud::resourcemanager_v3::MakeFoldersConnection(options));
Follow these links to find examples for other *Client classes:
[[["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-08-14 UTC."],[[["\u003cp\u003eThis page provides documentation for overriding the default endpoint for the \u003ccode\u003eresourcemanager\u003c/code\u003e C++ client library.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEndpointOption\u003c/code\u003e is used to modify the default endpoint when initializing the client library, and it is demonstrated using the \u003ccode\u003eresourcemanager_v3::FoldersClient\u003c/code\u003e as an example.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation for this is 2.37.0-rc, with multiple links for past releases going as far back as 2.11.0.\u003c/p\u003e\n"],["\u003cp\u003eExamples of how to override the endpoint are provided for various \u003ccode\u003e*Client\u003c/code\u003e classes, such as \u003ccode\u003eFoldersClient\u003c/code\u003e, \u003ccode\u003eOrganizationsClient\u003c/code\u003e, \u003ccode\u003eProjectsClient\u003c/code\u003e, and others.\u003c/p\u003e\n"]]],[],null,[]]