Class S3RepositorySettings.Builder
- All Implemented Interfaces:
WithJson<S3RepositorySettings.Builder>
,ObjectBuilder<S3RepositorySettings>
- Enclosing class:
- S3RepositorySettings
S3RepositorySettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe path to the repository data within its bucket.Required - The name of the S3 bucket to use for snapshots.bufferSize
(String value) The minimum threshold below which the chunk is uploaded using a single request.build()
Builds aS3RepositorySettings
.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
.The name of the S3 client to use to connect to S3.deleteObjectsMaxSize
(Integer value) The maxmimum batch size, between 1 and 1000, used forDeleteObjects
requests.getRegisterRetryDelay
(Time value) The time to wait before trying again if an attempt to read a linearizable register fails.The time to wait before trying again if an attempt to read a linearizable register fails.maxMultipartParts
(Integer value) The maximum number of parts that Elasticsearch will write during a multipart upload of a single object.The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions.If true, the repository is read-only.protected S3RepositorySettings.Builder
self()
serverSideEncryption
(Boolean value) When set totrue
, files are encrypted on server side using an AES256 algorithm.storageClass
(String value) The S3 storage class for objects written to the repository.The delay before the first retry and the amount the delay is incremented by on each subsequent retry.The delay before the first retry and the amount the delay is incremented by on each subsequent retry.The upper bound on how long the delays between retries will grow to.The upper bound on how long the delays between retries will grow to.The number times to retry a throttled snapshot deletion.Methods inherited from class co.elastic.clients.elasticsearch.snapshot.RepositorySettingsBase.AbstractBuilder
chunkSize, compress, maxRestoreBytesPerSec, maxSnapshotBytesPerSec
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucket
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
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
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 ofbuffer_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 to100mb
or 5% of JVM heap, whichever is smaller.API name:
buffer_size
-
cannedAcl
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 thecanned_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
The name of the S3 client to use to connect to S3.API name:
client
-
deleteObjectsMaxSize
The maxmimum batch size, between 1 and 1000, used forDeleteObjects
requests. Defaults to 1000 which is the maximum number supported by the AWS DeleteObjects API.API name:
delete_objects_max_size
-
getRegisterRetryDelay
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
The maximum number of parts that Elasticsearch will write during a multipart upload of a single object. Files which are larger thanbuffer_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 thechunk_size
limit. Defaults to10000
which is the maximum number of parts in a multipart upload in AWS S3.API name:
max_multipart_parts
-
maxMultipartUploadCleanupSize
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 to0
, Elasticsearch will not attempt to clean up dangling multipart uploads.API name:
max_multipart_upload_cleanup_size
-
readonly
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 totrue
.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
When set totrue
, files are encrypted on server side using an AES256 algorithm.API name:
server_side_encryption
-
storageClass
The S3 storage class for objects written to the repository. Values may bestandard
,reduced_redundancy
,standard_ia
,onezone_ia
, andintelligent_tiering
.API name:
storage_class
-
throttledDeleteRetryDelayIncrement
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
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
- Specified by:
self
in classRepositorySettingsBase.AbstractBuilder<S3RepositorySettings.Builder>
-
build
Builds aS3RepositorySettings
.- Specified by:
build
in interfaceObjectBuilder<S3RepositorySettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-