2020-04-04 17:52:54 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[autoscaling-get-autoscaling-policy]]
|
|
|
|
=== Get autoscaling policy API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get autoscaling policy</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Get autoscaling policy.
|
|
|
|
|
|
|
|
[[autoscaling-get-autoscaling-policy-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
|
|
|
[source,console]
|
|
|
|
--------------------------------------------------
|
|
|
|
PUT /_autoscaling/policy/my_autoscaling_policy
|
|
|
|
{
|
|
|
|
"policy": {
|
|
|
|
"deciders": {
|
2020-09-19 03:05:23 -04:00
|
|
|
"fixed": {
|
2020-04-04 17:52:54 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// TESTSETUP
|
|
|
|
|
2020-08-10 09:28:52 -04:00
|
|
|
//////////////////////////
|
|
|
|
|
|
|
|
[source,console]
|
|
|
|
--------------------------------------------------
|
|
|
|
DELETE /_autoscaling/policy/my_autoscaling_policy
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST
|
|
|
|
// TEARDOWN
|
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
2020-04-04 17:52:54 -04:00
|
|
|
[source,console]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET /_autoscaling/policy/<name>
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[s/<name>/my_autoscaling_policy/]
|
|
|
|
|
|
|
|
[[autoscaling-get-autoscaling-policy-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have
|
|
|
|
`manage_autoscaling` cluster privileges. For more information, see
|
|
|
|
<<security-privileges>>.
|
|
|
|
|
|
|
|
[[autoscaling-get-autoscaling-policy-desc]]
|
|
|
|
==== {api-description-title}
|
|
|
|
|
|
|
|
This API gets an autoscaling policy with the provided name.
|
|
|
|
|
|
|
|
[[autoscaling-get-autoscaling-policy-examples]]
|
|
|
|
==== {api-examples-title}
|
|
|
|
|
|
|
|
This example gets an autoscaling policy named `my_autosaling_policy`.
|
|
|
|
|
|
|
|
[source,console]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET /_autoscaling/policy/my_autoscaling_policy
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST
|
|
|
|
|
|
|
|
The API returns the following result:
|
|
|
|
|
|
|
|
[source,console-result]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"policy": {
|
|
|
|
"deciders": <deciders>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[s/<deciders>/$body.policy.deciders/]
|