delete-autoscaling-policy.asciidoc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. [role="xpack"]
  2. [[autoscaling-delete-autoscaling-policy]]
  3. === Delete autoscaling policy API
  4. ++++
  5. <titleabbrev>Delete autoscaling policy</titleabbrev>
  6. ++++
  7. NOTE: {cloud-only}
  8. Delete autoscaling policy.
  9. [[autoscaling-delete-autoscaling-policy-request]]
  10. ==== {api-request-title}
  11. //////////////////////////
  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. //////////////////////////
  25. [source,console]
  26. --------------------------------------------------
  27. DELETE /_autoscaling/policy/<name>
  28. --------------------------------------------------
  29. // TEST[s/<name>/my_autoscaling_policy/]
  30. [[autoscaling-delete-autoscaling-policy-prereqs]]
  31. ==== {api-prereq-title}
  32. * If the {es} {security-features} are enabled, you must have the
  33. `manage_autoscaling` <<privileges-list-cluster,cluster privilege>> to use this
  34. API.
  35. * If the <<operator-privileges,{operator-feature}>> is enabled, only operator
  36. users can use this API.
  37. [[autoscaling-delete-autoscaling-policy-desc]]
  38. ==== {api-description-title}
  39. This API deletes an autoscaling policy with the provided name.
  40. [[autoscaling-delete-autoscaling-policy-examples]]
  41. ==== {api-examples-title}
  42. This example deletes an autoscaling policy named `my_autoscaling_policy`.
  43. [source,console]
  44. --------------------------------------------------
  45. DELETE /_autoscaling/policy/my_autoscaling_policy
  46. --------------------------------------------------
  47. // TEST
  48. The API returns the following result:
  49. [source,console-result]
  50. --------------------------------------------------
  51. {
  52. "acknowledged": true
  53. }
  54. --------------------------------------------------
  55. This example deletes all autoscaling policies.
  56. [source,console]
  57. --------------------------------------------------
  58. DELETE /_autoscaling/policy/*
  59. --------------------------------------------------
  60. // TEST
  61. The API returns the following result:
  62. [source,console-result]
  63. --------------------------------------------------
  64. {
  65. "acknowledged": true
  66. }
  67. --------------------------------------------------