Record Class CortexProperties.S3

java.lang.Object
java.lang.Record
ai.chatur.cortex.spring.CortexProperties.S3
Record Components:
enabled - whether the S3Client bean is registered
endpoint - the S3 endpoint to talk to, for example http://localhost:9000 for MinIO; when unset, the AWS endpoint for the configured region is used
bucket - the bucket backups are uploaded to; required when backups are enabled
region - the AWS region; still required by the SDK when talking to an S3-compatible service, where it is usually arbitrary
auth - how the client authenticates, see CortexProperties.S3.Auth
accessKeyId - the access key, used only when auth is CortexProperties.S3.Auth.STATIC
secretAccessKey - the secret key, used only when auth is CortexProperties.S3.Auth.STATIC
pathStyleAccess - whether to address buckets as a path segment ( endpoint/bucket/key) rather than a subdomain; needed by MinIO and most S3-compatible services
proxy - 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.

  • 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 a S3 record class.
      Parameters:
      enabled - the value for the enabled record component
      endpoint - the value for the endpoint record component
      bucket - the value for the bucket record component
      region - the value for the region record component
      auth - the value for the auth record component
      accessKeyId - the value for the accessKeyId record component
      secretAccessKey - the value for the secretAccessKey record component
      pathStyleAccess - the value for the pathStyleAccess record component
      proxy - the value for the proxy record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • endpoint

      public String endpoint()
      Returns the value of the endpoint record component.
      Returns:
      the value of the endpoint record component
    • bucket

      public String bucket()
      Returns the value of the bucket record component.
      Returns:
      the value of the bucket record component
    • region

      public String region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • auth

      public CortexProperties.S3.Auth auth()
      Returns the value of the auth record component.
      Returns:
      the value of the auth record component
    • accessKeyId

      public String accessKeyId()
      Returns the value of the accessKeyId record component.
      Returns:
      the value of the accessKeyId record component
    • secretAccessKey

      public String secretAccessKey()
      Returns the value of the secretAccessKey record component.
      Returns:
      the value of the secretAccessKey record component
    • pathStyleAccess

      public boolean pathStyleAccess()
      Returns the value of the pathStyleAccess record component.
      Returns:
      the value of the pathStyleAccess record component
    • proxy

      public CortexProperties.S3.Proxy proxy()
      Returns the value of the proxy record component.
      Returns:
      the value of the proxy record component