Class PutIndexTemplateRequest.Builder
- All Implemented Interfaces:
WithJson<PutIndexTemplateRequest.Builder>
,ObjectBuilder<PutIndexTemplateRequest>
- Enclosing class:
- PutIndexTemplateRequest
PutIndexTemplateRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowAutoCreate
(Boolean value) This setting overrides the value of theaction.auto_create_index
cluster setting.build()
Builds aPutIndexTemplateRequest
.User defined reason for creating/updating the index templatecomposedOf
(String value, String... values) An ordered list of component template names.composedOf
(List<String> list) An ordered list of component template names.Iftrue
, this request cannot replace or update existing index templates.dataStream
(DataStreamVisibility value) If this object is included, the template is used to create data streams and their backing indices.If this object is included, the template is used to create data streams and their backing indices.deprecated
(Boolean value) Marks this index template as deprecated.ignoreMissingComponentTemplates
(String value, String... values) The configuration option ignore_missing_component_templates can be used when an index template references a component template that might not existThe configuration option ignore_missing_component_templates can be used when an index template references a component template that might not existindexPatterns
(String value, String... values) Name of the index template to create.indexPatterns
(List<String> list) Name of the index template to create.masterTimeout
(Time value) Period to wait for a connection to the master node.Period to wait for a connection to the master node.Optional user metadata about the index template.Optional user metadata about the index template.Required - Index or template namePriority to determine index template precedence when a new data stream or index is created.protected PutIndexTemplateRequest.Builder
self()
template
(IndexTemplateMapping value) Template to be applied.Template to be applied.Version number used to manage index templates externally.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
meta
Optional user metadata about the index template. It may have any contents. It is not automatically generated or used by Elasticsearch. This user-defined object is stored in the cluster state, so keeping it short is preferable To unset the metadata, replace the template without specifying it.API name:
_meta
Adds all entries of
map
tometa
. -
meta
Optional user metadata about the index template. It may have any contents. It is not automatically generated or used by Elasticsearch. This user-defined object is stored in the cluster state, so keeping it short is preferable To unset the metadata, replace the template without specifying it.API name:
_meta
Adds an entry to
meta
. -
allowAutoCreate
This setting overrides the value of theaction.auto_create_index
cluster setting. If set totrue
in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled viaactions.auto_create_index
. If set tofalse
, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.API name:
allow_auto_create
-
cause
User defined reason for creating/updating the index templateAPI name:
cause
-
composedOf
An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.API name:
composed_of
Adds all elements of
list
tocomposedOf
. -
composedOf
An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.API name:
composed_of
Adds one or more values to
composedOf
. -
create
Iftrue
, this request cannot replace or update existing index templates.API name:
create
-
dataStream
If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with adata_stream
object.API name:
data_stream
-
dataStream
public final PutIndexTemplateRequest.Builder dataStream(Function<DataStreamVisibility.Builder, ObjectBuilder<DataStreamVisibility>> fn) If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with adata_stream
object.API name:
data_stream
-
deprecated
Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning.API name:
deprecated
-
ignoreMissingComponentTemplates
The configuration option ignore_missing_component_templates can be used when an index template references a component template that might not existAPI name:
ignore_missing_component_templates
Adds all elements of
list
toignoreMissingComponentTemplates
. -
ignoreMissingComponentTemplates
public final PutIndexTemplateRequest.Builder ignoreMissingComponentTemplates(String value, String... values) The configuration option ignore_missing_component_templates can be used when an index template references a component template that might not existAPI name:
ignore_missing_component_templates
Adds one or more values to
ignoreMissingComponentTemplates
. -
indexPatterns
Name of the index template to create.API name:
index_patterns
Adds all elements of
list
toindexPatterns
. -
indexPatterns
Name of the index template to create.API name:
index_patterns
Adds one or more values to
indexPatterns
. -
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
-
masterTimeout
public final PutIndexTemplateRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) 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
Required - Index or template nameAPI name:
name
-
priority
Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch.API name:
priority
-
template
Template to be applied. It may optionally include analiases
,mappings
, orsettings
configuration.API name:
template
-
template
public final PutIndexTemplateRequest.Builder template(Function<IndexTemplateMapping.Builder, ObjectBuilder<IndexTemplateMapping>> fn) Template to be applied. It may optionally include analiases
,mappings
, orsettings
configuration.API name:
template
-
version
Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch. External systems can use these version numbers to simplify template management. To unset a version, replace the template without specifying one.API name:
version
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutIndexTemplateRequest.Builder>
-
build
Builds aPutIndexTemplateRequest
.- Specified by:
build
in interfaceObjectBuilder<PutIndexTemplateRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-