slm-delete.asciidoc 1.7 KB

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