Class PutLifecycleRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.slm.PutLifecycleRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PutLifecycleRequest
extends RequestBase
implements JsonpSerializable
Create or update a policy. Create or update a snapshot lifecycle policy. If
the policy already exists, this request increments the policy version. Only
the latest version of a policy is stored.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutLifecycleRequest>
Json deserializer forPutLifecycleRequest
static final Endpoint<PutLifecycleRequest,
PutLifecycleResponse, ErrorResponse> Endpoint "slm.put_lifecycle
". -
Method Summary
Modifier and TypeMethodDescriptionfinal SlmConfiguration
config()
Configuration for each snapshot created by the policy.final Time
The period to wait for a connection to the master node.final String
name()
Name automatically assigned to each snapshot created by the policy.static PutLifecycleRequest
final String
policyId()
Required - The identifier for the snapshot lifecycle policy you want to create or update.final String
Repository used to store snapshots created by this policy.final Retention
Retention rules used to retain and delete snapshots created by the policy.final String
schedule()
Periodic or absolute schedule at which the policy creates snapshots.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Time
timeout()
The period to wait for a response.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutLifecycleRequest
-
_ENDPOINT
Endpoint "slm.put_lifecycle
".
-
-
Method Details
-
of
public static PutLifecycleRequest of(Function<PutLifecycleRequest.Builder, ObjectBuilder<PutLifecycleRequest>> fn) -
config
Configuration for each snapshot created by the policy.API name:
config
-
masterTimeout
The 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. To indicate that the request should never timeout, set it to-1
.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 - The identifier 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
-
schedule
Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately.API name:
schedule
-
timeout
The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to-1
.API name:
timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutLifecycleRequestDeserializer
protected static void setupPutLifecycleRequestDeserializer(ObjectDeserializer<PutLifecycleRequest.Builder> op)
-