Class CreateSnapshotRequest.Builder

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

public static class CreateSnapshotRequest.Builder extends RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder> implements ObjectBuilder<CreateSnapshotRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • expandWildcards

      public final CreateSnapshotRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Determines how wildcard patterns in the indices parameter match data streams and indices. It supports comma-separated values such as open,hidden.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      public final CreateSnapshotRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Determines how wildcard patterns in the indices parameter match data streams and indices. It supports comma-separated values such as open,hidden.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • featureStates

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

      Note that specifying an empty array will result in the default behavior. To exclude all feature states, regardless of the include_global_state value, specify an array with only the value none (["none"]).

      API name: feature_states

      Adds all elements of list to featureStates.

    • featureStates

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

      Note that specifying an empty array will result in the default behavior. To exclude all feature states, regardless of the include_global_state value, specify an array with only the value none (["none"]).

      API name: feature_states

      Adds one or more values to featureStates.

    • ignoreUnavailable

      public final CreateSnapshotRequest.Builder ignoreUnavailable(@Nullable 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 final CreateSnapshotRequest.Builder includeGlobalState(@Nullable 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 final CreateSnapshotRequest.Builder indices(List<String> list)
      A comma-separated list of data streams and indices to include in the snapshot. It supports a multi-target syntax. The default is an empty array ([]), which includes all regular data streams and regular indices. To exclude all data streams and indices, use -*.

      You can't use this parameter to include or exclude system indices or system data streams from a snapshot. Use feature_states instead.

      API name: indices

      Adds all elements of list to indices.

    • indices

      public final CreateSnapshotRequest.Builder indices(String value, String... values)
      A comma-separated list of data streams and indices to include in the snapshot. It supports a multi-target syntax. The default is an empty array ([]), which includes all regular data streams and regular indices. To exclude all data streams and indices, use -*.

      You can't use this parameter to include or exclude system indices or system data streams from a snapshot. Use feature_states instead.

      API name: indices

      Adds one or more values to indices.

    • masterTimeout

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

    • masterTimeout

      The 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

    • metadata

      public final CreateSnapshotRequest.Builder metadata(Map<String,JsonData> map)
      Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. It can have any contents but it must be less than 1024 bytes. This information is not automatically generated by Elasticsearch.

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final CreateSnapshotRequest.Builder metadata(String key, JsonData value)
      Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. It can have any contents but it must be less than 1024 bytes. This information is not automatically generated by Elasticsearch.

      API name: metadata

      Adds an entry to metadata.

    • partial

      public final CreateSnapshotRequest.Builder partial(@Nullable Boolean value)
      If true, it enables you to restore 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

    • repository

      public final CreateSnapshotRequest.Builder repository(String value)
      Required - The name of the repository for the snapshot.

      API name: repository

    • snapshot

      public final CreateSnapshotRequest.Builder snapshot(String value)
      Required - The name of the snapshot. It supportes date math. It must be unique in the repository.

      API name: snapshot

    • waitForCompletion

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

    • self

      Specified by:
      self in class RequestBase.AbstractBuilder<CreateSnapshotRequest.Builder>
    • build

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