6 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("aliyun-drive", [
("drive_type".to_string(), "...".to_string()),
])?;
use opendal::Operator;
let op = Operator::via_iter("aliyun-drive", [
// The Root of this backend.
//
// All operations will happen under this root.
//
// Default to `/` if not set.
// ("root".to_string(), "...".to_string()),
// The access_token of this backend.
//
// Solution for client-only purpose. #4733
//
// Required if no client_id, client_secret and refresh_token are provided.
// ("access_token".to_string(), "...".to_string()),
// The client_id of this backend.
//
// Required if no access_token is provided.
// ("client_id".to_string(), "...".to_string()),
// The client_secret of this backend.
//
// Required if no access_token is provided.
// ("client_secret".to_string(), "...".to_string()),
// The refresh_token of this backend.
//
// Required if no access_token is provided.
// ("refresh_token".to_string(), "...".to_string()),
// The drive_type of this backend.
//
// All operations will happen under this type of drive.
//
// Available values are `default`, `backup` and `resource`.
//
// Fallback to default if not set or no other drives can be found.
("drive_type".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 | The Root of this backend.
All operations will happen under this root.
Default to / if not set. |
access_token | string | no | The access_token of this backend. Solution for client-only purpose. #4733 Required if no client_id, client_secret and refresh_token are provided. |
client_id | string | no | The client_id of this backend. Required if no access_token is provided. |
client_secret | string | no | The client_secret of this backend. Required if no access_token is provided. |
refresh_token | string | no | The refresh_token of this backend. Required if no access_token is provided. |
drive_type | string | yes | The drive_type of this backend.
All operations will happen under this type of drive.
Available values are default, backup and resource.
Fallback to default if not set or no other drives can be found. |