Class PutComponentTemplateRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.cluster.PutComponentTemplateRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class PutComponentTemplateRequest extends RequestBase implements JsonpSerializable
Creates or updates a component template
See Also:
  • Field Details

  • Method Details

    • of

    • meta

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

      API name: _meta

    • allowAutoCreate

      @Nullable public final Boolean allowAutoCreate()
      This setting overrides the value of the action.auto_create_index cluster setting. If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. If set to false then data streams matching the template must always be explicitly created.

      API name: allow_auto_create

    • create

      @Nullable public final Boolean create()
      Whether the index template should only be added if new or can also replace an existing one

      API name: create

    • masterTimeout

      @Nullable public final Time masterTimeout()
      Specify timeout for connection to master

      API name: master_timeout

    • name

      public final String name()
      Required - The name of the template

      API name: name

    • template

      public final IndexState template()
      Required - The template to be applied which includes mappings, settings, or aliases configuration.

      API name: template

    • version

      @Nullable public final Long version()
      Version number used to manage component templates externally. This number isn't automatically generated or incremented 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)
    • setupPutComponentTemplateRequestDeserializer

      protected static void setupPutComponentTemplateRequestDeserializer(ObjectDeserializer<PutComponentTemplateRequest.Builder> op)