28 lines
571 B
Plaintext
28 lines
571 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.indices.putIndexTemplate({
|
|
name: "my-data-stream-template",
|
|
index_patterns: ["my-data-stream*"],
|
|
data_stream: {},
|
|
priority: 500,
|
|
template: {
|
|
mappings: {
|
|
properties: {
|
|
host: {
|
|
properties: {
|
|
ip: {
|
|
type: "ip",
|
|
ignore_malformed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
----
|