OpenSearch/docs/java-rest/high-level/indices/simulate_index_template.asciidoc
Andrei Dan a7968a1a5e
[7.x] HLRC: document index template v2 and component template APIs (#56136) (#56225)
This documents the index template v2 and component template APIs in the
high level rest client.

(cherry picked from commit 9bcf89b1e27613ab8887ce611ec2b0d1356cba8b)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
2020-05-05 19:51:54 +01:00

40 lines
1.4 KiB
Plaintext

--
:api: simulate-index-template
:request: SimulateIndexTemplateRequest
:response: SimulateIndexTemplateResponse
--
[id="{upid}-{api}"]
=== Simulate Index Template API
[id="{upid}-{api}-request"]
==== Simulate Index Template Request
A +{request}+ specifies the `indexName` to simulate matching against the
templates in the system.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> The name of the index
<2> Optionally, defines a new template
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Simulate Index Template Response
The returned +{response}+ includes a resolved `Template` object containing
the resolved settings, mappings and aliases of the index template that matched
and would be applied to the index with the provided name (if any). It will
also return a `Map` of index templates (both V1 and V2) names and their
corresponding index patterns:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> Resolved template configuration that would be applied when creating the index with the provided name
<2> Overlapping index templates and their corresponding index patterns