Skip to main content

oss

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

Quick start
use opendal::Operator;

let op = Operator::via_iter("oss", [
("bucket".to_string(), "...".to_string()),
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let op = Operator::via_iter("oss", [
// Root for oss.
// ("root".to_string(), "...".to_string()),

// Endpoint for oss.
// ("endpoint".to_string(), "...".to_string()),

// Presign endpoint for oss.
// ("presign_endpoint".to_string(), "...".to_string()),

// Bucket for oss.
("bucket".to_string(), "...".to_string()),

// Addressing style for oss.
// ("addressing_style".to_string(), "...".to_string()),

// Pre sign addressing style for oss.
// ("presign_addressing_style".to_string(), "...".to_string()),

// Server side encryption for oss.
// ("server_side_encryption".to_string(), "...".to_string()),

// Server side encryption key id for oss.
// ("server_side_encryption_key_id".to_string(), "...".to_string()),

// Skip signature will skip loading credentials and signing requests.
// ("skip_signature".to_string(), "true".to_string()),

// Access key id for oss.
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_ACCESS_KEY_ID`
// ("access_key_id".to_string(), "...".to_string()),

// Access key secret for oss.
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_ACCESS_KEY_SECRET`
// ("access_key_secret".to_string(), "...".to_string()),

// `security_token` will be loaded from
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_SECURITY_TOKEN`
// ("security_token".to_string(), "...".to_string()),

// If `role_arn` is set, we will use already known config as source
// credential to assume role with `role_arn`.
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_ROLE_ARN`
// ("role_arn".to_string(), "...".to_string()),

// role_session_name for this backend.
// ("role_session_name".to_string(), "...".to_string()),

// `oidc_provider_arn` will be loaded from
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_OIDC_PROVIDER_ARN`
// ("oidc_provider_arn".to_string(), "...".to_string()),

// `oidc_token_file` will be loaded from
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_OIDC_TOKEN_FILE`
// ("oidc_token_file".to_string(), "...".to_string()),

// `sts_endpoint` will be loaded from
//
// - this field if it's `is_some`
// - env value: `ALIBABA_CLOUD_STS_ENDPOINT`
// ("sts_endpoint".to_string(), "...".to_string()),

// external_id for this backend.
// ("external_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.

Configuration reference

General22
KeyTypeRequiredDescription
rootstringnoRoot for oss.
endpointstringnoEndpoint for oss.
presign_endpointstringnoPresign endpoint for oss.
bucketstringyesBucket for oss.
addressing_stylestringnoAddressing style for oss.
presign_addressing_stylestringnoPre sign addressing style for oss.
enable_versioningdeprecatedboolnoDeprecated: OSS versioning capability is enabled by default.
Deprecated since 0.57.0: OSS versioning capability is enabled by default and this option is no longer needed.
server_side_encryptionstringnoServer side encryption for oss.
server_side_encryption_key_idstringnoServer side encryption key id for oss.
skip_signatureboolnoSkip signature will skip loading credentials and signing requests.
allow_anonymousdeprecatedboolnoAllow anonymous for oss.
Deprecated since 0.57.0: Please use skip_signature instead of allow_anonymous
access_key_idstringnoAccess key id for oss. - this field if it's is_some - env value: ALIBABA_CLOUD_ACCESS_KEY_ID
access_key_secretstringnoAccess key secret for oss. - this field if it's is_some - env value: ALIBABA_CLOUD_ACCESS_KEY_SECRET
security_tokenstringnosecurity_token will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_SECURITY_TOKEN
batch_max_operationsdeprecatedintegernoDeprecated: OSS delete batch capability is enabled by default.
Deprecated since 0.57.0: OSS delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
delete_max_sizedeprecatedintegernoDeprecated: OSS delete batch capability is enabled by default.
Deprecated since 0.57.0: OSS delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.
role_arnstringnoIf role_arn is set, we will use already known config as source credential to assume role with role_arn. - this field if it's is_some - env value: ALIBABA_CLOUD_ROLE_ARN
role_session_namestringnorole_session_name for this backend.
oidc_provider_arnstringnooidc_provider_arn will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_OIDC_PROVIDER_ARN
oidc_token_filestringnooidc_token_file will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_OIDC_TOKEN_FILE
sts_endpointstringnosts_endpoint will be loaded from - this field if it's is_some - env value: ALIBABA_CLOUD_STS_ENDPOINT
external_idstringnoexternal_id for this backend.