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