mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
97 lines
2.4 KiB
Text
97 lines
2.4 KiB
Text
[role="xpack"]
|
|
[[autoscaling-delete-autoscaling-policy]]
|
|
=== Delete autoscaling policy API
|
|
++++
|
|
<titleabbrev>Delete autoscaling policy</titleabbrev>
|
|
++++
|
|
|
|
NOTE: {cloud-only}
|
|
|
|
.New API reference
|
|
[sidebar]
|
|
--
|
|
For the most up-to-date API details, refer to {api-es}/group/endpoint-autoscaling[Autoscaling APIs].
|
|
--
|
|
|
|
Delete {cloud}/ec-autoscaling.html[autoscaling] policy.
|
|
|
|
[[autoscaling-delete-autoscaling-policy-request]]
|
|
==== {api-request-title}
|
|
|
|
//////////////////////////
|
|
[source,console]
|
|
--------------------------------------------------
|
|
PUT /_autoscaling/policy/my_autoscaling_policy
|
|
{
|
|
"roles": [],
|
|
"deciders": {
|
|
"fixed": {
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// TESTSETUP
|
|
//////////////////////////
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE /_autoscaling/policy/<name>
|
|
--------------------------------------------------
|
|
// TEST[s/<name>/my_autoscaling_policy/]
|
|
|
|
[[autoscaling-delete-autoscaling-policy-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* If the {es} {security-features} are enabled, you must have the
|
|
`manage_autoscaling` <<privileges-list-cluster,cluster privilege>> to use this
|
|
API.
|
|
|
|
* If the <<operator-privileges,{operator-feature}>> is enabled, only operator
|
|
users can use this API.
|
|
|
|
[[autoscaling-delete-autoscaling-policy-desc]]
|
|
==== {api-description-title}
|
|
|
|
This API deletes an autoscaling policy with the provided name.
|
|
|
|
[[autoscaling-delete-autoscaling-policy-params]]
|
|
==== {api-query-parms-title}
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|
|
|
|
[[autoscaling-delete-autoscaling-policy-examples]]
|
|
==== {api-examples-title}
|
|
|
|
This example deletes an autoscaling policy named `my_autoscaling_policy`.
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE /_autoscaling/policy/my_autoscaling_policy
|
|
--------------------------------------------------
|
|
// TEST
|
|
|
|
The API returns the following result:
|
|
|
|
[source,console-result]
|
|
--------------------------------------------------
|
|
{
|
|
"acknowledged": true
|
|
}
|
|
--------------------------------------------------
|
|
|
|
This example deletes all autoscaling policies.
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE /_autoscaling/policy/*
|
|
--------------------------------------------------
|
|
// TEST
|
|
|
|
The API returns the following result:
|
|
|
|
[source,console-result]
|
|
--------------------------------------------------
|
|
{
|
|
"acknowledged": true
|
|
}
|
|
--------------------------------------------------
|