Class S3RepositorySettings.Builder

All Implemented Interfaces:
WithJson<S3RepositorySettings.Builder>, ObjectBuilder<S3RepositorySettings>
Enclosing class:
S3RepositorySettings

public static class S3RepositorySettings.Builder extends RepositorySettingsBase.AbstractBuilder<S3RepositorySettings.Builder> implements ObjectBuilder<S3RepositorySettings>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • bucket

      public final S3RepositorySettings.Builder bucket(String value)
      Required - The name of the S3 bucket to use for snapshots. The bucket name must adhere to Amazon's S3 bucket naming rules.

      API name: bucket

    • basePath

      public final S3RepositorySettings.Builder basePath(@Nullable String value)
      The path to the repository data within its bucket. It defaults to an empty string, meaning that the repository is at the root of the bucket. The value of this setting should not start or end with a forward slash (/).

      NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments may share the same bucket.

      API name: base_path

    • bufferSize

      public final S3RepositorySettings.Builder bufferSize(@Nullable String value)
      The minimum threshold below which the chunk is uploaded using a single request. Beyond this threshold, the S3 repository will use the AWS Multipart Upload API to split the chunk into several parts, each of buffer_size length, and to upload each part in its own request. Note that setting a buffer size lower than 5mb is not allowed since it will prevent the use of the Multipart API and may result in upload errors. It is also not possible to set a buffer size greater than 5gb as it is the maximum upload size allowed by S3. Defaults to 100mb or 5% of JVM heap, whichever is smaller.

      API name: buffer_size

    • cannedAcl

      public final S3RepositorySettings.Builder cannedAcl(@Nullable String value)
      The S3 repository supports all S3 canned ACLs: private, public-read, public-read-write, authenticated-read, log-delivery-write, bucket-owner-read, bucket-owner-full-control. You could specify a canned ACL using the canned_acl setting. When the S3 repository creates buckets and objects, it adds the canned ACL into the buckets and objects.

      API name: canned_acl

    • client

      public final S3RepositorySettings.Builder client(@Nullable String value)
      The name of the S3 client to use to connect to S3.

      API name: client

    • deleteObjectsMaxSize

      public final S3RepositorySettings.Builder deleteObjectsMaxSize(@Nullable Integer value)
      The maxmimum batch size, between 1 and 1000, used for DeleteObjects requests. Defaults to 1000 which is the maximum number supported by the AWS DeleteObjects API.

      API name: delete_objects_max_size

    • getRegisterRetryDelay

      public final S3RepositorySettings.Builder getRegisterRetryDelay(@Nullable Time value)
      The time to wait before trying again if an attempt to read a linearizable register fails.

      API name: get_register_retry_delay

    • getRegisterRetryDelay

      public final S3RepositorySettings.Builder getRegisterRetryDelay(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The time to wait before trying again if an attempt to read a linearizable register fails.

      API name: get_register_retry_delay

    • maxMultipartParts

      public final S3RepositorySettings.Builder maxMultipartParts(@Nullable Integer value)
      The maximum number of parts that Elasticsearch will write during a multipart upload of a single object. Files which are larger than buffer_size × max_multipart_parts will be chunked into several smaller objects. Elasticsearch may also split a file across multiple objects to satisfy other constraints such as the chunk_size limit. Defaults to 10000 which is the maximum number of parts in a multipart upload in AWS S3.

      API name: max_multipart_parts

    • maxMultipartUploadCleanupSize

      public final S3RepositorySettings.Builder maxMultipartUploadCleanupSize(@Nullable Integer value)
      The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions. Defaults to 1000 which is the maximum number supported by the AWS ListMultipartUploads API. If set to 0, Elasticsearch will not attempt to clean up dangling multipart uploads.

      API name: max_multipart_upload_cleanup_size

    • readonly

      public final S3RepositorySettings.Builder readonly(@Nullable Boolean value)
      If true, the repository is read-only. The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.

      Only a cluster with write access can create snapshots in the repository. All other clusters connected to the repository should have the readonly parameter set to true.

      If false, the cluster can write to the repository and create snapshots in it.

      IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository.

      API name: readonly

    • serverSideEncryption

      public final S3RepositorySettings.Builder serverSideEncryption(@Nullable Boolean value)
      When set to true, files are encrypted on server side using an AES256 algorithm.

      API name: server_side_encryption

    • storageClass

      public final S3RepositorySettings.Builder storageClass(@Nullable String value)
      The S3 storage class for objects written to the repository. Values may be standard, reduced_redundancy, standard_ia, onezone_ia, and intelligent_tiering.

      API name: storage_class

    • throttledDeleteRetryDelayIncrement

      public final S3RepositorySettings.Builder throttledDeleteRetryDelayIncrement(@Nullable Time value)
      The delay before the first retry and the amount the delay is incremented by on each subsequent retry. The default is 50ms and the minimum is 0ms.

      API name: throttled_delete_retry.delay_increment

    • throttledDeleteRetryDelayIncrement

      public final S3RepositorySettings.Builder throttledDeleteRetryDelayIncrement(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The delay before the first retry and the amount the delay is incremented by on each subsequent retry. The default is 50ms and the minimum is 0ms.

      API name: throttled_delete_retry.delay_increment

    • throttledDeleteRetryMaximumDelay

      public final S3RepositorySettings.Builder throttledDeleteRetryMaximumDelay(@Nullable Time value)
      The upper bound on how long the delays between retries will grow to. The default is 5s and the minimum is 0ms.

      API name: throttled_delete_retry.maximum_delay

    • throttledDeleteRetryMaximumDelay

      public final S3RepositorySettings.Builder throttledDeleteRetryMaximumDelay(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The upper bound on how long the delays between retries will grow to. The default is 5s and the minimum is 0ms.

      API name: throttled_delete_retry.maximum_delay

    • throttledDeleteRetryMaximumNumberOfRetries

      public final S3RepositorySettings.Builder throttledDeleteRetryMaximumNumberOfRetries(@Nullable Integer value)
      The number times to retry a throttled snapshot deletion. The default is 10 and the minimum value is 0 which will disable retries altogether. Note that if retries are enabled in the Azure client, each of these retries comprises that many client-level retries.

      API name: throttled_delete_retry.maximum_number_of_retries

    • self

      protected S3RepositorySettings.Builder self()
      Specified by:
      self in class RepositorySettingsBase.AbstractBuilder<S3RepositorySettings.Builder>
    • build

      public S3RepositorySettings build()
      Specified by:
      build in interface ObjectBuilder<S3RepositorySettings>
      Throws:
      NullPointerException - if some of the required fields are null.