Class CreateSnapshotRequest.Builder

All Implemented Interfaces:
CopyableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest>, MutableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest>, ObjectBuilder<CreateSnapshotRequest>
Enclosing class:
CreateSnapshotRequest

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • copy

      @Nonnull public CreateSnapshotRequest.Builder copy()
      Description copied from interface: CopyableBuilder
      Create a new builder CopyableBuilder that is a copy of this one.
      Specified by:
      copy in interface CopyableBuilder<CreateSnapshotRequest.Builder,CreateSnapshotRequest>
      Returns:
      a new builder instance.
    • self

      @Nonnull protected CreateSnapshotRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
    • clusterManagerTimeout

      @Nonnull public final CreateSnapshotRequest.Builder clusterManagerTimeout(@Nullable Time value)
      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

      @Nonnull public final CreateSnapshotRequest.Builder featureStates(List<String> list)
      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

      Adds all elements of list to featureStates.

    • featureStates

      @Nonnull public final CreateSnapshotRequest.Builder featureStates(String value, String... values)
      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

      Adds one or more values to featureStates.

    • ignoreUnavailable

      @Nonnull public final CreateSnapshotRequest.Builder ignoreUnavailable(@Nullable Boolean value)
      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

      @Nonnull public final CreateSnapshotRequest.Builder includeGlobalState(@Nullable Boolean value)
      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 CreateSnapshotRequest.Builder indices(List<String> list)
      API name: indices

      Adds all elements of list to indices.

    • indices

      @Nonnull public final CreateSnapshotRequest.Builder indices(String value, String... values)
      API name: indices

      Adds one or more values to indices.

    • masterTimeout

      @Deprecated @Nonnull public final CreateSnapshotRequest.Builder masterTimeout(@Nullable Time value)
      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.
      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 CreateSnapshotRequest.Builder metadata(Map<String,JsonData> map)
      API name: metadata

      Adds all elements of map to metadata.

    • metadata

      @Nonnull public final CreateSnapshotRequest.Builder metadata(String key, JsonData value)
      API name: metadata

      Adds an entry to metadata.

    • partial

      @Nonnull public final CreateSnapshotRequest.Builder partial(@Nullable Boolean value)
      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 CreateSnapshotRequest.Builder repository(String value)
      Required - The name of the repository where the snapshot will be stored.

      API name: repository

    • snapshot

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

      API name: snapshot

    • waitForCompletion

      @Nonnull public final CreateSnapshotRequest.Builder waitForCompletion(@Nullable Boolean value)
      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

    • build

      @Nonnull public CreateSnapshotRequest build()
      Specified by:
      build in interface ObjectBuilder<CreateSnapshotRequest>
      Throws:
      NullPointerException - if some of the required fields are null.