等待快照
编辑等待快照
编辑允许的阶段:删除。
在删除索引之前,等待指定的 SLM 策略执行完成。 这确保了已删除索引的快照可用。
选项
编辑-
policy
- (必需,字符串)删除操作应等待的 SLM 策略的名称。
示例
编辑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" } } } } } }