28 lines
601 B
Plaintext
28 lines
601 B
Plaintext
// This file is autogenerated, DO NOT EDIT
|
|
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
|
|
|
[source, js]
|
|
----
|
|
const response = await client.cluster.putComponentTemplate({
|
|
name: "my-aliases",
|
|
template: {
|
|
aliases: {
|
|
"my-alias": {},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.indices.putIndexTemplate({
|
|
name: "my-index-template",
|
|
index_patterns: ["my-index-*"],
|
|
composed_of: ["my-aliases", "my-mappings", "my-settings"],
|
|
template: {
|
|
aliases: {
|
|
"yet-another-alias": {},
|
|
},
|
|
},
|
|
});
|
|
console.log(response1);
|
|
----
|