Class ServiceConfig.S3

java.lang.Object
org.apache.opendal.ServiceConfig.S3
All Implemented Interfaces:
ServiceConfig
Enclosing interface:
ServiceConfig

public static class ServiceConfig.S3 extends Object implements ServiceConfig
Configuration for service s3.
  • Field Details

    • accessKeyId

      public final String 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

      public final Boolean 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

      public final Integer assumeRoleDurationSeconds

      assume_role_duration_seconds for this backend.

    • assumeRoleSessionTags

      public final Map<String,String> assumeRoleSessionTags

      assume_role_session_tags for this backend.

    • batchMaxOperations

      public final Long 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

      @NonNull public final @NonNull String bucket

      bucket name of this backend.

      required.

    • checksumAlgorithm

      public final String 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

      public final String defaultAcl

      Default ACL for new objects. Note that some s3 services like minio do not support this option.

    • defaultStorageClass

      public final String defaultStorageClass

      default storage_class for this backend.

      Available values:

      • DEEP_ARCHIVE
      • GLACIER
      • GLACIER_IR
      • INTELLIGENT_TIERING
      • ONEZONE_IA
      • EXPRESS_ONEZONE
      • OUTPOSTS
      • REDUCED_REDUNDANCY
      • STANDARD
      • STANDARD_IA

      S3 compatible services don't support all of them

    • deleteMaxSize

      public final Long 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

      public final Boolean 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
    • disableEc2Metadata

      public final Boolean 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

      public final Boolean 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

      public final Boolean 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

      public final Boolean 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

      public final Boolean enableRequestPayer

      Indicates whether the client agrees to pay for the requests made to the S3 bucket.

    • enableVersioning

      public final Boolean 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

      public final Boolean 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
    • enableWriteWithAppend

      public final Boolean 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

      public final String endpoint

      endpoint of this backend.

      Endpoint must be full uri, e.g.

      • AWS S3: https://s3.amazonaws.com or https://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.
    • externalId

      public final String externalId

      external_id for this backend.

    • region

      public final String 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

      public final String roleArn

      role_arn for this backend.

      If role_arn is set, we will use already known config as source credential to assume role with role_arn.

    • roleSessionName

      public final String roleSessionName

      role_session_name for this backend.

    • root

      public final String root

      root of this backend.

      All operations will happen under this root.

      default to / if not set.

    • secretAccessKey

      public final String 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

      public final String serverSideEncryption

      server_side_encryption for this backend.

      Available values: AES256, aws:kms.

    • serverSideEncryptionAwsKmsKeyId

      public final String serverSideEncryptionAwsKmsKeyId

      server_side_encryption_aws_kms_key_id for this backend

      • If server_side_encryption set to aws:kms, and server_side_encryption_aws_kms_key_id is not set, S3 will use aws managed kms key to encrypt data.
      • If server_side_encryption set to aws:kms, and server_side_encryption_aws_kms_key_id is a valid kms key id, S3 will use the provided kms key to encrypt data.
      • If the server_side_encryption_aws_kms_key_id is invalid or not found, an error will be returned.
      • If server_side_encryption is not aws:kms, setting server_side_encryption_aws_kms_key_id is a noop.
    • serverSideEncryptionCustomerAlgorithm

      public final String serverSideEncryptionCustomerAlgorithm

      server_side_encryption_customer_algorithm for this backend.

      Available values: AES256.

    • serverSideEncryptionCustomerKey

      public final String serverSideEncryptionCustomerKey

      server_side_encryption_customer_key for this backend.

      Value: BASE64-encoded key that matches algorithm specified in server_side_encryption_customer_algorithm.

    • serverSideEncryptionCustomerKeyMd5

      public final String serverSideEncryptionCustomerKeyMd5

      Set server_side_encryption_customer_key_md5 for this backend.

      Value: MD5 digest of key specified in server_side_encryption_customer_key.

    • sessionToken

      public final String 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

      public final Boolean skipSignature

      Skip signature will skip loading credentials and signing requests.

  • Constructor Details

    • S3

      public S3()
  • Method Details