OpenSearch/docs/reference/autoscaling/apis/delete-autoscaling-policy.a...

65 lines
1.6 KiB
Plaintext

[role="xpack"]
[testenv="platinum"]
[[autoscaling-delete-autoscaling-policy]]
=== Delete autoscaling policy API
++++
<titleabbrev>Delete autoscaling policy</titleabbrev>
++++
Delete autoscaling policy.
[[autoscaling-delete-autoscaling-policy-request]]
==== {api-request-title}
[source,console]
--------------------------------------------------
PUT /_autoscaling/policy/my_autoscaling_policy
{
"policy": {
"deciders": {
"always": {
}
}
}
}
--------------------------------------------------
// 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
`manage_autoscaling` cluster privileges. For more information, see
<<security-privileges>>.
[[autoscaling-delete-autoscaling-policy-desc]]
==== {api-description-title}
This API deletes an autoscaling policy with the provided name.
[[autoscaling-delete-autoscaling-policy-examples]]
==== {api-examples-title}
This example deletes an autoscaling policy named `my_autosaling_policy`.
[source,console]
--------------------------------------------------
DELETE /_autoscaling/policy/my_autoscaling_policy
--------------------------------------------------
// TEST
The API returns the following result:
[source,console-result]
--------------------------------------------------
{
"acknowledged": true
}
--------------------------------------------------