Class PutIndexTemplateRequest

java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<PutIndexTemplateRequest>
org.elasticsearch.client.indices.PutIndexTemplateRequest
All Implemented Interfaces:
org.elasticsearch.action.IndicesRequest, org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.core.RefCounted, org.elasticsearch.tasks.TaskAwareRequest, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class PutIndexTemplateRequest extends org.elasticsearch.action.support.master.MasterNodeRequest<PutIndexTemplateRequest> implements org.elasticsearch.action.IndicesRequest, org.elasticsearch.xcontent.ToXContentFragment
A request to create an index template.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest

    org.elasticsearch.transport.TransportRequest.Empty

    Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest

    org.elasticsearch.action.IndicesRequest.Replaceable

    Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    org.elasticsearch.common.io.stream.Writeable.Reader<V extends Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends Object>
  • Field Summary

    Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest

    DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new put index template request with the provided name.
  • Method Summary

    Modifier and Type
    Method
    Description
    alias(org.elasticsearch.action.admin.indices.alias.Alias alias)
    Adds an alias that will be added when the index gets created.
    Set<org.elasticsearch.action.admin.indices.alias.Alias>
     
    aliases(String source)
    Sets the aliases that will be associated with the index when it gets created
    aliases(Map<String,?> source)
    Sets the aliases that will be associated with the index when it gets created
    aliases(org.elasticsearch.common.bytes.BytesReference source)
    Sets the aliases that will be associated with the index when it gets created
    aliases(org.elasticsearch.xcontent.XContentBuilder source)
    Sets the aliases that will be associated with the index when it gets created
     
    cause(String cause)
    The cause for this index template creation.
    boolean
     
    create(boolean create)
    Set to true to force only creation, not an update of an index template.
     
    org.elasticsearch.action.support.IndicesOptions
     
    mapping(String source, org.elasticsearch.xcontent.XContentType xContentType)
    Adds mapping that will be added when the index gets created.
    Adds mapping that will be added when the index gets created.
    mapping(org.elasticsearch.common.bytes.BytesReference source, org.elasticsearch.xcontent.XContentType xContentType)
    Adds mapping that will be added when the index gets created.
    mapping(org.elasticsearch.xcontent.XContentBuilder source)
    Adds mapping that will be added when the index gets created.
    org.elasticsearch.common.bytes.BytesReference
     
    The name of the index template.
    name(String name)
    Sets the name of the index template.
    int
     
    order(int order)
     
     
    patterns(List<String> patterns)
     
    org.elasticsearch.common.settings.Settings
     
    settings(String source, org.elasticsearch.xcontent.XContentType xContentType)
    The settings to create the index template with (either json/yaml format).
    The settings to create the index template with (either json or yaml format).
    settings(org.elasticsearch.common.settings.Settings settings)
    The settings to create the index template with.
    settings(org.elasticsearch.common.settings.Settings.Builder settings)
    The settings to create the index template with.
    source(byte[] source, int offset, int length, org.elasticsearch.xcontent.XContentType xContentType)
    The template source definition.
    source(byte[] source, org.elasticsearch.xcontent.XContentType xContentType)
    The template source definition.
    source(String templateSource, org.elasticsearch.xcontent.XContentType xContentType)
    The template source definition.
    source(Map<String,Object> templateSource)
    The template source definition.
    source(org.elasticsearch.common.bytes.BytesReference source, org.elasticsearch.xcontent.XContentType xContentType)
    The template source definition.
    source(org.elasticsearch.xcontent.XContentBuilder templateBuilder)
    The template source definition.
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    org.elasticsearch.action.ActionRequestValidationException
     
     
    version(Integer version)
     

    Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest

    masterNodeTimeout, masterNodeTimeout, masterNodeTimeout, writeTo

    Methods inherited from class org.elasticsearch.action.ActionRequest

    getShouldStoreResult

    Methods inherited from class org.elasticsearch.transport.TransportRequest

    getParentTask, setParentTask, toString

    Methods inherited from class org.elasticsearch.transport.TransportMessage

    decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.action.IndicesRequest

    includeDataStreams

    Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest

    createTask, getDescription, setParentTask

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment

    isFragment
  • Constructor Details

    • PutIndexTemplateRequest

      public PutIndexTemplateRequest(String name)
      Constructs a new put index template request with the provided name.
  • Method Details

    • validate

      public org.elasticsearch.action.ActionRequestValidationException validate()
      Specified by:
      validate in class org.elasticsearch.action.ActionRequest
    • name

      public PutIndexTemplateRequest name(String name)
      Sets the name of the index template.
    • name

      public String name()
      The name of the index template.
    • patterns

      public PutIndexTemplateRequest patterns(List<String> patterns)
    • patterns

      public List<String> patterns()
    • order

      public PutIndexTemplateRequest order(int order)
    • order

      public int order()
    • version

      public PutIndexTemplateRequest version(Integer version)
    • version

      public Integer version()
    • create

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

      public boolean create()
    • settings

      public PutIndexTemplateRequest settings(org.elasticsearch.common.settings.Settings settings)
      The settings to create the index template with.
    • settings

      public PutIndexTemplateRequest settings(org.elasticsearch.common.settings.Settings.Builder settings)
      The settings to create the index template with.
    • settings

      public PutIndexTemplateRequest settings(String source, org.elasticsearch.xcontent.XContentType xContentType)
      The settings to create the index template with (either json/yaml format).
    • settings

      public PutIndexTemplateRequest settings(Map<String,Object> source)
      The settings to create the index template with (either json or yaml format).
    • settings

      public org.elasticsearch.common.settings.Settings settings()
    • mapping

      public PutIndexTemplateRequest mapping(String source, org.elasticsearch.xcontent.XContentType xContentType)
      Adds mapping that will be added when the index gets created.
      Parameters:
      source - The mapping source
      xContentType - The type of content contained within the source
    • cause

      public PutIndexTemplateRequest cause(String cause)
      The cause for this index template creation.
    • cause

      public String cause()
    • mapping

      public PutIndexTemplateRequest mapping(org.elasticsearch.xcontent.XContentBuilder source)
      Adds mapping that will be added when the index gets created.
      Parameters:
      source - The mapping source
    • mapping

      public PutIndexTemplateRequest mapping(org.elasticsearch.common.bytes.BytesReference source, org.elasticsearch.xcontent.XContentType xContentType)
      Adds mapping that will be added when the index gets created.
      Parameters:
      source - The mapping source
      xContentType - the source content type
    • mapping

      public PutIndexTemplateRequest mapping(Map<String,Object> source)
      Adds mapping that will be added when the index gets created.
      Parameters:
      source - The mapping source
    • mappings

      public org.elasticsearch.common.bytes.BytesReference mappings()
    • source

      public PutIndexTemplateRequest source(org.elasticsearch.xcontent.XContentBuilder templateBuilder)
      The template source definition.
    • source

      public PutIndexTemplateRequest source(Map<String,Object> templateSource)
      The template source definition.
    • source

      public PutIndexTemplateRequest source(String templateSource, org.elasticsearch.xcontent.XContentType xContentType)
      The template source definition.
    • source

      public PutIndexTemplateRequest source(byte[] source, org.elasticsearch.xcontent.XContentType xContentType)
      The template source definition.
    • source

      public PutIndexTemplateRequest source(byte[] source, int offset, int length, org.elasticsearch.xcontent.XContentType xContentType)
      The template source definition.
    • source

      public PutIndexTemplateRequest source(org.elasticsearch.common.bytes.BytesReference source, org.elasticsearch.xcontent.XContentType xContentType)
      The template source definition.
    • aliases

      public Set<org.elasticsearch.action.admin.indices.alias.Alias> aliases()
    • aliases

      public PutIndexTemplateRequest aliases(Map<String,?> source)
      Sets the aliases that will be associated with the index when it gets created
    • aliases

      public PutIndexTemplateRequest aliases(org.elasticsearch.xcontent.XContentBuilder source)
      Sets the aliases that will be associated with the index when it gets created
    • aliases

      public PutIndexTemplateRequest aliases(String source)
      Sets the aliases that will be associated with the index when it gets created
    • aliases

      public PutIndexTemplateRequest aliases(org.elasticsearch.common.bytes.BytesReference source)
      Sets the aliases that will be associated with the index when it gets created
    • alias

      public PutIndexTemplateRequest alias(org.elasticsearch.action.admin.indices.alias.Alias alias)
      Adds an alias that will be added when the index gets created.
      Parameters:
      alias - The metadata for the new alias
      Returns:
      the index template creation request
    • indices

      public String[] indices()
      Specified by:
      indices in interface org.elasticsearch.action.IndicesRequest
    • indicesOptions

      public org.elasticsearch.action.support.IndicesOptions indicesOptions()
      Specified by:
      indicesOptions in interface org.elasticsearch.action.IndicesRequest
    • 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