Files
elasticsearch-js/docs/doc_examples/e324ea1547635180c31c1adf77870ba2.asciidoc
2024-07-29 17:10:05 -05:00

42 lines
851 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: "destination_template",
template: {
settings: {
index: {
number_of_replicas: 2,
number_of_shards: 2,
mode: "time_series",
routing_path: ["metricset"],
},
},
mappings: {
properties: {
"@timestamp": {
type: "date",
},
metricset: {
type: "keyword",
time_series_dimension: true,
},
k8s: {
properties: {
tx: {
type: "long",
},
rx: {
type: "long",
},
},
},
},
},
},
});
console.log(response);
----