POST /_index_template/_simulate
{
"index_patterns": ["my-index-*"],
"composed_of": ["ct2"],
"priority": 10,
"template": {
"settings": {
"index.number_of_replicas": 1
}
}
}
resp = client.indices.simulate_template(
index_patterns=[
"my-index-*"
],
composed_of=[
"ct2"
],
priority=10,
template={
"settings": {
"index.number_of_replicas": 1
}
},
)
const response = await client.indices.simulateTemplate({
index_patterns: ["my-index-*"],
composed_of: ["ct2"],
priority: 10,
template: {
settings: {
"index.number_of_replicas": 1,
},
},
});
response = client.indices.simulate_template(
body: {
"index_patterns": [
"my-index-*"
],
"composed_of": [
"ct2"
],
"priority": 10,
"template": {
"settings": {
"index.number_of_replicas": 1
}
}
}
)
$resp = $client->indices()->simulateTemplate([
"body" => [
"index_patterns" => array(
"my-index-*",
),
"composed_of" => array(
"ct2",
),
"priority" => 10,
"template" => [
"settings" => [
"index.number_of_replicas" => 1,
],
],
],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"index_patterns":["my-index-*"],"composed_of":["ct2"],"priority":10,"template":{"settings":{"index.number_of_replicas":1}}}' "$ELASTICSEARCH_URL/_index_template/_simulate"
client.indices().simulateTemplate(s -> s
.composedOf("ct2")
.indexPatterns("my-index-*")
.priority(10L)
.template(t -> t
.settings(se -> se
.otherSettings("index.number_of_replicas", JsonData.fromJson("1"))
)
)
);