Class PutComponentTemplateRequest.Builder

All Implemented Interfaces:
WithJson<PutComponentTemplateRequest.Builder>, ObjectBuilder<PutComponentTemplateRequest>
Enclosing class:
PutComponentTemplateRequest

public static class PutComponentTemplateRequest.Builder extends RequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder> implements ObjectBuilder<PutComponentTemplateRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • meta

      Optional user metadata about the component template. May have any contents. This map is not automatically generated by Elasticsearch. This information is stored in the cluster state, so keeping it short is preferable. To unset _meta, replace the template without specifying this information.

      API name: _meta

      Adds all entries of map to meta.

    • meta

      public final PutComponentTemplateRequest.Builder meta(String key, JsonData value)
      Optional user metadata about the component template. May have any contents. This map is not automatically generated by Elasticsearch. This information is stored in the cluster state, so keeping it short is preferable. To unset _meta, replace the template without specifying this information.

      API name: _meta

      Adds an entry to meta.

    • allowAutoCreate

      public final PutComponentTemplateRequest.Builder allowAutoCreate(@Nullable Boolean value)
      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

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

      API name: create

    • masterTimeout

      public final PutComponentTemplateRequest.Builder masterTimeout(@Nullable Time value)
      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

    • 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

      public final PutComponentTemplateRequest.Builder name(String value)
      Required - Name of the component template to create. Elasticsearch includes the following built-in component templates: logs-mappings; 'logs-settings; metrics-mappings; metrics-settings;synthetics-mapping; synthetics-settings. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the versionfor your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, setstack.templates.enabledtofalse` using the cluster update settings API.

      API name: name

    • template

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

      API name: template

    • template

      Required - The template to be applied which includes mappings, settings, or aliases configuration.

      API name: template

    • version

      public final PutComponentTemplateRequest.Builder version(@Nullable Long value)
      Version number used to manage component templates externally. This number isn't automatically generated or incremented by Elasticsearch. To unset a version, replace the template without specifying a version.

      API name: version

    • self

      Specified by:
      self in class RequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
    • build

      Specified by:
      build in interface ObjectBuilder<PutComponentTemplateRequest>
      Throws:
      NullPointerException - if some of the required fields are null.