Class CreateSnapshotRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
co.elastic.clients.elasticsearch.snapshot.CreateSnapshotRequest.Builder
- All Implemented Interfaces:
WithJson<CreateSnapshotRequest.Builder>
,ObjectBuilder<CreateSnapshotRequest>
- Enclosing class:
- CreateSnapshotRequest
public static class CreateSnapshotRequest.Builder
extends RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
implements ObjectBuilder<CreateSnapshotRequest>
Builder for
CreateSnapshotRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aCreateSnapshotRequest
.featureStates
(String value, String... values) Feature states to include in the snapshot.featureStates
(List<String> list) Feature states to include in the snapshot.ignoreUnavailable
(Boolean value) Iftrue
, the request ignores data streams and indices inindices
that are missing or closed.includeGlobalState
(Boolean value) Iftrue
, the current cluster state is included in the snapshot.Data streams and indices to include in the snapshot.Data streams and indices to include in the snapshot.masterTimeout
(Time value) Period to wait for a connection to the master node.Period to wait for a connection to the master node.Optional metadata for the snapshot.Optional metadata for the snapshot.Iftrue
, allows restoring a partial snapshot of indices with unavailable shards.repository
(String value) Required - Repository for the snapshot.protected CreateSnapshotRequest.Builder
self()
Required - Name of the snapshot.waitForCompletion
(Boolean value) Iftrue
, the request returns a response when the snapshot is complete.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
Adds all elements of
list
tofeatureStates
. -
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
Adds one or more values to
featureStates
. -
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
Adds all elements of
list
toindices
. -
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
Adds one or more values to
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
-
masterTimeout
public final CreateSnapshotRequest.Builder masterTimeout(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
-
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
Adds all entries of
map
tometadata
. -
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
Adds an entry to
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
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
-
build
Builds aCreateSnapshotRequest
.- Specified by:
build
in interfaceObjectBuilder<CreateSnapshotRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-