Class CreateRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.snapshot.CreateRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<CreateRequest>
- Enclosing class:
- CreateRequest
public static class CreateRequest.Builder extends java.lang.Object implements ObjectBuilder<CreateRequest>
Builder for
CreateRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description CreateRequest.BuilderaddFeatureStates(java.lang.String value)Add a value tofeatureStates(List), creating the list if needed.CreateRequest.BuilderaddIndices(java.lang.String value)Add a value toindices(List), creating the list if needed.CreateRequestbuild()Builds aCreateRequest.CreateRequest.BuilderfeatureStates(java.lang.String... value)Feature states to include in the snapshot.CreateRequest.BuilderfeatureStates(java.util.List<java.lang.String> value)Feature states to include in the snapshot.CreateRequest.BuilderignoreUnavailable(java.lang.Boolean value)Iftrue, the request ignores data streams and indices inindicesthat are missing or closed.CreateRequest.BuilderincludeGlobalState(java.lang.Boolean value)Iftrue, the current cluster state is included in the snapshot.CreateRequest.Builderindices(java.lang.String... value)Data streams and indices to include in the snapshot.CreateRequest.Builderindices(java.util.List<java.lang.String> value)Data streams and indices to include in the snapshot.CreateRequest.BuildermasterTimeout(java.lang.String value)Period to wait for a connection to the master node.CreateRequest.Buildermetadata(java.util.Map<java.lang.String,JsonData> value)Optional metadata for the snapshot.CreateRequest.Builderpartial(java.lang.Boolean value)Iftrue, allows restoring a partial snapshot of indices with unavailable shards.CreateRequest.BuilderputMetadata(java.lang.String key, JsonData value)Add a key/value tometadata(Map), creating the map if needed.CreateRequest.Builderrepository(java.lang.String value)Required - Repository for the snapshot.CreateRequest.Buildersnapshot(java.lang.String value)Required - Name of the snapshot.CreateRequest.BuilderwaitForCompletion(java.lang.Boolean value)Iftrue, the request returns a response when the snapshot is complete.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
-
repository
Required - Repository for the snapshot.API name:
repository -
snapshot
Required - Name of the snapshot. Must be unique in the repository.API name:
snapshot -
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 -
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 -
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 -
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 -
addIndices
Add a value toindices(List), creating the list if needed. -
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_stateistrue, all current feature states are included by default. Ifinclude_global_stateisfalse, no feature states are included by default.API name:
feature_states -
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_stateistrue, all current feature states are included by default. Ifinclude_global_stateisfalse, no feature states are included by default.API name:
feature_states -
addFeatureStates
Add a value tofeatureStates(List), creating the list if needed. -
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 -
putMetadata
Add a key/value tometadata(Map), creating the map if needed. -
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 -
build
Builds aCreateRequest.- Specified by:
buildin interfaceObjectBuilder<CreateRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-