The Google Cloud Client Libraries for Rust let you configure client
behavior, such as endpoint overrides, authentication methods, and retry
policies. You configure a client using a [`ClientBuilder`](https://docs.rs/google-cloud-gax/latest/google_cloud_gax/client_builder/struct.ClientBuilder.html)
obtained by calling the service client's `builder()` method (for example,
`SecretManagerService::builder()`).

## Customize the API endpoint

By default, client libraries connect to the global API endpoint for the service.
If you need to connect to a regional endpoint or a private access endpoint, you
can override the default endpoint configuration. For instructions and examples,
see [Override the default endpoint](https://docs.cloud.google.com/rust/docs/override-default-endpoint.md.txt).

## Configure authentication

While the client attempts to find [Application Default Credentials (ADC)](https://docs.cloud.google.com/docs/authentication/application-default-credentials.md.txt)
automatically, you can explicitly provide credentials using the
`with_credentials` method on the client builder. For instructions and examples,
see [Override the default authentication method](https://docs.cloud.google.com/rust/docs/override-default-authentication.md.txt).

## Enable logging

You can enable debug logging to inspect requests and responses for
troubleshooting. The Rust client libraries use the Tokio `tracing`
crate to collect structured, async-aware diagnostics. For setup instructions,
see [Enable logging](https://docs.cloud.google.com/rust/docs/enable-logging.md.txt).

## Configure a proxy

To configure a proxy, use the [standard environment variables](https://docs.rs/reqwest/latest/reqwest/index.html#proxies)
supported by `reqwest`. You don't need to configure proxy settings in your
Rust code. Instead, set the following environment variables in your
shell or container environment:

```bash
export http_proxy="http://proxy.example.com:3128"
export https_proxy="http://proxy.example.com:3128"
```

## Configure retries

The client libraries can automatically retry operations that fail due to
transient errors. You can configure default retry policies or override retry
limits for specific requests. For instructions and examples, see
[Configuring retry policies](https://docs.cloud.google.com/rust/docs/configure-retry-policies.md.txt).