AzureSDK.Storage.Client (Azure SDK v0.1.0)

Copy Markdown View Source

Storage service client for Azure Blob, Queue, Table, and File services.

client =
  AzureSDK.Storage.Client.new(
    account: "myaccount",
    credential: credential
  )

Path-style endpoints

Azurite and some proxies use path-style URLs where the account name appears in the path (http://127.0.0.1:10000/myaccount). Set :path_style to true for those endpoints. When omitted, path-style is auto-detected when the endpoint path ends with the account name.

Summary

Functions

Creates a storage client.

Returns true when the client uses path-style signing (e.g. Azurite).

Metadata passed to the signing pipeline for storage requests.

Converts a storage client into a core pipeline client.

Types

t()

@type t() :: %AzureSDK.Storage.Client{
  account: String.t(),
  api_version: String.t(),
  credential: AzureSDK.Identity.Credential.t(),
  endpoint: String.t(),
  path_style: boolean(),
  req_options: keyword(),
  retry: AzureSDK.Core.Retry.policy()
}

Functions

new(opts)

@spec new(keyword()) :: t()

Creates a storage client.

Options

  • :account — storage account name (required)
  • :credential — an AzureSDK.Identity credential (required)
  • :endpoint — custom endpoint (defaults to Azure public cloud or Azurite)
  • :api_version — storage API version
  • :path_style — use path-style signing (auto-detected when endpoint ends with account)
  • :retry — retry policy map
  • :req_options — additional Req options

path_style?(client)

@spec path_style?(t()) :: boolean()

Returns true when the client uses path-style signing (e.g. Azurite).

signing_metadata(client)

@spec signing_metadata(t()) :: %{api_version: String.t(), path_style: boolean()}

Metadata passed to the signing pipeline for storage requests.

to_core_client(client)

@spec to_core_client(t()) :: AzureSDK.Core.Client.t()

Converts a storage client into a core pipeline client.