get-autoscaling-policy.asciidoc 1.9 KB

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