Class PutLifecycleRequest.Builder

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

public static class PutLifecycleRequest.Builder
extends ObjectBuilderBase
implements ObjectBuilder<PutLifecycleRequest>
Builder for PutLifecycleRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • config

      public final PutLifecycleRequest.Builder config​(@Nullable SlmConfiguration value)
      Configuration for each snapshot created by the policy.

      API name: config

    • config

      public final PutLifecycleRequest.Builder config​(java.util.function.Function<SlmConfiguration.Builder,​ObjectBuilder<SlmConfiguration>> fn)
      Configuration for each snapshot created by the policy.

      API name: config

    • masterTimeout

      public final PutLifecycleRequest.Builder masterTimeout​(@Nullable Time value)
      Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • masterTimeout

      public final PutLifecycleRequest.Builder masterTimeout​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • name

      public final PutLifecycleRequest.Builder name​(@Nullable java.lang.String value)
      Name automatically assigned to each snapshot created by the policy. Date math is supported. To prevent conflicting snapshot names, a UUID is automatically appended to each snapshot name.

      API name: name

    • policyId

      public final PutLifecycleRequest.Builder policyId​(java.lang.String value)
      Required - ID for the snapshot lifecycle policy you want to create or update.

      API name: policy_id

    • repository

      public final PutLifecycleRequest.Builder repository​(@Nullable java.lang.String value)
      Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API.

      API name: repository

    • retention

      public final PutLifecycleRequest.Builder retention​(@Nullable Retention value)
      Retention rules used to retain and delete snapshots created by the policy.

      API name: retention

    • retention

      public final PutLifecycleRequest.Builder retention​(java.util.function.Function<Retention.Builder,​ObjectBuilder<Retention>> fn)
      Retention rules used to retain and delete snapshots created by the policy.

      API name: retention

    • schedule

      public final PutLifecycleRequest.Builder schedule​(@Nullable java.lang.String value)
      Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately.

      API name: schedule

    • timeout

      public final PutLifecycleRequest.Builder timeout​(@Nullable Time value)
      Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      API name: timeout

    • timeout

      public final PutLifecycleRequest.Builder timeout​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      API name: timeout

    • build

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