Class PutAliasRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutAliasRequest
- All Implemented Interfaces:
JsonpSerializable
Adds a data stream or index to an alias.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutAliasRequest>
Json deserializer forPutAliasRequest
static final Endpoint<PutAliasRequest,
PutAliasResponse, ErrorResponse> Endpoint "indices.put_alias
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Query
filter()
Query used to limit documents the alias can access.index()
Required - Comma-separated list of data streams or indices to add.final String
Value used to route indexing operations to a specific shard.final Boolean
Iftrue
, sets the write index or data stream for the alias.final Time
Period to wait for a connection to the master node.final String
name()
Required - Alias to update.static PutAliasRequest
final String
routing()
Value used to route indexing and search operations to a specific shard.final String
Value used to route search operations to a specific shard.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Time
timeout()
Period to wait for a response.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutAliasRequest
-
_ENDPOINT
Endpoint "indices.put_alias
".
-
-
Method Details
-
of
public static PutAliasRequest of(Function<PutAliasRequest.Builder, ObjectBuilder<PutAliasRequest>> fn) -
filter
Query used to limit documents the alias can access.API name:
filter
-
index
Required - Comma-separated list of data streams or indices to add. Supports wildcards (*
). Wildcard patterns that match both data streams and indices return an error.API name:
index
-
indexRouting
Value used to route indexing operations to a specific shard. If specified, this overwrites therouting
value for indexing operations. Data stream aliases don’t support this parameter.API name:
index_routing
-
isWriteIndex
Iftrue
, sets the write index or data stream for the alias. If an alias points to multiple indices or data streams andis_write_index
isn’t set, the alias rejects write requests. If an index alias points to one index andis_write_index
isn’t set, the index automatically acts as the write index. Data stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.API name:
is_write_index
-
masterTimeout
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
-
name
Required - Alias to update. If the alias doesn’t exist, the request creates it. Index alias names support date math.API name:
name
-
routing
Value used to route indexing and search operations to a specific shard. Data stream aliases don’t support this parameter.API name:
routing
-
searchRouting
Value used to route search operations to a specific shard. If specified, this overwrites therouting
value for search operations. Data stream aliases don’t support this parameter.API name:
search_routing
-
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
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutAliasRequestDeserializer
protected static void setupPutAliasRequestDeserializer(ObjectDeserializer<PutAliasRequest.Builder> op)
-