get-autoscaling-policy.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [role="xpack"]
  2. [[autoscaling-get-autoscaling-policy]]
  3. === Get autoscaling policy API
  4. ++++
  5. <titleabbrev>Get autoscaling policy</titleabbrev>
  6. ++++
  7. NOTE: {cloud-only}
  8. Get autoscaling policy.
  9. [[autoscaling-get-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. [source,console]
  25. --------------------------------------------------
  26. DELETE /_autoscaling/policy/my_autoscaling_policy
  27. --------------------------------------------------
  28. // TEST
  29. // TEARDOWN
  30. //////////////////////////
  31. [source,console]
  32. --------------------------------------------------
  33. GET /_autoscaling/policy/<name>
  34. --------------------------------------------------
  35. // TEST[s/<name>/my_autoscaling_policy/]
  36. [[autoscaling-get-autoscaling-policy-prereqs]]
  37. ==== {api-prereq-title}
  38. * If the {es} {security-features} are enabled, you must have
  39. `manage_autoscaling` cluster privileges. For more information, see
  40. <<security-privileges>>.
  41. [[autoscaling-get-autoscaling-policy-desc]]
  42. ==== {api-description-title}
  43. This API gets an autoscaling policy with the provided name.
  44. [[autoscaling-get-autoscaling-policy-examples]]
  45. ==== {api-examples-title}
  46. This example gets an autoscaling policy named `my_autoscaling_policy`.
  47. [source,console]
  48. --------------------------------------------------
  49. GET /_autoscaling/policy/my_autoscaling_policy
  50. --------------------------------------------------
  51. // TEST
  52. The API returns the following result:
  53. [source,console-result]
  54. --------------------------------------------------
  55. {
  56. "roles": <roles>,
  57. "deciders": <deciders>
  58. }
  59. --------------------------------------------------
  60. // TEST[s/<roles>/$body.roles/]
  61. // TEST[s/<deciders>/$body.deciders/]