6 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("swift", [
])?;
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.
| Key | Type | Required | Description |
|---|---|---|---|
endpoint | string | no | The endpoint for Swift. |
container | string | no | The container for Swift. |
root | string | no | The root for Swift. |
token | string | no | The token for Swift. |
temp_url_key | string | no | 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_hash_algorithm | string | no | 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). |