# `ExStorageServiceSdk.Config`
[🔗](https://github.com/gsmlg-opt/ex_storage_service/blob/v0.7.1/lib/ex_storage_service_sdk/config.ex#L1)

Immutable connection settings captured by one client.

Every request made with a config uses its own endpoint, region, credentials and
transport, independent of global application settings. Build one with
`ExStorageServiceSdk.new/1`.

Extension points:

  * `:credential_provider` - zero-arity function returning
    `{:ok, %ExStorageServiceSdk.Credentials{}}` or `{:error, %ExStorageServiceSdk.Error{}}`.
    It is called before each signed request, so it can rotate temporary credentials.
  * `:session_provider` - S3 Express directory-bucket session resolver,
    `fn config, bucket, endpoint, mode -> {:ok, credentials} | {:error, error} end`.
  * `:transport` - module implementing `ExStorageServiceSdk.Transport`.
  * `:coordinator` - optional `ExStorageServiceSdk.Transfer.Coordinator` bounding request
    memory and propagating cancellation.
  * `:options` - map of protocol options (for example `:request_headers`,
    `:request_checksum_calculation`, `:debug`). Unknown keys are ignored by the SDK.

# `t`

```elixir
@type t() :: %ExStorageServiceSdk.Config{
  access_key_id: term(),
  addressing: term(),
  capabilities: term(),
  connect_timeout: term(),
  coordinator: term(),
  credential_provider: term(),
  credentials: term(),
  endpoint: term(),
  frontend: term(),
  options: term(),
  read_idle_timeout: term(),
  region: term(),
  secret_access_key: term(),
  session_provider: term(),
  session_token: term(),
  timeout: term(),
  tls: term(),
  transport: term(),
  unsigned: term(),
  write_idle_timeout: term()
}
```

# `refresh`

Refreshes the credential record before request signing.

# `with_credentials`

Replaces the active credential record and its derived signing fields.

---

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