Class Retention.Builder

java.lang.Object
co.elastic.clients.elasticsearch.slm.Retention.Builder
All Implemented Interfaces:
ObjectBuilder<Retention>
Enclosing class:
Retention

public static class Retention.Builder
extends java.lang.Object
implements ObjectBuilder<Retention>
Builder for Retention.
  • Constructor Summary

    Constructors
    Constructor Description
    Builder()  
  • Method Summary

    Modifier and Type Method Description
    Retention build()
    Builds a Retention.
    Retention.Builder expireAfter​(java.lang.String value)
    Required - Time period after which a snapshot is considered expired and eligible for deletion.
    Retention.Builder maxCount​(int value)
    Required - Maximum number of snapshots to retain, even if the snapshots have not yet expired.
    Retention.Builder minCount​(int value)
    Required - Minimum number of snapshots to retain, even if the snapshots have expired.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • expireAfter

      public Retention.Builder expireAfter​(java.lang.String value)
      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

      public Retention.Builder maxCount​(int value)
      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

      public Retention.Builder minCount​(int value)
      Required - Minimum number of snapshots to retain, even if the snapshots have expired.

      API name: min_count

    • build

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