Class Retention.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<Retention.Builder>
co.elastic.clients.elasticsearch.slm.Retention.Builder
- All Implemented Interfaces:
WithJson<Retention.Builder>,ObjectBuilder<Retention>
- Enclosing class:
- Retention
public static class Retention.Builder
extends WithJsonObjectBuilderBase<Retention.Builder>
implements ObjectBuilder<Retention>
Builder for
Retention.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aRetention.final Retention.BuilderexpireAfter(Time value) Required - Time period after which a snapshot is considered expired and eligible for deletion.final Retention.BuilderRequired - Time period after which a snapshot is considered expired and eligible for deletion.final Retention.BuildermaxCount(int value) Required - Maximum number of snapshots to retain, even if the snapshots have not yet expired.final Retention.BuilderminCount(int value) Required - Minimum number of snapshots to retain, even if the snapshots have expired.protected Retention.Builderself()Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
expireAfter
Required - Time period after which a snapshot is considered expired and eligible for deletion. SLM deletes expired snapshots based on the slm.retention_schedule.API name:
expire_after -
expireAfter
Required - Time period after which a snapshot is considered expired and eligible for deletion. SLM deletes expired snapshots based on the slm.retention_schedule.API name:
expire_after -
maxCount
Required - Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots.API name:
max_count -
minCount
Required - Minimum number of snapshots to retain, even if the snapshots have expired.API name:
min_count -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<Retention.Builder>
-
build
Builds aRetention.- Specified by:
buildin interfaceObjectBuilder<Retention>- Throws:
NullPointerException- if some of the required fields are null.
-