Class CreateRequest.Builder

java.lang.Object
co.elastic.clients.elasticsearch.snapshot.CreateRequest.Builder
All Implemented Interfaces:
ObjectBuilder<CreateRequest>
Enclosing class:
CreateRequest

public static class CreateRequest.Builder
extends java.lang.Object
implements ObjectBuilder<CreateRequest>
Builder for CreateRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • repository

      public CreateRequest.Builder repository​(java.lang.String value)
      Required - Repository for the snapshot.

      API name: repository

    • snapshot

      public CreateRequest.Builder snapshot​(java.lang.String value)
      Required - Name of the snapshot. Must be unique in the repository.

      API name: snapshot

    • masterTimeout

      public CreateRequest.Builder masterTimeout​(@Nullable java.lang.String value)
      Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • waitForCompletion

      public CreateRequest.Builder waitForCompletion​(@Nullable java.lang.Boolean value)
      If true, the request returns a response when the snapshot is complete. If false, the request returns a response when the snapshot initializes.

      API name: wait_for_completion

    • ignoreUnavailable

      public CreateRequest.Builder ignoreUnavailable​(@Nullable java.lang.Boolean value)
      If true, the request ignores data streams and indices in indices that are missing or closed. If false, the request returns an error for any data stream or index that is missing or closed.

      API name: ignore_unavailable

    • includeGlobalState

      public CreateRequest.Builder includeGlobalState​(@Nullable java.lang.Boolean value)
      If true, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via feature_states).

      API name: include_global_state

    • indices

      public CreateRequest.Builder indices​(@Nullable java.util.List<java.lang.String> value)
      Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default.

      API name: indices

    • indices

      public CreateRequest.Builder indices​(java.lang.String... value)
      Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default.

      API name: indices

    • addIndices

      public CreateRequest.Builder addIndices​(java.lang.String value)
      Add a value to indices(List), creating the list if needed.
    • featureStates

      public CreateRequest.Builder featureStates​(@Nullable java.util.List<java.lang.String> value)
      Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features 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

    • featureStates

      public CreateRequest.Builder featureStates​(java.lang.String... value)
      Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features 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

    • addFeatureStates

      public CreateRequest.Builder addFeatureStates​(java.lang.String value)
      Add a value to featureStates(List), creating the list if needed.
    • metadata

      public CreateRequest.Builder metadata​(@Nullable java.util.Map<java.lang.String,​JsonData> value)
      Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch.

      API name: metadata

    • putMetadata

      public CreateRequest.Builder putMetadata​(java.lang.String key, JsonData value)
      Add a key/value to metadata(Map), creating the map if needed.
    • partial

      public CreateRequest.Builder partial​(@Nullable java.lang.Boolean value)
      If true, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.

      API name: partial

    • build

      public CreateRequest build()
      Builds a CreateRequest.
      Specified by:
      build in interface ObjectBuilder<CreateRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.