Class PutIndexTemplateRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutIndexTemplateRequest.Builder>
co.elastic.clients.elasticsearch.indices.PutIndexTemplateRequest.Builder
- All Implemented Interfaces:
WithJson<PutIndexTemplateRequest.Builder>,ObjectBuilder<PutIndexTemplateRequest>
- Enclosing class:
- PutIndexTemplateRequest
public static class PutIndexTemplateRequest.Builder
extends RequestBase.AbstractBuilder<PutIndexTemplateRequest.Builder>
implements ObjectBuilder<PutIndexTemplateRequest>
Builder for
PutIndexTemplateRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aPutIndexTemplateRequest.composedOf(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.indexPatterns(String value, String... values) Name of the index template to create.indexPatterns(List<String> list) Name of the index template to create.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.Builderself()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
withJsonMethods 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. May have any contents. This map is not automatically generated by Elasticsearch.API name:
_metaAdds all entries of
maptometa. -
meta
Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch.API name:
_metaAdds an entry to
meta. -
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_ofAdds all elements of
listtocomposedOf. -
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_ofAdds 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_streamobject.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_streamobject.API name:
data_stream -
indexPatterns
Name of the index template to create.API name:
index_patternsAdds all elements of
listtoindexPatterns. -
indexPatterns
Name of the index template to create.API name:
index_patternsAdds one or more values to
indexPatterns. -
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, orsettingsconfiguration.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, orsettingsconfiguration.API name:
template -
version
Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.API name:
version -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutIndexTemplateRequest.Builder>
-
build
Builds aPutIndexTemplateRequest.- Specified by:
buildin interfaceObjectBuilder<PutIndexTemplateRequest>- Throws:
NullPointerException- if some of the required fields are null.
-