2.12.0-rc 2.11.0 (latest)

# How to Override the Default Endpoint

In some cases, you may need to override the default endpoint used by the client library. Use the [EndpointOption](https://cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1EndpointOption.html) when initializing the client library to change this default.

For example, this will override the default endpoint for `debugger_v2::Controller2Client`:

```cpp
  // 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::debugger_v2::Controller2Client(
      google::cloud::debugger_v2::MakeController2Connection(options));
```

Follow these links to find examples for other `*Client` classes:

- [`debugger_v2::Controller2Client`](https://docs.cloud.google.com/cpp/docs/reference/debugger/latest/debugger_v2_1_1Controller2Client-endpoint-snippet.md.txt)
- [`debugger_v2::Debugger2Client`](https://docs.cloud.google.com/cpp/docs/reference/debugger/latest/debugger_v2_1_1Debugger2Client-endpoint-snippet.md.txt)