slm-delete.asciidoc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [role="xpack"]
  2. [[slm-api-delete-policy]]
  3. === Delete snapshot lifecycle policy API
  4. ++++
  5. <titleabbrev>Delete policy</titleabbrev>
  6. ++++
  7. Deletes an existing snapshot lifecycle policy.
  8. [[slm-api-delete-lifecycle-request]]
  9. ==== {api-request-title}
  10. `DELETE /_slm/policy/<snapshot-lifecycle-policy-id>`
  11. [[slm-api-delete-lifecycle-prereqs]]
  12. ==== {api-prereq-title}
  13. If the {es} {security-features} are enabled, you must have the `manage_slm`
  14. cluster privilege to use this API. For more information, see
  15. <<security-privileges>>.
  16. [[slm-api-delete-lifecycle-desc]]
  17. ==== {api-description-title}
  18. Deletes the specified lifecycle policy definition.
  19. This prevents any future snapshots from being taken
  20. but does not cancel in-progress snapshots
  21. or remove previously-taken snapshots.
  22. [[slm-api-delete-lifecycle-path-params]]
  23. ==== {api-path-parms-title}
  24. `<policy-id>`::
  25. (Required, string)
  26. ID of the snapshot lifecycle policy to delete.
  27. [[slm-api-delete-lifecycle-example]]
  28. ==== {api-examples-title}
  29. ////
  30. [source,console]
  31. --------------------------------------------------
  32. PUT /_slm/policy/daily-snapshots
  33. {
  34. "schedule": "0 30 1 * * ?", <1>
  35. "name": "<daily-snap-{now/d}>", <2>
  36. "repository": "my_repository", <3>
  37. "config": { <4>
  38. "indices": ["data-*", "important"], <5>
  39. "ignore_unavailable": false,
  40. "include_global_state": false
  41. },
  42. "retention": { <6>
  43. "expire_after": "30d", <7>
  44. "min_count": 5, <8>
  45. "max_count": 50 <9>
  46. }
  47. }
  48. --------------------------------------------------
  49. // TEST[setup:setup-repository]
  50. ////
  51. [source,console]
  52. --------------------------------------------------
  53. DELETE /_slm/policy/daily-snapshots
  54. --------------------------------------------------
  55. // TEST[continued]