delete-autoscaling-policy.asciidoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. [role="xpack"]
  2. [testenv="enterprise"]
  3. [[autoscaling-delete-autoscaling-policy]]
  4. === Delete autoscaling policy API
  5. ++++
  6. <titleabbrev>Delete autoscaling policy</titleabbrev>
  7. ++++
  8. include::../autoscaling-designed-for-note.asciidoc[]
  9. Delete autoscaling policy.
  10. [[autoscaling-delete-autoscaling-policy-request]]
  11. ==== {api-request-title}
  12. [source,console]
  13. --------------------------------------------------
  14. PUT /_autoscaling/policy/my_autoscaling_policy
  15. {
  16. "roles": [],
  17. "deciders": {
  18. "fixed": {
  19. }
  20. }
  21. }
  22. --------------------------------------------------
  23. // TESTSETUP
  24. [source,console]
  25. --------------------------------------------------
  26. DELETE /_autoscaling/policy/<name>
  27. --------------------------------------------------
  28. // TEST[s/<name>/my_autoscaling_policy/]
  29. [[autoscaling-delete-autoscaling-policy-prereqs]]
  30. ==== {api-prereq-title}
  31. * If the {es} {security-features} are enabled, you must have
  32. `manage_autoscaling` cluster privileges. For more information, see
  33. <<security-privileges>>.
  34. [[autoscaling-delete-autoscaling-policy-desc]]
  35. ==== {api-description-title}
  36. This API deletes an autoscaling policy with the provided name.
  37. [[autoscaling-delete-autoscaling-policy-examples]]
  38. ==== {api-examples-title}
  39. This example deletes an autoscaling policy named `my_autosaling_policy`.
  40. [source,console]
  41. --------------------------------------------------
  42. DELETE /_autoscaling/policy/my_autoscaling_policy
  43. --------------------------------------------------
  44. // TEST
  45. The API returns the following result:
  46. [source,console-result]
  47. --------------------------------------------------
  48. {
  49. "acknowledged": true
  50. }
  51. --------------------------------------------------
  52. This example deletes all autoscaling policies.
  53. [source,console]
  54. --------------------------------------------------
  55. DELETE /_autoscaling/policy/*
  56. --------------------------------------------------
  57. // TEST
  58. The API returns the following result:
  59. [source,console-result]
  60. --------------------------------------------------
  61. {
  62. "acknowledged": true
  63. }
  64. --------------------------------------------------