Create or update autoscaling policy API

Create or update autoscaling policy API

This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.

Creates or updates an autoscaling policy.

Request

  1. PUT /_autoscaling/policy/<name>
  2. {
  3. "roles": [],
  4. "deciders": {
  5. "fixed": {
  6. }
  7. }
  8. }

Prerequisites

Description

This API puts an autoscaling policy with the provided name. See Autoscaling Deciders for available deciders.

Examples

This example puts an autoscaling policy named my_autoscaling_policy using the fixed autoscaling decider, applying to the set of nodes having (only) the “data_hot” role.

  1. PUT /_autoscaling/policy/my_autoscaling_policy
  2. {
  3. "roles" : [ "data_hot" ],
  4. "deciders": {
  5. "fixed": {
  6. }
  7. }
  8. }

The API returns the following result:

  1. {
  2. "acknowledged": true
  3. }