Class CreateIndexRequest.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder<CreateIndexRequest.Builder>
org.opensearch.client.opensearch.indices.CreateIndexRequest.Builder
- All Implemented Interfaces:
CopyableBuilder<CreateIndexRequest.Builder,,CreateIndexRequest> MutableBuilder<CreateIndexRequest.Builder,,CreateIndexRequest> ObjectBuilder<CreateIndexRequest>
- Enclosing class:
CreateIndexRequest
public static class CreateIndexRequest.Builder
extends RequestBase.AbstractBuilder<CreateIndexRequest.Builder>
implements CopyableBuilder<CreateIndexRequest.Builder,CreateIndexRequest>
Builder for
CreateIndexRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaliases(String key, Function<Alias.Builder, ObjectBuilder<Alias>> fn) Aliases for the index.Aliases for the index.Aliases for the index.build()Builds aCreateIndexRequest.Operation timeout for connection to cluster-manager node.clusterManagerTimeout(Time value) Operation timeout for connection to cluster-manager node.copy()Create a new builderCopyableBuilderthat is a copy of this one.Required - Name of the index you wish to create.API name:mappingsmappings(TypeMapping value) API name:mappingsDeprecated.masterTimeout(Time value) Deprecated.protected CreateIndexRequest.Builderself()API name:settingssettings(IndexSettings value) API name:settingsPeriod to wait for a response.Period to wait for a response.The number of shard copies that must be active before proceeding with the operation.The number of shard copies that must be active before proceeding with the operation.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder
errorTrace, humanMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<CreateIndexRequest.Builder,CreateIndexRequest> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<CreateIndexRequest.Builder>
-
aliases
Aliases for the index.API name:
aliasesAdds all elements of
maptoaliases. -
aliases
Aliases for the index.API name:
aliasesAdds an entry to
aliases. -
aliases
@Nonnull public final CreateIndexRequest.Builder aliases(String key, Function<Alias.Builder, ObjectBuilder<Alias>> fn) Aliases for the index.API name:
aliasesAdds a value to
aliasesusing a builder lambda. -
clusterManagerTimeout
Operation timeout for connection to cluster-manager node.API name:
cluster_manager_timeout -
clusterManagerTimeout
@Nonnull public final CreateIndexRequest.Builder clusterManagerTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Operation timeout for connection to cluster-manager node.API name:
cluster_manager_timeout -
index
Required - Name of the index you wish to create.API name:
index -
mappings
API name:mappings -
mappings
@Nonnull public final CreateIndexRequest.Builder mappings(Function<TypeMapping.Builder, ObjectBuilder<TypeMapping>> fn) API name:mappings -
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 -
masterTimeout
@Deprecated @Nonnull public final CreateIndexRequest.Builder masterTimeout(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 -
settings
API name:settings -
settings
@Nonnull public final CreateIndexRequest.Builder settings(Function<IndexSettings.Builder, ObjectBuilder<IndexSettings>> fn) API name:settings -
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
timeout
@Nonnull public final CreateIndexRequest.Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
waitForActiveShards
@Nonnull public final CreateIndexRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards value) The number of shard copies that must be active before proceeding with the operation. Set toallor any positive integer up to the total number of shards in the index (number_of_replicas+1).API name:
wait_for_active_shards -
waitForActiveShards
@Nonnull public final CreateIndexRequest.Builder waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) The number of shard copies that must be active before proceeding with the operation. Set toallor any positive integer up to the total number of shards in the index (number_of_replicas+1).API name:
wait_for_active_shards -
build
Builds aCreateIndexRequest.- Specified by:
buildin interfaceObjectBuilder<CreateIndexRequest>- Throws:
NullPointerException- if some of the required fields are null.
-