24 lines
541 B
Plaintext
24 lines
541 B
Plaintext
// 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: "nightly-snapshots",
|
|
schedule: "0 30 2 * * ?",
|
|
name: "<nightly-snap-{now/d}>",
|
|
repository: "my_repository",
|
|
config: {
|
|
indices: "*",
|
|
include_global_state: true,
|
|
feature_states: ["kibana", "security"],
|
|
},
|
|
retention: {
|
|
expire_after: "30d",
|
|
min_count: 5,
|
|
max_count: 50,
|
|
},
|
|
});
|
|
console.log(response);
|
|
----
|