Class CreateSnapshotRequest.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
org.opensearch.client.opensearch.snapshot.CreateSnapshotRequest.Builder
- All Implemented Interfaces:
CopyableBuilder<CreateSnapshotRequest.Builder,,CreateSnapshotRequest> MutableBuilder<CreateSnapshotRequest.Builder,,CreateSnapshotRequest> ObjectBuilder<CreateSnapshotRequest>
- Enclosing class:
CreateSnapshotRequest
public static class CreateSnapshotRequest.Builder
extends RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
implements CopyableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest>
Builder for
CreateSnapshotRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aCreateSnapshotRequest.The amount of time to wait for a response from the cluster manager node.clusterManagerTimeout(Time value) The amount of time to wait for a response from the cluster manager node.copy()Create a new builderCopyableBuilderthat is a copy of this one.featureStates(String value, String... values) A list of feature states to include in the snapshot.featureStates(List<String> list) A list of feature states to include in the snapshot.ignoreUnavailable(Boolean value) Whentrue, the request ignores any data streams and indexes that are missing or closed.includeGlobalState(Boolean value) Whentrue, includes the current cluster state in the snapshot.API name:indicesAPI name:indicesDeprecated.masterTimeout(Time value) Deprecated.API name:metadataAPI name:metadataWhentrue, enables the restoration of a partial snapshot from indexes with unavailable shards.repository(String value) Required - The name of the repository where the snapshot will be stored.protected CreateSnapshotRequest.Builderself()Required - The name of the snapshot.waitForCompletion(Boolean value) Whentrue, the request returns a response when the snapshot is complete.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder
errorTrace, humanMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
-
clusterManagerTimeout
The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.API name:
cluster_manager_timeout -
clusterManagerTimeout
@Nonnull public final CreateSnapshotRequest.Builder clusterManagerTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.API name:
cluster_manager_timeout -
featureStates
A list of feature states to include in the snapshot. Each feature state includes one or more system indexes which contain related data. You can view a list of features using the Get Feature 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_statesAdds all elements of
listtofeatureStates. -
featureStates
A list of feature states to include in the snapshot. Each feature state includes one or more system indexes which contain related data. You can view a list of features using the Get Feature 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_statesAdds one or more values to
featureStates. -
includeGlobalState
Whentrue, includes the current cluster state in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. The cluster state also includes data stored in system indexes, such as watches and task records (configurable withfeature_states).API name:
include_global_state -
indices
API name:indicesAdds all elements of
listtoindices. -
indices
API name:indicesAdds one or more values to
indices. -
masterTimeout
Deprecated.Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout -
masterTimeout
@Deprecated @Nonnull public final CreateSnapshotRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Deprecated.Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout -
metadata
API name:metadataAdds all elements of
maptometadata. -
metadata
API name:metadataAdds an entry to
metadata. -
partial
Whentrue, enables the restoration of a partial snapshot from indexes with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. Whenfalse, the entire restore operation will fail if one or more indexes included in the snapshot do not have all primary shards available.API name:
partial -
repository
Required - The name of the repository where the snapshot will be stored.API name:
repository -
snapshot
Required - The name of the snapshot. Must be unique in the repository.API name:
snapshot -
waitForCompletion
Whentrue, the request returns a response when the snapshot is complete. Whenfalse, the request returns a response when the snapshot initializes.API name:
wait_for_completion -
build
Builds aCreateSnapshotRequest.- Specified by:
buildin interfaceObjectBuilder<CreateSnapshotRequest>- Throws:
NullPointerException- if some of the required fields are null.
-