delete-autoscaling-policy.asciidoc 2.0 KB

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