Class PutAliasRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutAliasRequest
- All Implemented Interfaces:
JsonpSerializable
Create or update an alias. Adds a data stream or index to an alias.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutAliasRequest>Json deserializer forPutAliasRequeststatic final Endpoint<PutAliasRequest,PutAliasResponse, ErrorResponse> Endpoint "indices.put_alias". -
Method Summary
Modifier and TypeMethodDescriptionfinal Queryfilter()Query used to limit documents the alias can access.index()Required - Comma-separated list of data streams or indices to add.final StringValue used to route indexing operations to a specific shard.final BooleanIftrue, sets the write index or data stream for the alias.final TimePeriod to wait for a connection to the master node.final Stringname()Required - Alias to update.static PutAliasRequestfinal Stringrouting()Value used to route indexing and search operations to a specific shard.final StringValue used to route search operations to a specific shard.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Timetimeout()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 theroutingvalue 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_indexisn’t set, the alias rejects write requests. If an index alias points to one index andis_write_indexisn’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 theroutingvalue 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:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutAliasRequestDeserializer
protected static void setupPutAliasRequestDeserializer(ObjectDeserializer<PutAliasRequest.Builder> op)
-