IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Wait for snapshot

edit

Phases allowed: delete.

Waits for the specified SLM policy to be executed before removing the index. This checks that an SLM policy has had a successful execution at some point after the wait action has started, and that the index is included in the snapshot.

Options

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

Example

edit
resp = client.ilm.put_lifecycle(
    name="my_policy",
    policy={
        "phases": {
            "delete": {
                "actions": {
                    "wait_for_snapshot": {
                        "policy": "slm-policy-name"
                    }
                }
            }
        }
    },
)
print(resp)
const response = await client.ilm.putLifecycle({
  name: "my_policy",
  policy: {
    phases: {
      delete: {
        actions: {
          wait_for_snapshot: {
            policy: "slm-policy-name",
          },
        },
      },
    },
  },
});
console.log(response);
PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "delete": {
        "actions": {
          "wait_for_snapshot" : {
            "policy": "slm-policy-name"
          }
        }
      }
    }
  }
}