---
type: api
title: Delete an autoscaling policy
description: NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-autoscaling-delete-autoscaling-policy
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-autoscaling-delete-autoscaling-policy
products:
  - Elasticsearch
---

# Delete an autoscaling policy

Availability: 7.11+

## Paths

- `DELETE` `/_autoscaling/policy/{name}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

#### Path Parameters

- `name` (string Name)
  Name of the autoscaling policy

## Description

NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.

[Read the reference documentation](https://www.elastic.co/guide/en/cloud/current/ec-autoscaling.html)

## Query String Parameters

- `master_timeout` (string Duration · default: 30s)
  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.
- `timeout` (string Duration · default: 30s)
  Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code Examples

#### Console

```console
DELETE /_autoscaling/policy/*
```

#### JavaScript

```javascript
const response = await client.autoscaling.deleteAutoscalingPolicy({
  name: "*",
});
```

#### Python

```python
resp = client.autoscaling.delete_autoscaling_policy(
    name="*",
)
```

#### curl

```curl
curl -X DELETE "$ELASTICSEARCH_URL/_autoscaling/policy/*" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.autoscaling().deleteAutoscalingPolicy(d -> d
    .name("*")
);
```

#### PHP

```php
$resp = $client->autoscaling()->deleteAutoscalingPolicy([
    "name" => "*",
]);
```

#### Ruby

```ruby
response = client.perform_request(
  "DELETE",
  "/_autoscaling/policy/*",
  {},
)
```

## Response Examples

#### A successful response of deleting one or more autoscaling policy.

This may be a response to either `DELETE /_autoscaling/policy/my_autoscaling_policy` or `DELETE /_autoscaling/policy/*`.

```json
{
  "acknowledged": true
}
```

