Get 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.
Get autoscaling policy.
Request
resp = client.autoscaling.get_autoscaling_policy(
name="<name>",
)
print(resp) const response = await client.autoscaling.getAutoscalingPolicy({
name: "<name>",
});
console.log(response); GET /_autoscaling/policy/<name>
Prerequisites
- If the Elasticsearch security features are enabled, you must have
manage_autoscalingcluster privileges. For more information, see Security privileges.
Description
This API gets an autoscaling policy with the provided name.
Query parameters
-
master_timeout - (Optional, time units) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to
30s. Can also be set to-1to indicate that the request should never timeout.
Examples
This example gets an autoscaling policy named my_autoscaling_policy.
resp = client.autoscaling.get_autoscaling_policy(
name="my_autoscaling_policy",
)
print(resp) const response = await client.autoscaling.getAutoscalingPolicy({
name: "my_autoscaling_policy",
});
console.log(response); GET /_autoscaling/policy/my_autoscaling_policy
The API returns the following result:
{
"roles": <roles>,
"deciders": <deciders>
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-policy.html