Class PutTemplateRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutTemplateRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PutTemplateRequest
extends RequestBase
implements JsonpSerializable
Creates or updates an index template. Index templates define settings,
mappings, and aliases that can be applied automatically to new indices.
- 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<PutTemplateRequest>Json deserializer forPutTemplateRequeststatic final Endpoint<PutTemplateRequest,PutTemplateResponse, ErrorResponse> Endpoint "indices.put_template". -
Method Summary
Modifier and TypeMethodDescriptionaliases()Aliases for the index.final Booleancreate()If true, this request cannot replace or update existing index templates.final BooleanIftrue, returns settings in flat format.Array of wildcard expressions used to match the names of indices during creation.final TypeMappingmappings()Mapping for fields in the index.final TimePeriod to wait for a connection to the master node.final Stringname()Required - The name of the templatestatic PutTemplateRequestfinal Integerorder()Order in which Elasticsearch applies this template if index matches multiple templates.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) settings()Configuration options for the index.protected static voidfinal Timetimeout()Period to wait for a response.final Longversion()Version number used to manage index templates externally.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutTemplateRequest -
_ENDPOINT
Endpoint "indices.put_template".
-
-
Method Details
-
of
public static PutTemplateRequest of(Function<PutTemplateRequest.Builder, ObjectBuilder<PutTemplateRequest>> fn) -
aliases
Aliases for the index.API name:
aliases -
create
If true, this request cannot replace or update existing index templates.API name:
create -
flatSettings
Iftrue, returns settings in flat format.API name:
flat_settings -
indexPatterns
Array of wildcard expressions used to match the names of indices during creation.API name:
index_patterns -
mappings
Mapping for fields in the index.API name:
mappings -
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 - The name of the templateAPI name:
name -
order
Order in which Elasticsearch applies this template if index matches multiple templates.Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values.
API name:
order -
settings
Configuration options for the index.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 -
version
Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.API name:
version -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutTemplateRequestDeserializer
protected static void setupPutTemplateRequestDeserializer(ObjectDeserializer<PutTemplateRequest.Builder> op)
-