Class PutComponentTemplateRequest

java.lang.Object
org.elasticsearch.client.TimedRequest
org.elasticsearch.client.indices.PutComponentTemplateRequest
All Implemented Interfaces:
Validatable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class PutComponentTemplateRequest extends TimedRequest implements org.elasticsearch.xcontent.ToXContentObject
A request to create an component template.
  • Constructor Details

    • PutComponentTemplateRequest

      public PutComponentTemplateRequest()
  • Method Details

    • name

      public PutComponentTemplateRequest name(String name)
      Sets the name of the component template.
    • name

      public String name()
      The name of the component template.
    • create

      public PutComponentTemplateRequest create(boolean create)
      Set to true to force only creation, not an update of an component template. If it already exists, it will fail with an IllegalArgumentException.
    • create

      public boolean create()
    • componentTemplate

      public PutComponentTemplateRequest componentTemplate(org.elasticsearch.cluster.metadata.ComponentTemplate componentTemplate)
      The component template to create.
    • cause

      public PutComponentTemplateRequest cause(String cause)
      The cause for this component template creation.
    • cause

      public String cause()
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException