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 when initializing the client library to change this default.
For example, this will override the default endpoint for sql_v1::SqlAvailableDatabaseVersionsServiceClient
:
// 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::sql_v1::SqlAvailableDatabaseVersionsServiceClient(
google::cloud::sql_v1::
MakeSqlAvailableDatabaseVersionsServiceConnectionRest(options));
Follow these links to find examples for other *Client
classes:
sql_v1::SqlAvailableDatabaseVersionsServiceClient
sql_v1::SqlBackupRunsServiceClient
sql_v1::SqlConnectServiceClient
sql_v1::SqlDatabasesServiceClient
sql_v1::SqlEventsServiceClient
sql_v1::SqlFlagsServiceClient
sql_v1::SqlIamPoliciesServiceClient
sql_v1::SqlInstanceNamesServiceClient
sql_v1::SqlInstancesServiceClient
sql_v1::SqlOperationsServiceClient
sql_v1::SqlRegionsServiceClient
sql_v1::SqlSslCertsServiceClient
sql_v1::SqlTiersServiceClient
sql_v1::SqlUsersServiceClient