slm-delete.asciidoc 1.7 KB

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