Class IndexTemplate.Builder
- All Implemented Interfaces:
WithJson<IndexTemplate.Builder>,ObjectBuilder<IndexTemplate>
- Enclosing class:
- IndexTemplate
IndexTemplate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IndexTemplate.BuilderallowAutoCreate(Boolean value) API name:allow_auto_createbuild()Builds aIndexTemplate.final IndexTemplate.BuildercomposedOf(String value, String... values) Required - An ordered list of component template names.final IndexTemplate.BuildercomposedOf(List<String> list) Required - An ordered list of component template names.final IndexTemplate.BuildercreatedDate(DateTime value) Date and time when the index template was created.final IndexTemplate.BuildercreatedDateMillis(Long value) Date and time when the index template was created, in milliseconds since the epoch.final IndexTemplate.BuilderIf this object is included, the template is used to create data streams and their backing indices.final IndexTemplate.BuilderdataStream(Function<IndexTemplateDataStreamConfiguration.Builder, ObjectBuilder<IndexTemplateDataStreamConfiguration>> fn) If this object is included, the template is used to create data streams and their backing indices.final IndexTemplate.Builderdeprecated(Boolean value) Marks this index template as deprecated.final IndexTemplate.BuilderignoreMissingComponentTemplates(String value, String... values) A list of component template names that are allowed to be absent.final IndexTemplate.BuilderA list of component template names that are allowed to be absent.final IndexTemplate.BuilderindexPatterns(String value, String... values) Required - Name of the index template.final IndexTemplate.BuilderindexPatterns(List<String> list) Required - Name of the index template.final IndexTemplate.BuilderOptional user metadata about the index template.final IndexTemplate.BuilderOptional user metadata about the index template.final IndexTemplate.BuildermodifiedDate(DateTime value) Date and time when the index template was last modified.final IndexTemplate.BuildermodifiedDateMillis(Long value) Date and time when the index template was last modified, in milliseconds since the epoch.final IndexTemplate.BuilderPriority to determine index template precedence when a new data stream or index is created.protected IndexTemplate.Builderself()final IndexTemplate.Buildertemplate(IndexTemplateSummary value) Template to be applied.final IndexTemplate.BuilderTemplate to be applied.final IndexTemplate.BuilderVersion 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
-
indexPatterns
Required - Name of the index template.API name:
index_patternsAdds all elements of
listtoindexPatterns. -
indexPatterns
Required - Name of the index template.API name:
index_patternsAdds one or more values to
indexPatterns. -
composedOf
Required - 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
Required - 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. -
template
Template to be applied. It may optionally include analiases,mappings, orsettingsconfiguration.API name:
template -
template
public final IndexTemplate.Builder template(Function<IndexTemplateSummary.Builder, ObjectBuilder<IndexTemplateSummary>> 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 -
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 -
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. -
allowAutoCreate
API name:allow_auto_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 IndexTemplate.Builder dataStream(Function<IndexTemplateDataStreamConfiguration.Builder, ObjectBuilder<IndexTemplateDataStreamConfiguration>> 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 -
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
A list of component template names that are allowed to be absent.API name:
ignore_missing_component_templatesAdds all elements of
listtoignoreMissingComponentTemplates. -
ignoreMissingComponentTemplates
A list of component template names that are allowed to be absent.API name:
ignore_missing_component_templatesAdds one or more values to
ignoreMissingComponentTemplates. -
createdDate
Date and time when the index template was created. Only returned if thehumanquery parameter istrue.API name:
created_date -
createdDateMillis
Date and time when the index template was created, in milliseconds since the epoch.API name:
created_date_millis -
modifiedDate
Date and time when the index template was last modified. Only returned if thehumanquery parameter istrue.API name:
modified_date -
modifiedDateMillis
Date and time when the index template was last modified, in milliseconds since the epoch.API name:
modified_date_millis -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<IndexTemplate.Builder>
-
build
Builds aIndexTemplate.- Specified by:
buildin interfaceObjectBuilder<IndexTemplate>- Throws:
NullPointerException- if some of the required fields are null.
-