Class RestoreSnapshotRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.snapshot.RestoreSnapshotRequest
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,ToCopyableBuilder<RestoreSnapshotRequest.Builder,RestoreSnapshotRequest>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public final class RestoreSnapshotRequest
extends RequestBase
implements PlainJsonSerializable, ToCopyableBuilder<RestoreSnapshotRequest.Builder,RestoreSnapshotRequest>
Restores a snapshot.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RestoreSnapshotRequest> Json deserializer forRestoreSnapshotRequeststatic final Endpoint<RestoreSnapshotRequest, RestoreSnapshotResponse, ErrorResponse> Endpoint "snapshot.restore". -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyQueryParameters(Map<String, String> params) builder()final TimeThe amount of time to wait for a response from the cluster manager node.booleaninthashCode()A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.final BooleanHow to handle data streams or indexes that are missing or closed.final BooleanHow to handle index aliases from the original snapshot.final BooleanWhether to restore the current cluster state.final IndexSettingsA comma-delimited list of settings to add or change in all restored indexes.indices()API name:indicesfinal TimeDeprecated.static RestoreSnapshotRequestfinal Booleanpartial()How the restore operation will behave if indexes in the snapshot do not have all primary shards available.final StringThe pattern to apply to the restored aliases.final StringThe rename replacement string for aliases.final StringThe pattern to apply to the restored data streams and indexes.final StringThe rename replacement string.final StringRequired - The name of the repository containing the snapshotvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Stringsnapshot()Required - The name of the snapshot to restore.final StringThe name of the remote store repository of the source index being restored.final StringWhere will be the authoritative store of the restored indexes' data.Create a new builderToCopyableBuilderthat is initialised with the current state of this object.final Boolean-| Whether to return a response after the restore operation has completed.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase
errorTrace, humanMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forRestoreSnapshotRequest -
_ENDPOINT
public static final Endpoint<RestoreSnapshotRequest,RestoreSnapshotResponse, _ENDPOINTErrorResponse> Endpoint "snapshot.restore".
-
-
Method Details
-
of
public static RestoreSnapshotRequest of(Function<RestoreSnapshotRequest.Builder, ObjectBuilder<RestoreSnapshotRequest>> fn) -
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 -
ignoreIndexSettings
A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.API name:
ignore_index_settings -
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 -
indices
API name:indices -
masterTimeout
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
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<RestoreSnapshotRequest.Builder,RestoreSnapshotRequest> - Returns:
- a new builder instance.
-
builder
-
setupRestoreSnapshotRequestDeserializer
protected static void setupRestoreSnapshotRequestDeserializer(ObjectDeserializer<RestoreSnapshotRequest.Builder> op) -
applyQueryParameters
- Overrides:
applyQueryParametersin classRequestBase
-
hashCode
public int hashCode() -
equals
-