Class PutIndexTemplateRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutIndexTemplateRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class PutIndexTemplateRequest 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:
  • Field Details

  • Method Details

    • of

    • meta

      public final Map<String,JsonData> meta()
      Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch.

      API name: _meta

    • composedOf

      public final List<String> composedOf()
      An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.

      API name: composed_of

    • create

      @Nullable public final Boolean create()
      If true, this request cannot replace or update existing index templates.

      API name: create

    • dataStream

      @Nullable public final DataStreamVisibility dataStream()
      If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with a data_stream object.

      API name: data_stream

    • indexPatterns

      public final List<String> indexPatterns()
      Name of the index template to create.

      API name: index_patterns

    • name

      public final String name()
      Required - Index or template name

      API name: name

    • priority

      @Nullable public final Integer priority()
      Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch.

      API name: priority

    • template

      @Nullable public final IndexTemplateMapping template()
      Template to be applied. It may optionally include an aliases, mappings, or settings configuration.

      API name: template

    • version

      @Nullable public final Long version()
      Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.

      API name: version

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupPutIndexTemplateRequestDeserializer

      protected static void setupPutIndexTemplateRequestDeserializer(ObjectDeserializer<PutIndexTemplateRequest.Builder> op)