Class PutComponentTemplateRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
co.elastic.clients.elasticsearch.cluster.PutComponentTemplateRequest.Builder
- All Implemented Interfaces:
WithJson<PutComponentTemplateRequest.Builder>
,ObjectBuilder<PutComponentTemplateRequest>
- Enclosing class:
- PutComponentTemplateRequest
public static class PutComponentTemplateRequest.Builder
extends RequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
implements ObjectBuilder<PutComponentTemplateRequest>
Builder for
PutComponentTemplateRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowAutoCreate
(Boolean value) This setting overrides the value of theaction.auto_create_index
cluster setting.build()
Builds aPutComponentTemplateRequest
.Iftrue
, this request cannot replace or update existing component templates.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 component template.Optional user metadata about the component template.Required - Name of the component template to create.protected PutComponentTemplateRequest.Builder
self()
template
(IndexState value) Required - The template to be applied which includes mappings, settings, or aliases configuration.Required - The template to be applied which includes mappings, settings, or aliases configuration.Version number used to manage component 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 component template. May have any contents. This map is not automatically generated by Elasticsearch. This information is stored in the cluster state, so keeping it short is preferable. To unset_meta
, replace the template without specifying this information.API name:
_meta
Adds all entries of
map
tometa
. -
meta
Optional user metadata about the component template. May have any contents. This map is not automatically generated by Elasticsearch. This information is stored in the cluster state, so keeping it short is preferable. To unset_meta
, replace the template without specifying this information.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 data streams matching the template must always be explicitly created.API name:
allow_auto_create
-
create
Iftrue
, this request cannot replace or update existing component templates.API name:
create
-
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 PutComponentTemplateRequest.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 - Name of the component template to create. Elasticsearch includes the following built-in component templates:logs-mappings
; 'logs-settings;
metrics-mappings;
metrics-settings;
synthetics-mapping;
synthetics-settings. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the
versionfor your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, set
stack.templates.enabledto
false` using the cluster update settings API.API name:
name
-
template
Required - The template to be applied which includes mappings, settings, or aliases configuration.API name:
template
-
template
public final PutComponentTemplateRequest.Builder template(Function<IndexState.Builder, ObjectBuilder<IndexState>> fn) Required - The template to be applied which includes mappings, settings, or aliases configuration.API name:
template
-
version
Version number used to manage component templates externally. This number isn't automatically generated or incremented by Elasticsearch. To unset a version, replace the template without specifying a version.API name:
version
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
-
build
Builds aPutComponentTemplateRequest
.- Specified by:
build
in interfaceObjectBuilder<PutComponentTemplateRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-