Package org.opensearch.client.indices
Class PutComposableIndexTemplateRequest
java.lang.Object
org.opensearch.client.TimedRequest
org.opensearch.client.indices.PutComposableIndexTemplateRequest
- All Implemented Interfaces:
Validatable
,org.opensearch.common.xcontent.ToXContent
,org.opensearch.common.xcontent.ToXContentObject
public class PutComposableIndexTemplateRequest
extends TimedRequest
implements org.opensearch.common.xcontent.ToXContentObject
A request to create an index template.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from class org.opensearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT
Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
Fields inherited from interface org.opensearch.client.Validatable
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncause()
The cause for this index template creation.boolean
create()
create
(boolean create) Set totrue
to force only creation, not an update of an index template.indexTemplate
(org.opensearch.cluster.metadata.ComposableIndexTemplate indexTemplate) The index template to create.name()
The name of the index template.Sets the name of the index template.org.opensearch.common.xcontent.XContentBuilder
toXContent
(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) Methods inherited from class org.opensearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.common.xcontent.ToXContentObject
isFragment
Methods inherited from interface org.opensearch.client.Validatable
validate
-
Constructor Details
-
PutComposableIndexTemplateRequest
public PutComposableIndexTemplateRequest()
-
-
Method Details
-
name
Sets the name of the index template. -
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.opensearch.cluster.metadata.ComposableIndexTemplate indexTemplate) The index template to create. -
cause
The cause for this index template creation. -
cause
-
toXContent
public org.opensearch.common.xcontent.XContentBuilder toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.common.xcontent.ToXContent
- Throws:
IOException
-