Class RestoreSnapshotRequest.Builder
- All Implemented Interfaces:
CopyableBuilder<RestoreSnapshotRequest.Builder,,RestoreSnapshotRequest> MutableBuilder<RestoreSnapshotRequest.Builder,,RestoreSnapshotRequest> ObjectBuilder<RestoreSnapshotRequest>
- Enclosing class:
RestoreSnapshotRequest
RestoreSnapshotRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aRestoreSnapshotRequest.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.ignoreIndexSettings(String value, String... values) A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.ignoreIndexSettings(List<String> list) A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.ignoreUnavailable(Boolean value) How to handle data streams or indexes that are missing or closed.includeAliases(Boolean value) How to handle index aliases from the original snapshot.includeGlobalState(Boolean value) Whether to restore the current cluster state.A comma-delimited list of settings to add or change in all restored indexes.indexSettings(IndexSettings value) A comma-delimited list of settings to add or change in all restored indexes.API name:indicesAPI name:indicesDeprecated.masterTimeout(Time value) Deprecated.How the restore operation will behave if indexes in the snapshot do not have all primary shards available.renameAliasPattern(String value) The pattern to apply to the restored aliases.renameAliasReplacement(String value) The rename replacement string for aliases.renamePattern(String value) The pattern to apply to the restored data streams and indexes.renameReplacement(String value) The rename replacement string.repository(String value) Required - The name of the repository containing the snapshotprotected RestoreSnapshotRequest.Builderself()Required - The name of the snapshot to restore.The name of the remote store repository of the source index being restored.storageType(String value) Where will be the authoritative store of the restored indexes' data.waitForCompletion(Boolean value) -| Whether to return a response after the restore operation has completed.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<RestoreSnapshotRequest.Builder,RestoreSnapshotRequest> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<RestoreSnapshotRequest.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 RestoreSnapshotRequest.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 -
ignoreIndexSettings
A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.API name:
ignore_index_settingsAdds all elements of
listtoignoreIndexSettings. -
ignoreIndexSettings
@Nonnull public final RestoreSnapshotRequest.Builder ignoreIndexSettings(String value, String... values) A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.API name:
ignore_index_settingsAdds one or more values to
ignoreIndexSettings. -
includeAliases
How to handle index aliases from the original snapshot. Whentrue, index aliases from the original snapshot are restored. Whenfalse, aliases along with associated indexes are not restored.API name:
include_aliases -
includeGlobalState
Whether to restore the current cluster state. Whenfalse, the cluster state is not restored. Whentrue, the current cluster state is restored.API name:
include_global_state -
indexSettings
A comma-delimited list of settings to add or change in all restored indexes. Use this parameter to override index settings during snapshot restoration. For data streams, these index settings are applied to the restored backing indexes.API name:
index_settings -
indexSettings
@Nonnull public final RestoreSnapshotRequest.Builder indexSettings(Function<IndexSettings.Builder, ObjectBuilder<IndexSettings>> fn) A comma-delimited list of settings to add or change in all restored indexes. Use this parameter to override index settings during snapshot restoration. For data streams, these index settings are applied to the restored backing indexes.API name:
index_settings -
indices
API name:indicesAdds all elements of
listtoindices. -
indices
API name:indicesAdds one or more values to
indices. -
masterTimeout
@Deprecated @Nonnull public final RestoreSnapshotRequest.Builder masterTimeout(@Nullable Time value) Deprecated.Explicit operation timeout for connection to cluster-manager nodeAPI name:
master_timeout -
masterTimeout
@Deprecated @Nonnull public final RestoreSnapshotRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Deprecated.Explicit operation timeout for connection to cluster-manager nodeAPI name:
master_timeout -
partial
How the restore operation will behave if indexes in the snapshot do not have all primary shards available. Whenfalse, the entire restore operation fails if any indexes in the snapshot do not have all primary shards available. Whentrue, allows the restoration of a partial snapshot of indexes with unavailable shards. Only shards that were successfully included in the snapshot are restored. All missing shards are recreated as empty. By default, the entire restore operation fails if one or more indexes included in the snapshot do not have all primary shards available. To change this behavior, setpartialtotrue.API name:
partial -
renameAliasPattern
The pattern to apply to the restored aliases. Aliases matching the rename pattern will be renamed according to therename_alias_replacementsetting. The rename pattern is applied as defined by the regular expression that supports referencing the original text. If two or more aliases are renamed into the same name, these aliases will be merged into one.API name:
rename_alias_pattern -
renameAliasReplacement
The rename replacement string for aliases.API name:
rename_alias_replacement -
renamePattern
The pattern to apply to the restored data streams and indexes. Data streams and indexes matching the rename pattern will be renamed according to therename_replacementsetting. The rename pattern is applied as defined by the regular expression that supports referencing the original text. The request fails if two or more data streams or indexes are renamed into the same name. If you rename a restored data stream, its backing indexes are also renamed. For example, if you rename the logs data stream torecovered-logs, the backing index.ds-logs-1is renamed to.ds-recovered-logs-1. If you rename a restored stream, ensure an index template matches the new stream name. If there are no matching index template names, the stream cannot roll over and new backing indexes are not created.API name:
rename_pattern -
renameReplacement
The rename replacement string.API name:
rename_replacement -
repository
Required - The name of the repository containing the snapshotAPI name:
repository -
snapshot
Required - The name of the snapshot to restore.API name:
snapshot -
sourceRemoteStoreRepository
@Nonnull public final RestoreSnapshotRequest.Builder sourceRemoteStoreRepository(@Nullable String value) The name of the remote store repository of the source index being restored. If not provided, the Snapshot Restore API will use the repository that was registered when the snapshot was created.API name:
source_remote_store_repository -
storageType
Where will be the authoritative store of the restored indexes' data. A value oflocalindicates that all snapshot metadata and index data will be downloaded to local storage. A value ofremote_snapshotindicates that snapshot metadata will be downloaded to the cluster, but the remote repository will remain the authoritative store of the index data. Data will be downloaded and cached as necessary to service queries. At least one node in the cluster must be configured with the search role in order to restore a snapshot using the typeremote_snapshot.API name:
storage_type -
waitForCompletion
-| Whether to return a response after the restore operation has completed. Whenfalse, the request returns a response when the restore operation initializes. Whentrue, the request returns a response when the restore operation completes.API name:
wait_for_completion -
build
Builds aRestoreSnapshotRequest.- Specified by:
buildin interfaceObjectBuilder<RestoreSnapshotRequest>- Throws:
NullPointerException- if some of the required fields are null.
-