slm-delete.asciidoc 1.8 KB

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