Class S3BackendMetaData

All Implemented Interfaces:
MetaDataProducerOutput, QMetaDataObject, TopLevelMetaDataInterface, Serializable

public class S3BackendMetaData extends AbstractFilesystemBackendMetaData
S3 backend meta data. Works with AWS S3 and with any S3-compatible store (MinIO, Garage, Cloudflare R2, Backblaze B2, Wasabi, DigitalOcean Spaces, Ceph RGW, ...): - endpoint: the store's URL (empty means AWS's regional endpoint). - pathStyleAccess: true for http(s)://host/bucket/key addressing, which most self-hosted stores need; false (default) for virtual-hosted addressing. - checksumMode: see S3ChecksumMode. Null means WHEN_REQUIRED when an endpoint is set, else the SDK default (WHEN_SUPPORTED). - tlsVerify: null/true verifies TLS certificates; false trusts any certificate (development only). - caCertificatesPem: extra PEM certificate(s) to trust, for stores behind a private CA (in addition to the JVM's default trust store). - connectTimeoutMillis / socketTimeoutMillis: null keeps the defaults (10 seconds / 50 seconds, the same as the AWS SDK v1 defaults). - maxListedObjects: listings that would return more objects than this fail with a clear error instead of exhausting memory. Null means the default (100,000); zero or negative means no cap. accessKey, secretKey, region, endpoint and caCertificatesPem are interpreted for ${env.X} / ${prop.X} references when the instance is enriched.
See Also:
  • Constructor Details

    • S3BackendMetaData

      public S3BackendMetaData()
      Default Constructor.
  • Method Details

    • getBucketName

      public String getBucketName()
      Getter for bucketName
    • setBucketName

      public void setBucketName(String bucketName)
      Setter for bucketName
    • withBucketName

      public S3BackendMetaData withBucketName(String bucketName)
      Fluent setter for bucketName
    • getAccessKey

      public String getAccessKey()
      Getter for accessKey
    • setAccessKey

      public void setAccessKey(String accessKey)
      Setter for accessKey
    • withAccessKey

      public S3BackendMetaData withAccessKey(String accessKey)
      Fluent setter for accessKey
    • getSecretKey

      public String getSecretKey()
      Getter for secretKey
    • setSecretKey

      public void setSecretKey(String secretKey)
      Setter for secretKey
    • withSecretKey

      public S3BackendMetaData withSecretKey(String secretKey)
      Fluent setter for secretKey
    • getRegion

      public String getRegion()
      Getter for region
    • setRegion

      public void setRegion(String region)
      Setter for region
    • withRegion

      public S3BackendMetaData withRegion(String region)
      Fluent setter for region
    • getEndpoint

      public String getEndpoint()
      Getter for endpoint - the endpoint URL of the S3-compatible store
    • setEndpoint

      public void setEndpoint(String endpoint)
      Setter for endpoint - the endpoint URL of the S3-compatible store
    • withEndpoint

      public S3BackendMetaData withEndpoint(String endpoint)
      Fluent setter for endpoint - the endpoint URL of the S3-compatible store
    • getPathStyleAccess

      public Boolean getPathStyleAccess()
      Getter for pathStyleAccess - whether to use path-style addressing
    • setPathStyleAccess

      public void setPathStyleAccess(Boolean pathStyleAccess)
      Setter for pathStyleAccess - whether to use path-style addressing
    • withPathStyleAccess

      public S3BackendMetaData withPathStyleAccess(Boolean pathStyleAccess)
      Fluent setter for pathStyleAccess - whether to use path-style addressing
    • getChecksumMode

      public S3ChecksumMode getChecksumMode()
      Getter for checksumMode - the request/response checksum mode
    • setChecksumMode

      public void setChecksumMode(S3ChecksumMode checksumMode)
      Setter for checksumMode - the request/response checksum mode
    • withChecksumMode

      public S3BackendMetaData withChecksumMode(S3ChecksumMode checksumMode)
      Fluent setter for checksumMode - the request/response checksum mode
    • getTlsVerify

      public Boolean getTlsVerify()
      Getter for tlsVerify - whether TLS certificates are verified
    • setTlsVerify

      public void setTlsVerify(Boolean tlsVerify)
      Setter for tlsVerify - whether TLS certificates are verified
    • withTlsVerify

      public S3BackendMetaData withTlsVerify(Boolean tlsVerify)
      Fluent setter for tlsVerify - whether TLS certificates are verified
    • getCaCertificatesPem

      public String getCaCertificatesPem()
      Getter for caCertificatesPem - extra PEM CA certificates to trust
    • setCaCertificatesPem

      public void setCaCertificatesPem(String caCertificatesPem)
      Setter for caCertificatesPem - extra PEM CA certificates to trust
    • withCaCertificatesPem

      public S3BackendMetaData withCaCertificatesPem(String caCertificatesPem)
      Fluent setter for caCertificatesPem - extra PEM CA certificates to trust
    • getConnectTimeoutMillis

      public Integer getConnectTimeoutMillis()
      Getter for connectTimeoutMillis - the HTTP connect timeout
    • setConnectTimeoutMillis

      public void setConnectTimeoutMillis(Integer connectTimeoutMillis)
      Setter for connectTimeoutMillis - the HTTP connect timeout
    • withConnectTimeoutMillis

      public S3BackendMetaData withConnectTimeoutMillis(Integer connectTimeoutMillis)
      Fluent setter for connectTimeoutMillis - the HTTP connect timeout
    • getSocketTimeoutMillis

      public Integer getSocketTimeoutMillis()
      Getter for socketTimeoutMillis - the HTTP socket (read) timeout
    • setSocketTimeoutMillis

      public void setSocketTimeoutMillis(Integer socketTimeoutMillis)
      Setter for socketTimeoutMillis - the HTTP socket (read) timeout
    • withSocketTimeoutMillis

      public S3BackendMetaData withSocketTimeoutMillis(Integer socketTimeoutMillis)
      Fluent setter for socketTimeoutMillis - the HTTP socket (read) timeout
    • getMaxListedObjects

      public Integer getMaxListedObjects()
      Getter for maxListedObjects - the cap on objects returned by one listing
    • setMaxListedObjects

      public void setMaxListedObjects(Integer maxListedObjects)
      Setter for maxListedObjects - the cap on objects returned by one listing
    • withMaxListedObjects

      public S3BackendMetaData withMaxListedObjects(Integer maxListedObjects)
      Fluent setter for maxListedObjects - the cap on objects returned by one listing
    • enrich

      public void enrich()
      Called by the QInstanceEnricher - to do backend-type-specific enrichments. Original use case is: reading secrets into fields (e.g., passwords). TODO - migrate to use @InterpretableFields (and complete that impl on core side)
      Overrides:
      enrich in class QBackendMetaData
    • withBasePath

      public S3BackendMetaData withBasePath(String basePath)
      Fluent setter for basePath
      Overrides:
      withBasePath in class AbstractFilesystemBackendMetaData
    • withName

      public S3BackendMetaData withName(String name)
      Fluent setter for name
      Overrides:
      withName in class QBackendMetaData