// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` 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);
----
