// 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: "template_1",
  template: {
    settings: {
      number_of_shards: 1,
    },
  },
  _meta: {
    description: "set number of shards to one",
    serialization: {
      class: "MyComponentTemplate",
      id: 10,
    },
  },
});
console.log(response);
----
