Skip to main content

swift

6 configuration options · available in Rust, Python, Node.js, Java

Quick start
use opendal::Operator;

let op = Operator::via_iter("swift", [
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let op = Operator::via_iter("swift", [
// The endpoint for Swift.
// ("endpoint".to_string(), "...".to_string()),

// The container for Swift.
// ("container".to_string(), "...".to_string()),

// The root for Swift.
// ("root".to_string(), "...".to_string()),

// The token for Swift.
// ("token".to_string(), "...".to_string()),

// The TempURL key for generating presigned URLs.
//
// This corresponds to the `X-Account-Meta-Temp-URL-Key` or
// `X-Container-Meta-Temp-URL-Key` header value configured on the
// Swift account or container.
// ("temp_url_key".to_string(), "...".to_string()),

// The hash algorithm for TempURL signing.
//
// Supported values: `sha1`, `sha256`, `sha512`. Defaults to `sha256`.
// The cluster must have the chosen algorithm in its
// `tempurl.allowed_digests` (check `GET /info`).
// ("temp_url_hash_algorithm".to_string(), "...".to_string()),

])?;

Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.

Configuration reference

General6
KeyTypeRequiredDescription
endpointstringnoThe endpoint for Swift.
containerstringnoThe container for Swift.
rootstringnoThe root for Swift.
tokenstringnoThe token for Swift.
temp_url_keystringnoThe TempURL key for generating presigned URLs. This corresponds to the X-Account-Meta-Temp-URL-Key or X-Container-Meta-Temp-URL-Key header value configured on the Swift account or container.
temp_url_hash_algorithmstringnoThe hash algorithm for TempURL signing. Supported values: sha1, sha256, sha512. Defaults to sha256. The cluster must have the chosen algorithm in its tempurl.allowed_digests (check GET /info).