Class CreateSnapshotRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.snapshot.CreateSnapshotRequest
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public final class CreateSnapshotRequest extends RequestBase implements PlainJsonSerializable, ToCopyableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest>
Creates a snapshot within an existing repository.
  • 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

    • featureStates

      @Nonnull public final List<String> 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.
      If include_global_state is true, all current feature states are included by default. If include_global_state is false, no feature states are included by default.

      API name: feature_states

    • ignoreUnavailable

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

      API name: ignore_unavailable

    • includeGlobalState

      @Nullable public final Boolean includeGlobalState()
      When true, 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 with feature_states).

      API name: include_global_state

    • indices

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

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

    • metadata

      @Nonnull public final Map<String,JsonData> metadata()
      API name: metadata
    • partial

      @Nullable public final Boolean partial()
      When true, 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. When false, 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

      @Nonnull public final String repository()
      Required - The name of the repository where the snapshot will be stored.

      API name: repository

    • snapshot

      @Nonnull public final String snapshot()
      Required - The name of the snapshot. Must be unique in the repository.

      API name: snapshot

    • waitForCompletion

      @Nullable public final Boolean waitForCompletion()
      When true, the request returns a response when the snapshot is complete. When false, the request returns a response when the snapshot initializes.

      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 CreateSnapshotRequest.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<CreateSnapshotRequest.Builder,CreateSnapshotRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static CreateSnapshotRequest.Builder builder()
    • setupCreateSnapshotRequestDeserializer

      protected static void setupCreateSnapshotRequestDeserializer(ObjectDeserializer<CreateSnapshotRequest.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