5 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("b2", [
("bucket".to_string(), "...".to_string()),
("bucket_id".to_string(), "...".to_string()),
])?;
use opendal::Operator;
let op = Operator::via_iter("b2", [
// root of this backend.
//
// All operations will happen under this root.
// ("root".to_string(), "...".to_string()),
// keyID of this backend.
//
// - If application_key_id is set, we will take user's input first.
// - If not, we will try to load it from environment.
// ("application_key_id".to_string(), "...".to_string()),
// applicationKey of this backend.
//
// - If application_key is set, we will take user's input first.
// - If not, we will try to load it from environment.
// ("application_key".to_string(), "...".to_string()),
// bucket of this backend.
//
// required.
("bucket".to_string(), "...".to_string()),
// bucket id of this backend.
//
// required.
("bucket_id".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 |
|---|---|---|---|
root | string | no | root of this backend. All operations will happen under this root. |
application_key_id | string | no | keyID of this backend. - If application_key_id is set, we will take user's input first. - If not, we will try to load it from environment. |
application_key | string | no | applicationKey of this backend. - If application_key is set, we will take user's input first. - If not, we will try to load it from environment. |
bucket | string | yes | bucket of this backend. required. |
bucket_id | string | yes | bucket id of this backend. required. |