Class ServiceConfig.S3
- All Implemented Interfaces:
ServiceConfig
- Enclosing interface:
ServiceConfig
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServiceConfig
ServiceConfig.AliyunDrive, ServiceConfig.Alluxio, ServiceConfig.Azblob, ServiceConfig.Azdls, ServiceConfig.Azfile, ServiceConfig.B2, ServiceConfig.Cacache, ServiceConfig.CloudflareKv, ServiceConfig.Compfs, ServiceConfig.Cos, ServiceConfig.D1, ServiceConfig.Dashmap, ServiceConfig.Dbfs, ServiceConfig.Dropbox, ServiceConfig.Etcd, ServiceConfig.Foyer, ServiceConfig.Fs, ServiceConfig.Gcs, ServiceConfig.Gdrive, ServiceConfig.Ghac, ServiceConfig.Github, ServiceConfig.Goosefs, ServiceConfig.Gridfs, ServiceConfig.HdfsNative, ServiceConfig.Hf, ServiceConfig.Http, ServiceConfig.Ipfs, ServiceConfig.Ipmfs, ServiceConfig.Koofr, ServiceConfig.Lakefs, ServiceConfig.Memcached, ServiceConfig.Memory, ServiceConfig.MiniMoka, ServiceConfig.Moka, ServiceConfig.Mongodb, ServiceConfig.Monoiofs, ServiceConfig.Mysql, ServiceConfig.Obs, ServiceConfig.Onedrive, ServiceConfig.Opfs, ServiceConfig.Oss, ServiceConfig.Pcloud, ServiceConfig.Persy, ServiceConfig.Postgresql, ServiceConfig.Redb, ServiceConfig.Redis, ServiceConfig.S3, ServiceConfig.Seafile, ServiceConfig.Sftp, ServiceConfig.Sled, ServiceConfig.Sqlite, ServiceConfig.Surrealdb, ServiceConfig.Swift, ServiceConfig.Tos, ServiceConfig.Upyun, ServiceConfig.VercelArtifacts, ServiceConfig.VercelBlob, ServiceConfig.Webdav, ServiceConfig.Webhdfs, ServiceConfig.YandexDisk -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringaccess_key_id of this backend.final BooleanDeprecated.Please use `skip_signature` instead of `allow_anonymous`final Integerassume_role_duration_seconds for this backend.assume_role_session_tags for this backend.final LongDeprecated.S3 delete batch capability is enabled by default.final @NonNull Stringbucket name of this backend.final StringChecksum Algorithm to use when sending checksums in HTTP headers.final StringDefault ACL for new objects.final Stringdefault storage_class for this backend.final LongDeprecated.S3 delete batch capability is enabled by default.final BooleanDisable config load so that opendal will not load config from environment.final BooleanDisable load credential from ec2 metadata.final BooleanOpenDAL uses List Objects V2 by default to list objects.final BooleanDeprecated.S3 stat override capabilities are enabled by default.final BooleanDeprecated.S3 write with If-Match capability is enabled by default and this option is no longer needed.final BooleanIndicates whether the client agrees to pay for the requests made to the S3 bucket.final BooleanDeprecated.S3 versioning capability is enabled by default and this option is no longer needed.final BooleanEnable virtual host style so that opendal will send API requests in virtual host style instead of path style.final BooleanDeprecated.S3 append capability is enabled by default and this option is no longer needed.final Stringendpoint of this backend.final Stringexternal_id for this backend.final StringRegion represent the signing region of this endpoint.final Stringrole_arn for this backend.final Stringrole_session_name for this backend.final Stringroot of this backend.final Stringsecret_access_key of this backend.final Stringserver_side_encryption for this backend.final Stringserver_side_encryption_aws_kms_key_id for this backendfinal Stringserver_side_encryption_customer_algorithm for this backend.final Stringserver_side_encryption_customer_key for this backend.final StringSet server_side_encryption_customer_key_md5 for this backend.final Stringsession_token (aka, security token) of this backend.final BooleanSkip signature will skip loading credentials and signing requests. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
accessKeyId
access_key_id of this backend.
- If access_key_id is set, we will take user's input first.
- If not, we will try to load it from environment.
-
allowAnonymous
Deprecated.Please use `skip_signature` instead of `allow_anonymous`Allow anonymous will allow opendal to send request without signing when credential is not loaded.
-
assumeRoleDurationSeconds
assume_role_duration_seconds for this backend.
-
assumeRoleSessionTags
-
batchMaxOperations
Deprecated.S3 delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.Deprecated: S3 delete batch capability is enabled by default.
-
bucket
bucket name of this backend.
required.
-
checksumAlgorithm
Checksum Algorithm to use when sending checksums in HTTP headers. This is necessary when writing to AWS S3 Buckets with Object Lock enabled for example.
Available options:
- "crc32c"
- "md5"
-
defaultAcl
Default ACL for new objects. Note that some s3 services like minio do not support this option.
-
defaultStorageClass
default storage_class for this backend.
Available values:
DEEP_ARCHIVEGLACIERGLACIER_IRINTELLIGENT_TIERINGONEZONE_IAEXPRESS_ONEZONEOUTPOSTSREDUCED_REDUNDANCYSTANDARDSTANDARD_IA
S3 compatible services don't support all of them
-
deleteMaxSize
Deprecated.S3 delete batch capability is enabled by default. Use CapabilityOverrideLayer to override delete_max_size for specific endpoints.Deprecated: S3 delete batch capability is enabled by default.
-
disableConfigLoad
Disable config load so that opendal will not load config from environment.
For examples:
- envs like
AWS_ACCESS_KEY_ID - files like
~/.aws/config
- envs like
-
disableEc2Metadata
Disable load credential from ec2 metadata.
This option is used to disable the default behavior of opendal to load credential from ec2 metadata, a.k.a., IMDSv2
-
disableListObjectsV2
OpenDAL uses List Objects V2 by default to list objects. However, some legacy services do not yet support V2. This option allows users to switch back to the older List Objects V1.
-
disableStatWithOverride
Deprecated.S3 stat override capabilities are enabled by default. Use CapabilityOverrideLayer to override them for specific endpoints.Deprecated: S3 stat override capabilities are enabled by default.
-
disableWriteWithIfMatch
Deprecated.S3 write with If-Match capability is enabled by default and this option is no longer needed.Deprecated: S3 write with If-Match capability is enabled by default.
-
enableRequestPayer
Indicates whether the client agrees to pay for the requests made to the S3 bucket.
-
enableVersioning
Deprecated.S3 versioning capability is enabled by default and this option is no longer needed.Deprecated: S3 versioning capability is enabled by default.
-
enableVirtualHostStyle
Enable virtual host style so that opendal will send API requests in virtual host style instead of path style.
- By default, opendal will send API to
https://s3.us-east-1.amazonaws.com/bucket_name - Enabled, opendal will send API to
https://bucket_name.s3.us-east-1.amazonaws.com
- By default, opendal will send API to
-
enableWriteWithAppend
Deprecated.S3 append capability is enabled by default and this option is no longer needed.Deprecated: S3 append capability is enabled by default.
-
endpoint
endpoint of this backend.
Endpoint must be full uri, e.g.
- AWS S3:
https://s3.amazonaws.comorhttps://s3.{region}.amazonaws.com - Cloudflare R2:
https://<ACCOUNT_ID>.r2.cloudflarestorage.com - Aliyun OSS:
https://{region}.aliyuncs.com - Tencent COS:
https://cos.{region}.myqcloud.com - Minio:
http://127.0.0.1:9000
If user inputs endpoint without scheme like "s3.amazonaws.com", we will prepend "https://" before it.
- If endpoint is set, we will take user's input first.
- If not, we will try to load it from environment.
- If still not set, default to
https://s3.amazonaws.com.
- AWS S3:
-
externalId
external_id for this backend.
-
region
Region represent the signing region of this endpoint. This is required if you are using the default AWS S3 endpoint.
If using a custom endpoint,
- If region is set, we will take user's input first.
- If not, we will try to load it from environment.
-
roleArn
role_arn for this backend.
If
role_arnis set, we will use already known config as source credential to assume role withrole_arn. -
roleSessionName
role_session_name for this backend.
-
root
root of this backend.
All operations will happen under this root.
default to
/if not set. -
secretAccessKey
secret_access_key of this backend.
- If secret_access_key is set, we will take user's input first.
- If not, we will try to load it from environment.
-
serverSideEncryption
server_side_encryption for this backend.
Available values:
AES256,aws:kms. -
serverSideEncryptionAwsKmsKeyId
server_side_encryption_aws_kms_key_id for this backend
- If
server_side_encryptionset toaws:kms, andserver_side_encryption_aws_kms_key_idis not set, S3 will use aws managed kms key to encrypt data. - If
server_side_encryptionset toaws:kms, andserver_side_encryption_aws_kms_key_idis a valid kms key id, S3 will use the provided kms key to encrypt data. - If the
server_side_encryption_aws_kms_key_idis invalid or not found, an error will be returned. - If
server_side_encryptionis notaws:kms, settingserver_side_encryption_aws_kms_key_idis a noop.
- If
-
serverSideEncryptionCustomerAlgorithm
server_side_encryption_customer_algorithm for this backend.
Available values:
AES256. -
serverSideEncryptionCustomerKey
server_side_encryption_customer_key for this backend.
Value: BASE64-encoded key that matches algorithm specified in
server_side_encryption_customer_algorithm. -
serverSideEncryptionCustomerKeyMd5
Set server_side_encryption_customer_key_md5 for this backend.
Value: MD5 digest of key specified in
server_side_encryption_customer_key. -
sessionToken
session_token (aka, security token) of this backend.
This token will expire after sometime, it's recommended to set session_token by hand.
-
skipSignature
Skip signature will skip loading credentials and signing requests.
-
-
Constructor Details
-
S3
public S3()
-
-
Method Details
-
scheme
Description copied from interface:ServiceConfigThe scheme of the service.- Specified by:
schemein interfaceServiceConfig- Returns:
- the scheme
-
configMap
Description copied from interface:ServiceConfigConvert the structured config to a type erased config map.- Specified by:
configMapin interfaceServiceConfig- Returns:
- the config map
-