Package ai.chatur.cortex.spring
Record Class CortexProperties.S3
java.lang.Object
java.lang.Record
ai.chatur.cortex.spring.CortexProperties.S3
- Record Components:
enabled- whether theS3Clientbean is registeredendpoint- the S3 endpoint to talk to, for examplehttp://localhost:9000for MinIO; when unset, the AWS endpoint for the configured region is usedbucket- the bucket backups are uploaded to; required when backups are enabledregion- the AWS region; still required by the SDK when talking to an S3-compatible service, where it is usually arbitraryauth- how the client authenticates, seeCortexProperties.S3.AuthaccessKeyId- the access key, used only whenauthisCortexProperties.S3.Auth.STATICsecretAccessKey- the secret key, used only whenauthisCortexProperties.S3.Auth.STATICpathStyleAccess- whether to address buckets as a path segment (endpoint/bucket/key) rather than a subdomain; needed by MinIO and most S3-compatible servicesproxy- the HTTP proxy settings
- Enclosing class:
CortexProperties
public static record CortexProperties.S3(boolean enabled, String endpoint, String bucket, String region, CortexProperties.S3.Auth auth, String accessKeyId, String secretAccessKey, boolean pathStyleAccess, CortexProperties.S3.Proxy proxy)
extends Record
Settings for the S3 client auto-configured by
CortexBackupAutoConfiguration, used to upload backups.
Disabled by default, and requires software.amazon.awssdk:s3 and
software.amazon.awssdk:apache-client on the classpath — neither is brought in by the starter,
since consumers that do not back up to S3 should not pay for the AWS SDK.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the S3 client obtains credentials.static final recordHTTP proxy settings for the S3 client. -
Constructor Summary
ConstructorsConstructorDescriptionS3(boolean enabled, String endpoint, String bucket, String region, CortexProperties.S3.Auth auth, String accessKeyId, String secretAccessKey, boolean pathStyleAccess, CortexProperties.S3.Proxy proxy) Creates an instance of aS3record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessKeyIdrecord component.auth()Returns the value of theauthrecord component.bucket()Returns the value of thebucketrecord component.booleanenabled()Returns the value of theenabledrecord component.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thepathStyleAccessrecord component.proxy()Returns the value of theproxyrecord component.region()Returns the value of theregionrecord component.Returns the value of thesecretAccessKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
S3
public S3(@DefaultValue("false") boolean enabled, String endpoint, String bucket, @DefaultValue("us-east-1") String region, @DefaultValue("default") CortexProperties.S3.Auth auth, String accessKeyId, String secretAccessKey, @DefaultValue("false") boolean pathStyleAccess, @DefaultValue CortexProperties.S3.Proxy proxy) Creates an instance of aS3record class.- Parameters:
enabled- the value for theenabledrecord componentendpoint- the value for theendpointrecord componentbucket- the value for thebucketrecord componentregion- the value for theregionrecord componentauth- the value for theauthrecord componentaccessKeyId- the value for theaccessKeyIdrecord componentsecretAccessKey- the value for thesecretAccessKeyrecord componentpathStyleAccess- the value for thepathStyleAccessrecord componentproxy- the value for theproxyrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
bucket
Returns the value of thebucketrecord component.- Returns:
- the value of the
bucketrecord component
-
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
auth
Returns the value of theauthrecord component.- Returns:
- the value of the
authrecord component
-
accessKeyId
Returns the value of theaccessKeyIdrecord component.- Returns:
- the value of the
accessKeyIdrecord component
-
secretAccessKey
Returns the value of thesecretAccessKeyrecord component.- Returns:
- the value of the
secretAccessKeyrecord component
-
pathStyleAccess
public boolean pathStyleAccess()Returns the value of thepathStyleAccessrecord component.- Returns:
- the value of the
pathStyleAccessrecord component
-
proxy
Returns the value of theproxyrecord component.- Returns:
- the value of the
proxyrecord component
-