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.
  • Field Details

  • Method Details

    • of

    • clusterManagerTimeout

      @Nullable public final Time 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

      @Nonnull public final List<String> ignoreIndexSettings()
      A comma-delimited list of index settings to ignore when restoring indexes from a snapshot.

      API name: ignore_index_settings

    • ignoreUnavailable

      @Nullable public final Boolean ignoreUnavailable()
      How to handle data streams or indexes that are missing or closed. When false, the request returns an error for any data stream or index that is missing or closed. When true, the request ignores data streams and indexes in indexes that are missing or closed.

      API name: ignore_unavailable

    • includeAliases

      @Nullable public final Boolean includeAliases()
      How to handle index aliases from the original snapshot. When true, index aliases from the original snapshot are restored. When false, aliases along with associated indexes are not restored.

      API name: include_aliases

    • includeGlobalState

      @Nullable public final Boolean includeGlobalState()
      Whether to restore the current cluster state. When false, the cluster state is not restored. When true, the current cluster state is restored.

      API name: include_global_state

    • indexSettings

      @Nullable public final IndexSettings 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

      @Nonnull public final List<String> indices()
      API name: indices
    • masterTimeout

      @Deprecated @Nullable public final Time masterTimeout()
      Deprecated.
      Explicit operation timeout for connection to cluster-manager node

      API name: master_timeout

    • partial

      @Nullable public final Boolean partial()
      How the restore operation will behave if indexes in the snapshot do not have all primary shards available. When false, the entire restore operation fails if any indexes in the snapshot do not have all primary shards available. When true, 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, set partial to true.

      API name: partial

    • renameAliasPattern

      @Nullable public final String renameAliasPattern()
      The pattern to apply to the restored aliases. Aliases matching the rename pattern will be renamed according to the rename_alias_replacement setting. 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

      @Nullable public final String renameAliasReplacement()
      The rename replacement string for aliases.

      API name: rename_alias_replacement

    • renamePattern

      @Nullable public final String 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 the rename_replacement setting. 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 to recovered-logs, the backing index .ds-logs-1 is 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

      @Nullable public final String renameReplacement()
      The rename replacement string.

      API name: rename_replacement

    • repository

      @Nonnull public final String repository()
      Required - The name of the repository containing the snapshot

      API name: repository

    • snapshot

      @Nonnull public final String snapshot()
      Required - The name of the snapshot to restore.

      API name: snapshot

    • sourceRemoteStoreRepository

      @Nullable public final String 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

      @Nullable public final String storageType()
      Where will be the authoritative store of the restored indexes' data. A value of local indicates that all snapshot metadata and index data will be downloaded to local storage. A value of remote_snapshot indicates 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 type remote_snapshot.

      API name: storage_type

    • waitForCompletion

      @Nullable public final Boolean waitForCompletion()
      -| Whether to return a response after the restore operation has completed. When false, the request returns a response when the restore operation initializes. When true, the request returns a response when the restore operation completes.

      API name: wait_for_completion

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public RestoreSnapshotRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<RestoreSnapshotRequest.Builder,RestoreSnapshotRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static RestoreSnapshotRequest.Builder builder()
    • setupRestoreSnapshotRequestDeserializer

      protected static void setupRestoreSnapshotRequestDeserializer(ObjectDeserializer<RestoreSnapshotRequest.Builder> op)
    • applyQueryParameters

      protected void applyQueryParameters(@Nonnull Map<String,String> params)
      Overrides:
      applyQueryParameters in class RequestBase
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object