Query parameters
-
Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
-
User defined reason for dry-run creating the new template for simulation purposes
-
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.
Values are
-1
or0
. -
If true, returns all relevant default configurations for the index template.
Body
-
Name of the index template.
-
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.
-
Template to be applied. It may optionally include an
aliases
,mappings
, orsettings
configuration. -
Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.
-
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.
-
Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch.
-
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 a
data_stream
object. -
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.
-
A list of component template names that are allowed to be absent.
created_date
string | number Date and time when the index template was created. Only returned if the
human
query parameter istrue
.-
Time unit for milliseconds
modified_date
string | number Date and time when the index template was last modified. Only returned if the
human
query parameter istrue
.-
Time unit for milliseconds
POST /_index_template/_simulate_index/my-index-000001
resp = client.indices.simulate_index_template(
name="my-index-000001",
index_template=None,
)
const response = await client.indices.simulateIndexTemplate({
name: "my-index-000001",
index_template: null,
});
response = client.indices.simulate_index_template(
name: "my-index-000001"
)
$resp = $client->indices()->simulateIndexTemplate([
"name" => "my-index-000001",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_index_template/_simulate_index/my-index-000001"
client.indices().simulateIndexTemplate(s -> s
.name("my-index-000001")
);
{
"template" : {
"settings" : {
"index" : {
"number_of_shards" : "2",
"number_of_replicas" : "0",
"routing" : {
"allocation" : {
"include" : {
"_tier_preference" : "data_content"
}
}
}
}
},
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date"
}
}
},
"aliases" : { }
},
"overlapping" : [
{
"name" : "template_1",
"index_patterns" : [
"my-index-*"
]
}
]
}