// 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.slm.putLifecycle({
  policy_id: "hourly-snapshots",
  schedule: "1h",
  name: "<hourly-snap-{now/d}>",
  repository: "my_repository",
  config: {
    indices: ["data-*", "important"],
  },
});
console.log(response);
----
