// 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: "logs-foo",
  index_patterns: ["logs-foo-*"],
  data_stream: {},
  composed_of: ["logs-foo_component1", "logs-foo_component2"],
  ignore_missing_component_templates: ["logs-foo_component2"],
  priority: 500,
});
console.log(response);
----
