---
type: api
title: Shutdown Deployment Elasticsearch Resource
description: Shutdown Elasticsearch Resource belonging to a given Deployment.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-shutdown-deployment-es-resource
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-shutdown-deployment-es-resource
products:
  - Elastic Cloud Enterprise
---

# Shutdown Deployment Elasticsearch Resource

## Paths

- `POST` `/deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `deployment_id` (string)
  Identifier for the Deployment.
- `ref_id` (string)
  User-specified RefId for the Resource (or '_main' if there is only one).

## Description

Shutdown Elasticsearch Resource belonging to a given Deployment.

## Query String Parameters

- `hide` (boolean)
  Hide cluster on shutdown. Hidden clusters are not listed by default. Only applicable for Platform administrators.
- `skip_snapshot` (boolean · default: false)
  If true, will skip taking a snapshot of the cluster before shutting the cluster down (if even possible).

## Responses

#### `200`

Standard response.

`application/json`

- `warnings` ([] ReplyWarning)
  List of warnings generated from validating command
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the warning that occurred
#### `400`

Parameter is restricted and can only be set by a Platform administrator. (code: `deployments.restricted_parameter`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `404`

* The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)
* The Resource specified by {ref_id} cannot be found. (code: `deployments.deployment_resource_not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `500`

A Resource that was previously stored no longer exists. (code: `deployments.deployment_resource_no_longer_exists`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown
```

#### curl

```curl
curl -X POST "/deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown"
```

