get-autoscaling-policy.asciidoc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. experimental[]
  9. Get autoscaling policy.
  10. [[autoscaling-get-autoscaling-policy-request]]
  11. ==== {api-request-title}
  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/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. "roles": <roles>,
  58. "deciders": <deciders>
  59. }
  60. --------------------------------------------------
  61. // TEST[s/<roles>/$body.roles/]
  62. // TEST[s/<deciders>/$body.deciders/]