123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- [role="xpack"]
- [testenv="platinum"]
- [[autoscaling-put-autoscaling-policy]]
- === Put autoscaling policy API
- ++++
- <titleabbrev>Put autoscaling policy</titleabbrev>
- ++++
- Put autoscaling policy.
- [[autoscaling-put-autoscaling-policy-request]]
- ==== {api-request-title}
- [source,console]
- --------------------------------------------------
- PUT /_autoscaling/policy/<name>
- {
- "policy": {
- "deciders": {
- "fixed": {
- }
- }
- }
- }
- --------------------------------------------------
- // TEST[s/<name>/name/]
- //////////////////////////
- [source,console]
- --------------------------------------------------
- DELETE /_autoscaling/policy/name
- --------------------------------------------------
- // TEST[continued]
- //////////////////////////
- [[autoscaling-put-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-put-autoscaling-policy-desc]]
- ==== {api-description-title}
- This API puts an autoscaling policy with the provided name.
- [[autoscaling-put-autoscaling-policy-examples]]
- ==== {api-examples-title}
- This example puts an autoscaling policy named `my_autoscaling_policy` using the
- fixed autoscaling decider.
- [source,console]
- --------------------------------------------------
- PUT /_autoscaling/policy/my_autoscaling_policy
- {
- "policy": {
- "deciders": {
- "fixed": {
- }
- }
- }
- }
- --------------------------------------------------
- // TEST
- The API returns the following result:
- [source,console-result]
- --------------------------------------------------
- {
- "acknowledged": true
- }
- --------------------------------------------------
- //////////////////////////
- [source,console]
- --------------------------------------------------
- DELETE /_autoscaling/policy/my_autoscaling_policy
- --------------------------------------------------
- // TEST[continued]
- //////////////////////////
|