Class ServiceConfig.Gcs

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

public static class ServiceConfig.Gcs extends Object implements ServiceConfig
Configuration for service gcs.
  • Field Details

    • allowAnonymous

      public final Boolean allowAnonymous
      Deprecated.
      Please use `skip_signature` instead of `allow_anonymous`

      Allow opendal to send requests without signing when credentials are not loaded.

    • bucket

      @NonNull public final @NonNull String bucket

      bucket name

    • credential

      public final String credential

      Credentials string for GCS service OAuth2 authentication.

    • credentialPath

      public final String credentialPath

      Local path to credentials file for GCS service OAuth2 authentication.

    • defaultStorageClass

      public final String defaultStorageClass

      The default storage class used by gcs.

    • disableConfigLoad

      public final Boolean disableConfigLoad

      Disable loading configuration from the environment.

    • disableVmMetadata

      public final Boolean disableVmMetadata

      Disable attempting to load credentials from the GCE metadata server when running within Google Cloud.

    • endpoint

      public final String endpoint

      endpoint URI of GCS service, default is https://storage.googleapis.com

    • predefinedAcl

      public final String predefinedAcl

      The predefined acl for GCS.

    • root

      public final String root

      root URI, all operations happens under root

    • scope

      public final String scope

      Scope for gcs.

    • serviceAccount

      public final String serviceAccount

      Service Account for gcs.

    • skipSignature

      public final Boolean skipSignature

      Skip signature will skip loading credentials and signing requests.

    • token

      public final String token

      A Google Cloud OAuth2 token.

      Takes precedence over credential and credential_path.

  • Constructor Details

    • Gcs

      public Gcs()
  • 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