Skip to main content

aliyun-drive

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

Quick start
use opendal::Operator;

let op = Operator::via_iter("aliyun-drive", [
("drive_type".to_string(), "...".to_string()),
])?;
All configuration options (copy & trim)
Full reference
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.

Configuration reference

General6
KeyTypeRequiredDescription
rootstringnoThe Root of this backend. All operations will happen under this root. Default to / if not set.
access_tokenstringnoThe access_token of this backend. Solution for client-only purpose. #4733 Required if no client_id, client_secret and refresh_token are provided.
client_idstringnoThe client_id of this backend. Required if no access_token is provided.
client_secretstringnoThe client_secret of this backend. Required if no access_token is provided.
refresh_tokenstringnoThe refresh_token of this backend. Required if no access_token is provided.
drive_typestringyesThe 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.