Class PutLifecycleRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.slm.PutLifecycleRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<PutLifecycleRequest>
- Enclosing class:
- PutLifecycleRequest
public static class PutLifecycleRequest.Builder extends java.lang.Object 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(Configuration value)
Configuration for each snapshot created by the policy.PutLifecycleRequest.Builder
config(java.util.function.Function<Configuration.Builder,ObjectBuilder<Configuration>> fn)
Configuration for each snapshot created by the policy.PutLifecycleRequest.Builder
masterTimeout(java.lang.String value)
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(java.lang.String value)
Period to wait for a response.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
-
policyId
Required - ID for the snapshot lifecycle policy you want to create or update.API name:
policy_id
-
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
-
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
-
config
Configuration for each snapshot created by the policy.API name:
config
-
config
public PutLifecycleRequest.Builder config(java.util.function.Function<Configuration.Builder,ObjectBuilder<Configuration>> fn)Configuration for each snapshot created by the policy.API name:
config
-
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
-
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 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
-
build
Builds aPutLifecycleRequest
.- Specified by:
build
in interfaceObjectBuilder<PutLifecycleRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-