Class ServiceConfig.Cos

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

public static class ServiceConfig.Cos extends Object implements ServiceConfig
Configuration for service cos.
  • Field Details

    • bucket

      public final String bucket

      Bucket of this backend.

    • disableConfigLoad

      public final Boolean disableConfigLoad

      Disable config load so that opendal will not load config from

    • enableVersioning

      public final Boolean enableVersioning
      Deprecated.
      COS versioning capability is enabled by default and this option is no longer needed.

      Deprecated: COS versioning capability is enabled by default.

    • endpoint

      public final String endpoint

      Endpoint of this backend.

    • root

      public final String root

      Root of this backend.

    • secretId

      public final String secretId

      Secret ID of this backend.

    • secretKey

      public final String secretKey

      Secret key of this backend.

    • securityToken

      public final String securityToken

      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).

  • Constructor Details

    • Cos

      public Cos()
  • Method Details

    • scheme

      public String scheme()
      Description copied from interface: ServiceConfig
      The scheme of the service.
      Specified by:
      scheme in interface ServiceConfig
      Returns:
      the scheme
    • configMap

      public Map<String,String> configMap()
      Description copied from interface: ServiceConfig
      Convert the structured config to a type erased config map.

      A map-valued field becomes one entry, under the field's option name, whose value is a JSON object string, such as assume_role_session_tags = {"Team":"data"}. The map's entries are not flattened into top-level entries. Its keys are sorted, an empty map becomes {}, and an unset field has no entry.

      Specified by:
      configMap in interface ServiceConfig
      Returns:
      the config map