Class CreateSnapshotRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.snapshot.CreateSnapshotRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class CreateSnapshotRequest
extends RequestBase
implements JsonpSerializable
Creates a snapshot in a repository.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<CreateSnapshotRequest>
Json deserializer forCreateSnapshotRequest
static final Endpoint<CreateSnapshotRequest,
CreateSnapshotResponse, ErrorResponse> Endpoint "snapshot.create
". -
Method Summary
Modifier and TypeMethodDescriptionFeature states to include in the snapshot.final Boolean
Iftrue
, the request ignores data streams and indices inindices
that are missing or closed.final Boolean
Iftrue
, the current cluster state is included in the snapshot.indices()
Data streams and indices to include in the snapshot.final Time
Period to wait for a connection to the master node.metadata()
Optional metadata for the snapshot.static CreateSnapshotRequest
final Boolean
partial()
Iftrue
, allows restoring a partial snapshot of indices with unavailable shards.final String
Required - Repository for the snapshot.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 String
snapshot()
Required - Name of the snapshot.final Boolean
Iftrue
, the request returns a response when the snapshot is complete.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forCreateSnapshotRequest
-
_ENDPOINT
Endpoint "snapshot.create
".
-
-
Method Details
-
of
public static CreateSnapshotRequest of(Function<CreateSnapshotRequest.Builder, ObjectBuilder<CreateSnapshotRequest>> fn) -
featureStates
Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. Ifinclude_global_state
istrue
, all current feature states are included by default. Ifinclude_global_state
isfalse
, no feature states are included by default.API name:
feature_states
-
includeGlobalState
Iftrue
, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable viafeature_states
).API name:
include_global_state
-
indices
Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default.API name:
indices
-
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
-
metadata
Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch.API name:
metadata
-
partial
Iftrue
, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. Iffalse
, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.API name:
partial
-
repository
Required - Repository for the snapshot.API name:
repository
-
snapshot
Required - Name of the snapshot. Must be unique in the repository.API name:
snapshot
-
waitForCompletion
Iftrue
, the request returns a response when the snapshot is complete. Iffalse
, the request returns a response when the snapshot initializes.API name:
wait_for_completion
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupCreateSnapshotRequestDeserializer
protected static void setupCreateSnapshotRequestDeserializer(ObjectDeserializer<CreateSnapshotRequest.Builder> op)
-