Wait for snapshot

Wait for snapshot

Phases allowed: delete.

Waits for the specified SLM policy to be executed before removing the index. This ensures that a snapshot of the deleted index is available.

Options

policy

(Required, string) Name of the SLM policy that the delete action should wait for.

Example

  1. resp = client.ilm.put_lifecycle(
  2. name="my_policy",
  3. policy={
  4. "phases": {
  5. "delete": {
  6. "actions": {
  7. "wait_for_snapshot": {
  8. "policy": "slm-policy-name"
  9. }
  10. }
  11. }
  12. }
  13. },
  14. )
  15. print(resp)
  1. const response = await client.ilm.putLifecycle({
  2. name: "my_policy",
  3. policy: {
  4. phases: {
  5. delete: {
  6. actions: {
  7. wait_for_snapshot: {
  8. policy: "slm-policy-name",
  9. },
  10. },
  11. },
  12. },
  13. },
  14. });
  15. console.log(response);
  1. PUT _ilm/policy/my_policy
  2. {
  3. "policy": {
  4. "phases": {
  5. "delete": {
  6. "actions": {
  7. "wait_for_snapshot" : {
  8. "policy": "slm-policy-name"
  9. }
  10. }
  11. }
  12. }
  13. }
  14. }