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 Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description PutLifecycleRequest
build()
Builds aPutLifecycleRequest
.PutLifecycleRequest.Builder
config(SlmConfiguration value)
Configuration for each snapshot created by the policy.PutLifecycleRequest.Builder
config(java.util.function.Function<SlmConfiguration.Builder,ObjectBuilder<SlmConfiguration>> fn)
Configuration for each snapshot created by the policy.PutLifecycleRequest.Builder
masterTimeout(Time value)
Period to wait for a connection to the master node.PutLifecycleRequest.Builder
masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Period to wait for a connection to the master node.PutLifecycleRequest.Builder
name(java.lang.String value)
Name automatically assigned to each snapshot created by the policy.PutLifecycleRequest.Builder
policyId(java.lang.String value)
Required - ID for the snapshot lifecycle policy you want to create or update.PutLifecycleRequest.Builder
repository(java.lang.String value)
Repository used to store snapshots created by this policy.PutLifecycleRequest.Builder
retention(Retention value)
Retention rules used to retain and delete snapshots created by the policy.PutLifecycleRequest.Builder
retention(java.util.function.Function<Retention.Builder,ObjectBuilder<Retention>> fn)
Retention rules used to retain and delete snapshots created by the policy.PutLifecycleRequest.Builder
schedule(java.lang.String value)
Periodic or absolute schedule at which the policy creates snapshots.PutLifecycleRequest.Builder
timeout(Time value)
Period to wait for a response.PutLifecycleRequest.Builder
timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Period to wait for a response.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
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
-
config
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
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
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
Required - ID for the snapshot lifecycle policy you want to create or update.API name:
policy_id
-
repository
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
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
Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately.API name:
schedule
-
timeout
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
Builds aPutLifecycleRequest
.- Specified by:
build
in interfaceObjectBuilder<PutLifecycleRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-