// 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.ilm.putLifecycle({
  name: "rollover_policy",
  policy: {
    phases: {
      hot: {
        actions: {
          rollover: {
            max_size: "50gb",
          },
        },
      },
      delete: {
        min_age: "1d",
        actions: {
          delete: {},
        },
      },
    },
  },
});
console.log(response);
----
