Class S3BackendMetaData
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.QBackendMetaData
com.kingsrook.qqq.backend.module.filesystem.base.model.metadata.AbstractFilesystemBackendMetaData
com.kingsrook.qqq.backend.module.filesystem.s3.model.metadata.S3BackendMetaData
- All Implemented Interfaces:
MetaDataProducerOutput,QMetaDataObject,TopLevelMetaDataInterface,Serializable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenrich()Called by the QInstanceEnricher - to do backend-type-specific enrichments.Getter for accessKeyGetter for bucketNameGetter for caCertificatesPem - extra PEM CA certificates to trustGetter for checksumMode - the request/response checksum modeGetter for connectTimeoutMillis - the HTTP connect timeoutGetter for endpoint - the endpoint URL of the S3-compatible storeGetter for maxListedObjects - the cap on objects returned by one listingGetter for pathStyleAccess - whether to use path-style addressingGetter for regionGetter for secretKeyGetter for socketTimeoutMillis - the HTTP socket (read) timeoutGetter for tlsVerify - whether TLS certificates are verifiedvoidsetAccessKey(String accessKey) Setter for accessKeyvoidsetBucketName(String bucketName) Setter for bucketNamevoidsetCaCertificatesPem(String caCertificatesPem) Setter for caCertificatesPem - extra PEM CA certificates to trustvoidsetChecksumMode(S3ChecksumMode checksumMode) Setter for checksumMode - the request/response checksum modevoidsetConnectTimeoutMillis(Integer connectTimeoutMillis) Setter for connectTimeoutMillis - the HTTP connect timeoutvoidsetEndpoint(String endpoint) Setter for endpoint - the endpoint URL of the S3-compatible storevoidsetMaxListedObjects(Integer maxListedObjects) Setter for maxListedObjects - the cap on objects returned by one listingvoidsetPathStyleAccess(Boolean pathStyleAccess) Setter for pathStyleAccess - whether to use path-style addressingvoidSetter for regionvoidsetSecretKey(String secretKey) Setter for secretKeyvoidsetSocketTimeoutMillis(Integer socketTimeoutMillis) Setter for socketTimeoutMillis - the HTTP socket (read) timeoutvoidsetTlsVerify(Boolean tlsVerify) Setter for tlsVerify - whether TLS certificates are verifiedwithAccessKey(String accessKey) Fluent setter for accessKeywithBasePath(String basePath) Fluent setter for basePathwithBucketName(String bucketName) Fluent setter for bucketNamewithCaCertificatesPem(String caCertificatesPem) Fluent setter for caCertificatesPem - extra PEM CA certificates to trustwithChecksumMode(S3ChecksumMode checksumMode) Fluent setter for checksumMode - the request/response checksum modewithConnectTimeoutMillis(Integer connectTimeoutMillis) Fluent setter for connectTimeoutMillis - the HTTP connect timeoutwithEndpoint(String endpoint) Fluent setter for endpoint - the endpoint URL of the S3-compatible storewithMaxListedObjects(Integer maxListedObjects) Fluent setter for maxListedObjects - the cap on objects returned by one listingFluent setter for namewithPathStyleAccess(Boolean pathStyleAccess) Fluent setter for pathStyleAccess - whether to use path-style addressingwithRegion(String region) Fluent setter for regionwithSecretKey(String secretKey) Fluent setter for secretKeywithSocketTimeoutMillis(Integer socketTimeoutMillis) Fluent setter for socketTimeoutMillis - the HTTP socket (read) timeoutwithTlsVerify(Boolean tlsVerify) Fluent setter for tlsVerify - whether TLS certificates are verifiedMethods inherited from class com.kingsrook.qqq.backend.module.filesystem.base.model.metadata.AbstractFilesystemBackendMetaData
getBasePath, requiresPrimaryKeyOnTables, setBasePathMethods inherited from class com.kingsrook.qqq.backend.core.model.metadata.QBackendMetaData
addSelfToInstance, getBackendType, getBackendVariantsConfig, getDisabledCapabilities, getEnabledCapabilities, getName, getUsesVariants, performValidation, setBackendType, setBackendType, setBackendVariantsConfig, setDisabledCapabilities, setEnabledCapabilities, setName, setUsesVariants, withBackendType, withBackendVariantsConfig, withCapabilities, withCapabilities, withCapability, withDisabledCapabilities, withEnabledCapabilities, withoutCapabilities, withoutCapabilities, withoutCapability, withUsesVariants
-
Constructor Details
-
S3BackendMetaData
public S3BackendMetaData()Default Constructor.
-
-
Method Details
-
getBucketName
Getter for bucketName -
setBucketName
Setter for bucketName -
withBucketName
Fluent setter for bucketName -
getAccessKey
Getter for accessKey -
setAccessKey
Setter for accessKey -
withAccessKey
Fluent setter for accessKey -
getSecretKey
Getter for secretKey -
setSecretKey
Setter for secretKey -
withSecretKey
Fluent setter for secretKey -
getRegion
Getter for region -
setRegion
Setter for region -
withRegion
Fluent setter for region -
getEndpoint
Getter for endpoint - the endpoint URL of the S3-compatible store -
setEndpoint
Setter for endpoint - the endpoint URL of the S3-compatible store -
withEndpoint
Fluent setter for endpoint - the endpoint URL of the S3-compatible store -
getPathStyleAccess
Getter for pathStyleAccess - whether to use path-style addressing -
setPathStyleAccess
Setter for pathStyleAccess - whether to use path-style addressing -
withPathStyleAccess
Fluent setter for pathStyleAccess - whether to use path-style addressing -
getChecksumMode
Getter for checksumMode - the request/response checksum mode -
setChecksumMode
Setter for checksumMode - the request/response checksum mode -
withChecksumMode
Fluent setter for checksumMode - the request/response checksum mode -
getTlsVerify
Getter for tlsVerify - whether TLS certificates are verified -
setTlsVerify
Setter for tlsVerify - whether TLS certificates are verified -
withTlsVerify
Fluent setter for tlsVerify - whether TLS certificates are verified -
getCaCertificatesPem
Getter for caCertificatesPem - extra PEM CA certificates to trust -
setCaCertificatesPem
Setter for caCertificatesPem - extra PEM CA certificates to trust -
withCaCertificatesPem
Fluent setter for caCertificatesPem - extra PEM CA certificates to trust -
getConnectTimeoutMillis
Getter for connectTimeoutMillis - the HTTP connect timeout -
setConnectTimeoutMillis
Setter for connectTimeoutMillis - the HTTP connect timeout -
withConnectTimeoutMillis
Fluent setter for connectTimeoutMillis - the HTTP connect timeout -
getSocketTimeoutMillis
Getter for socketTimeoutMillis - the HTTP socket (read) timeout -
setSocketTimeoutMillis
Setter for socketTimeoutMillis - the HTTP socket (read) timeout -
withSocketTimeoutMillis
Fluent setter for socketTimeoutMillis - the HTTP socket (read) timeout -
getMaxListedObjects
Getter for maxListedObjects - the cap on objects returned by one listing -
setMaxListedObjects
Setter for maxListedObjects - the cap on objects returned by one listing -
withMaxListedObjects
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:
enrichin classQBackendMetaData
-
withBasePath
Fluent setter for basePath- Overrides:
withBasePathin classAbstractFilesystemBackendMetaData
-
withName
Fluent setter for name- Overrides:
withNamein classQBackendMetaData
-