get-autoscaling-policy.asciidoc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. .New API reference
  9. [sidebar]
  10. --
  11. For the most up-to-date API details, refer to {api-es}/group/endpoint-autoscaling[Autoscaling APIs].
  12. --
  13. Get {cloud}/ec-autoscaling.html[autoscaling] policy.
  14. [[autoscaling-get-autoscaling-policy-request]]
  15. ==== {api-request-title}
  16. //////////////////////////
  17. [source,console]
  18. --------------------------------------------------
  19. PUT /_autoscaling/policy/my_autoscaling_policy
  20. {
  21. "roles" : [],
  22. "deciders": {
  23. "fixed": {
  24. }
  25. }
  26. }
  27. --------------------------------------------------
  28. // TESTSETUP
  29. [source,console]
  30. --------------------------------------------------
  31. DELETE /_autoscaling/policy/my_autoscaling_policy
  32. --------------------------------------------------
  33. // TEST
  34. // TEARDOWN
  35. //////////////////////////
  36. [source,console]
  37. --------------------------------------------------
  38. GET /_autoscaling/policy/<name>
  39. --------------------------------------------------
  40. // TEST[s/<name>/my_autoscaling_policy/]
  41. [[autoscaling-get-autoscaling-policy-prereqs]]
  42. ==== {api-prereq-title}
  43. * If the {es} {security-features} are enabled, you must have
  44. `manage_autoscaling` cluster privileges. For more information, see
  45. <<security-privileges>>.
  46. [[autoscaling-get-autoscaling-policy-desc]]
  47. ==== {api-description-title}
  48. This API gets an autoscaling policy with the provided name.
  49. [[autoscaling-get-autoscaling-policy-params]]
  50. ==== {api-query-parms-title}
  51. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  52. [[autoscaling-get-autoscaling-policy-examples]]
  53. ==== {api-examples-title}
  54. This example gets an autoscaling policy named `my_autoscaling_policy`.
  55. [source,console]
  56. --------------------------------------------------
  57. GET /_autoscaling/policy/my_autoscaling_policy
  58. --------------------------------------------------
  59. // TEST
  60. The API returns the following result:
  61. [source,console-result]
  62. --------------------------------------------------
  63. {
  64. "roles": <roles>,
  65. "deciders": <deciders>
  66. }
  67. --------------------------------------------------
  68. // TEST[s/<roles>/$body.roles/]
  69. // TEST[s/<deciders>/$body.deciders/]