# `ExOss.Client.Client`
[🔗](https://github.com/choice-form/ex_oss/blob/main/lib/ex_oss/client/client.ex#L1)

Client configuration struct.

## Required Fields

| Field | Type | Description |
|-------|------|-------------|
| `provider` | `:aws` | `:qiniu` | `:custom` | Storage provider |
| `access_key_id` | `String.t()` | Access key |
| `secret_access_key` | `String.t()` | Secret key |

## Optional Fields

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `region` | `String.t()` | `"us-east-1"` | Storage region |
| `endpoint` | `String.t()` | auto | Custom endpoint URL |
| `bucket` | `String.t()` | `nil` | Default bucket |
| `scheme` | `String.t()` | `"https://"` | URL scheme |
| `port` | `integer()` | `443` | Port number |
| `bucket_addressing` | `:virtual` | `:path` | `:virtual` | Bucket addressing style |
| `cdn_upload` | `boolean()` | `true` | Use CDN for uploads |
| `cdn_download` | `boolean()` | `true` | Use CDN for downloads |
| `cdn` | `CDN.t()` | `nil` | CDN configuration |

## Region Values

**AWS S3**: `"us-east-1"`, `"us-west-2"`, `"eu-west-1"`, `"ap-northeast-1"`, etc.

**Qiniu (S3)**: `"cn-east-1"`, `"cn-north-1"`, `"cn-south-1"`, etc.

**Custom**: Any S3-compatible service (MinIO, DigitalOcean Spaces, Cloudflare R2, etc.)

# `t`

```elixir
@type t() :: %ExOss.Client.Client{
  access_key_id: String.t(),
  bucket: String.t() | nil,
  bucket_addressing: :path | :virtual,
  cdn: ExOss.Client.CDN.t() | nil,
  cdn_download: boolean(),
  cdn_upload: boolean(),
  endpoint: String.t() | nil,
  port: non_neg_integer(),
  provider: :aws | :qiniu | :custom,
  region: String.t() | nil,
  scheme: String.t(),
  secret_access_key: String.t()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
