Package org.elasticsearch.client.indices
Class PutComposableIndexTemplateRequest
java.lang.Object
org.elasticsearch.client.TimedRequest
org.elasticsearch.client.indices.PutComposableIndexTemplateRequest
- All Implemented Interfaces:
Validatable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public class PutComposableIndexTemplateRequest extends TimedRequest implements org.elasticsearch.common.xcontent.ToXContentObject
A request to create an index template.
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.elasticsearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT
-
Constructor Summary
Constructors Constructor Description PutComposableIndexTemplateRequest()
-
Method Summary
Modifier and Type Method Description java.lang.String
cause()
PutComposableIndexTemplateRequest
cause(java.lang.String cause)
The cause for this index template creation.boolean
create()
PutComposableIndexTemplateRequest
create(boolean create)
Set totrue
to force only creation, not an update of an index template.PutComposableIndexTemplateRequest
indexTemplate(org.elasticsearch.cluster.metadata.ComposableIndexTemplate indexTemplate)
The index template to create.java.lang.String
name()
The name of the index template.PutComposableIndexTemplateRequest
name(java.lang.String name)
Sets the name of the index template.org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Methods inherited from class org.elasticsearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout
-
Constructor Details
-
PutComposableIndexTemplateRequest
public PutComposableIndexTemplateRequest()
-
-
Method Details
-
name
Sets the name of the index template. -
name
public java.lang.String name()The name of the index template. -
create
Set totrue
to force only creation, not an update of an index template. If it already exists, it will fail with anIllegalArgumentException
. -
create
public boolean create() -
indexTemplate
public PutComposableIndexTemplateRequest indexTemplate(org.elasticsearch.cluster.metadata.ComposableIndexTemplate indexTemplate)The index template to create. -
cause
The cause for this index template creation. -
cause
public java.lang.String cause() -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-