Class PutLifecycleRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<PutLifecycleRequest.Builder>
co.elastic.clients.elasticsearch.slm.PutLifecycleRequest.Builder
- All Implemented Interfaces:
WithJson<PutLifecycleRequest.Builder>,ObjectBuilder<PutLifecycleRequest>
- Enclosing class:
- PutLifecycleRequest
public static class PutLifecycleRequest.Builder extends WithJsonObjectBuilderBase<PutLifecycleRequest.Builder> implements ObjectBuilder<PutLifecycleRequest>
Builder for
PutLifecycleRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description PutLifecycleRequestbuild()Builds aPutLifecycleRequest.PutLifecycleRequest.Builderconfig(SlmConfiguration value)Configuration for each snapshot created by the policy.PutLifecycleRequest.Builderconfig(java.util.function.Function<SlmConfiguration.Builder,ObjectBuilder<SlmConfiguration>> fn)Configuration for each snapshot created by the policy.PutLifecycleRequest.BuildermasterTimeout(Time value)Period to wait for a connection to the master node.PutLifecycleRequest.BuildermasterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Period to wait for a connection to the master node.PutLifecycleRequest.Buildername(java.lang.String value)Name automatically assigned to each snapshot created by the policy.PutLifecycleRequest.BuilderpolicyId(java.lang.String value)Required - ID for the snapshot lifecycle policy you want to create or update.PutLifecycleRequest.Builderrepository(java.lang.String value)Repository used to store snapshots created by this policy.PutLifecycleRequest.Builderretention(Retention value)Retention rules used to retain and delete snapshots created by the policy.PutLifecycleRequest.Builderretention(java.util.function.Function<Retention.Builder,ObjectBuilder<Retention>> fn)Retention rules used to retain and delete snapshots created by the policy.PutLifecycleRequest.Builderschedule(java.lang.String value)Periodic or absolute schedule at which the policy creates snapshots.protected PutLifecycleRequest.Builderself()PutLifecycleRequest.Buildertimeout(Time value)Period to wait for a response.PutLifecycleRequest.Buildertimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Period to wait for a response.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods 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 -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<PutLifecycleRequest.Builder>
-
build
Builds aPutLifecycleRequest.- Specified by:
buildin interfaceObjectBuilder<PutLifecycleRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-