[role="xpack"] [[autoscaling-delete-autoscaling-policy]] === Delete autoscaling policy API ++++ Delete autoscaling policy ++++ 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/ -------------------------------------------------- // TEST[s//my_autoscaling_policy/] [[autoscaling-delete-autoscaling-policy-prereqs]] ==== {api-prereq-title} * If the {es} {security-features} are enabled, you must have the `manage_autoscaling` <> to use this API. * If the <> 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 } --------------------------------------------------