get-autoscaling-policy.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. [source,console]
  25. --------------------------------------------------
  26. GET /_autoscaling/policy/<name>
  27. --------------------------------------------------
  28. // TEST[s/<name>/my_autoscaling_policy/]
  29. [[autoscaling-get-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-get-autoscaling-policy-desc]]
  35. ==== {api-description-title}
  36. This API gets an autoscaling policy with the provided name.
  37. [[autoscaling-get-autoscaling-policy-examples]]
  38. ==== {api-examples-title}
  39. This example gets an autoscaling policy named `my_autosaling_policy`.
  40. [source,console]
  41. --------------------------------------------------
  42. GET /_autoscaling/policy/my_autoscaling_policy
  43. --------------------------------------------------
  44. // TEST
  45. The API returns the following result:
  46. [source,console-result]
  47. --------------------------------------------------
  48. {
  49. "policy": {
  50. "deciders": <deciders>
  51. }
  52. }
  53. --------------------------------------------------
  54. // TEST[s/<deciders>/$body.policy.deciders/]