NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
Query parameters
-
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1or0. -
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1or0.
Body
Required
-
Decider settings.
External documentation
PUT
/_autoscaling/policy/{name}
Console
PUT /_autoscaling/policy/my_autoscaling_policy
{
"roles" : [ "data_hot" ],
"deciders": {
"proactive_storage": {
"forecast_window": "10m"
}
}
}
curl \
--request PUT 'http://api.example.com/_autoscaling/policy/{name}' \
--header "Content-Type: application/json" \
--data '"{\n \"roles\" : [ \"data_hot\" ],\n \"deciders\": {\n \"proactive_storage\": {\n \"forecast_window\": \"10m\"\n }\n }\n}"'
Request examples
Autoscaling put autoscaling policy example1
An example body for a `PUT /_autoscaling/policy/my_autoscaling_policy` request.
{
"roles" : [ "data_hot" ],
"deciders": {
"proactive_storage": {
"forecast_window": "10m"
}
}
}
{
"roles": [],
"deciders": {
"fixed": {
}
}
}
The API method and path for this request: `PUT /_autoscaling/policy/my_autoscaling_policy`. It creates `my_autoscaling_policy` using the fixed autoscaling decider, applying to the set of nodes having (only) the `data_hot` role.
{
"roles" : [ "data_hot" ],
"deciders": {
"fixed": {
}
}
}
Response examples (200)
{
"acknowledged": true
}