delete-autoscaling-policy.asciidoc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. //////////////////////////
  13. [source,console]
  14. --------------------------------------------------
  15. PUT /_autoscaling/policy/my_autoscaling_policy
  16. {
  17. "roles": [],
  18. "deciders": {
  19. "fixed": {
  20. }
  21. }
  22. }
  23. --------------------------------------------------
  24. // TESTSETUP
  25. //////////////////////////
  26. [source,console]
  27. --------------------------------------------------
  28. DELETE /_autoscaling/policy/<name>
  29. --------------------------------------------------
  30. // TEST[s/<name>/my_autoscaling_policy/]
  31. [[autoscaling-delete-autoscaling-policy-prereqs]]
  32. ==== {api-prereq-title}
  33. * If the {es} {security-features} are enabled, you must have the
  34. `manage_autoscaling` <<privileges-list-cluster,cluster privilege>> to use this
  35. API.
  36. * If the <<operator-privileges,{operator-feature}>> is enabled, only operator
  37. users can use this API.
  38. [[autoscaling-delete-autoscaling-policy-desc]]
  39. ==== {api-description-title}
  40. This API deletes an autoscaling policy with the provided name.
  41. [[autoscaling-delete-autoscaling-policy-examples]]
  42. ==== {api-examples-title}
  43. This example deletes an autoscaling policy named `my_autoscaling_policy`.
  44. [source,console]
  45. --------------------------------------------------
  46. DELETE /_autoscaling/policy/my_autoscaling_policy
  47. --------------------------------------------------
  48. // TEST
  49. The API returns the following result:
  50. [source,console-result]
  51. --------------------------------------------------
  52. {
  53. "acknowledged": true
  54. }
  55. --------------------------------------------------
  56. This example deletes all autoscaling policies.
  57. [source,console]
  58. --------------------------------------------------
  59. DELETE /_autoscaling/policy/*
  60. --------------------------------------------------
  61. // TEST
  62. The API returns the following result:
  63. [source,console-result]
  64. --------------------------------------------------
  65. {
  66. "acknowledged": true
  67. }
  68. --------------------------------------------------