8 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("cos", [
])?;
use opendal::Operator;
let op = Operator::via_iter("cos", [
// Root of this backend.
// ("root".to_string(), "...".to_string()),
// Endpoint of this backend.
// ("endpoint".to_string(), "...".to_string()),
// Secret ID of this backend.
// ("secret_id".to_string(), "...".to_string()),
// Secret key of this backend.
// ("secret_key".to_string(), "...".to_string()),
// Security token (a.k.a. session token) of this backend.
//
// This is used for temporary credentials issued by Tencent Cloud STS
// (e.g. `GetFederationToken` / `AssumeRole`). When `security_token` is
// provided, it will be used together with `secret_id` and `secret_key`
// to sign requests, and the `x-cos-security-token` header will be
// attached automatically by the signer.
//
// If this field is not set, OpenDAL will also fall back to reading
// the token from environment variables `TENCENTCLOUD_TOKEN`,
// `TENCENTCLOUD_SECURITY_TOKEN` or `QCLOUD_SECRET_TOKEN` (unless
// `disable_config_load` is enabled).
// ("security_token".to_string(), "...".to_string()),
// Bucket of this backend.
// ("bucket".to_string(), "...".to_string()),
// Disable config load so that opendal will not load config from
// ("disable_config_load".to_string(), "true".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. |
endpoint | string | no | Endpoint of this backend. |
secret_id | string | no | Secret ID of this backend. |
secret_key | string | no | Secret key of this backend. |
security_token | string | no | Security token (a.k.a. session token) of this backend.
This is used for temporary credentials issued by Tencent Cloud STS
(e.g. GetFederationToken / AssumeRole). When security_token is
provided, it will be used together with secret_id and secret_key
to sign requests, and the x-cos-security-token header will be
attached automatically by the signer.
If this field is not set, OpenDAL will also fall back to reading
the token from environment variables TENCENTCLOUD_TOKEN,
TENCENTCLOUD_SECURITY_TOKEN or QCLOUD_SECRET_TOKEN (unless
disable_config_load is enabled). |
bucket | string | no | Bucket of this backend. |
enable_versioningdeprecated | bool | no | Deprecated: COS versioning capability is enabled by default. Deprecated since 0.57.0: COS versioning capability is enabled by default and this option is no longer needed. |
disable_config_load | bool | no | Disable config load so that opendal will not load config from |