Class CreateSnapshotRequest.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.snapshot.CreateSnapshotRequest.Builder
-
- All Implemented Interfaces:
ObjectBuilder<CreateSnapshotRequest>
- Enclosing class:
- CreateSnapshotRequest
public static class CreateSnapshotRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<CreateSnapshotRequest>
Builder forCreateSnapshotRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CreateSnapshotRequestbuild()Builds aCreateSnapshotRequest.CreateSnapshotRequest.BuilderclusterManagerTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Operation timeout for connection to cluster-manager node.CreateSnapshotRequest.BuilderclusterManagerTimeout(Time value)Operation timeout for connection to cluster-manager node.CreateSnapshotRequest.BuilderfeatureStates(java.lang.String value, java.lang.String... values)Feature states to include in the snapshot.CreateSnapshotRequest.BuilderfeatureStates(java.util.List<java.lang.String> list)Feature states to include in the snapshot.CreateSnapshotRequest.BuilderignoreUnavailable(java.lang.Boolean value)Iftrue, the request ignores data streams and indexes inindicesthat are missing or closed.CreateSnapshotRequest.BuilderincludeGlobalState(java.lang.Boolean value)Iftrue, the current cluster state is included in the snapshot.CreateSnapshotRequest.Builderindices(java.lang.String value, java.lang.String... values)API name:indicesCreateSnapshotRequest.Builderindices(java.util.List<java.lang.String> list)API name:indicesCreateSnapshotRequest.BuildermasterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Deprecated.CreateSnapshotRequest.BuildermasterTimeout(Time value)Deprecated.CreateSnapshotRequest.Buildermetadata(java.lang.String key, JsonData value)API name:metadataCreateSnapshotRequest.Buildermetadata(java.util.Map<java.lang.String,JsonData> map)API name:metadataCreateSnapshotRequest.Builderpartial(java.lang.Boolean value)Iftrue, allows restoring a partial snapshot of indexes with unavailable shards.CreateSnapshotRequest.Builderrepository(java.lang.String value)Required - Repository for the snapshot.CreateSnapshotRequest.Buildersnapshot(java.lang.String value)Required - Name of the snapshot.CreateSnapshotRequest.BuilderwaitForCompletion(java.lang.Boolean value)Iftrue, the request returns a response when the snapshot is complete.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
clusterManagerTimeout
@Nonnull public final CreateSnapshotRequest.Builder clusterManagerTimeout(@Nullable Time value)
Operation timeout for connection to cluster-manager node.API name:
cluster_manager_timeout
-
clusterManagerTimeout
@Nonnull public final CreateSnapshotRequest.Builder clusterManagerTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Operation timeout for connection to cluster-manager node.API name:
cluster_manager_timeout
-
featureStates
@Nonnull public final CreateSnapshotRequest.Builder featureStates(java.util.List<java.lang.String> list)
Feature states to include in the snapshot. Each feature state includes one or more system indexes containing related data. You can view a list of eligible features using the get features API. Ifinclude_global_stateistrue, all current feature states are included by default. Ifinclude_global_stateisfalse, no feature states are included by default.API name:
feature_statesAdds all elements of
listtofeatureStates.
-
featureStates
@Nonnull public final CreateSnapshotRequest.Builder featureStates(java.lang.String value, java.lang.String... values)
Feature states to include in the snapshot. Each feature state includes one or more system indexes containing related data. You can view a list of eligible features using the get features API. Ifinclude_global_stateistrue, all current feature states are included by default. Ifinclude_global_stateisfalse, no feature states are included by default.API name:
feature_statesAdds one or more values to
featureStates.
-
ignoreUnavailable
@Nonnull public final CreateSnapshotRequest.Builder ignoreUnavailable(@Nullable java.lang.Boolean value)
Iftrue, the request ignores data streams and indexes inindicesthat are missing or closed. Iffalse, the request returns an error for any data stream or index that is missing or closed.API name:
ignore_unavailable
-
includeGlobalState
@Nonnull public final CreateSnapshotRequest.Builder includeGlobalState(@Nullable java.lang.Boolean value)
Iftrue, 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 indexes, such as Watches and task records (configurable withfeature_states).API name:
include_global_state
-
indices
@Nonnull public final CreateSnapshotRequest.Builder indices(java.util.List<java.lang.String> list)
API name:indicesAdds all elements of
listtoindices.
-
indices
@Nonnull public final CreateSnapshotRequest.Builder indices(java.lang.String value, java.lang.String... values)
API name:indicesAdds 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 @Nonnull public final CreateSnapshotRequest.Builder masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
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(java.util.Map<java.lang.String,JsonData> map)
API name:metadataAdds all elements of
maptometadata.
-
metadata
@Nonnull public final CreateSnapshotRequest.Builder metadata(java.lang.String key, JsonData value)
API name:metadataAdds an entry to
metadata.
-
partial
@Nonnull public final CreateSnapshotRequest.Builder partial(@Nullable java.lang.Boolean value)
Iftrue, allows restoring a partial snapshot of indexes with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. Iffalse, 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(java.lang.String value)
Required - Repository for the snapshot.API name:
repository
-
snapshot
@Nonnull public final CreateSnapshotRequest.Builder snapshot(java.lang.String value)
Required - Name of the snapshot. Must be unique in the repository.API name:
snapshot
-
waitForCompletion
@Nonnull public final CreateSnapshotRequest.Builder waitForCompletion(@Nullable java.lang.Boolean value)
Iftrue, the request returns a response when the snapshot is complete. Iffalse, the request returns a response when the snapshot initializes.API name:
wait_for_completion
-
build
@Nonnull public CreateSnapshotRequest build()
Builds aCreateSnapshotRequest.- Specified by:
buildin interfaceObjectBuilder<CreateSnapshotRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-