---
type: api
title: Cancel resource pending plan
description: Cancels the pending plan of a Resource belonging to a given Deployment.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-cancel-deployment-resource-pending-plan
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-cancel-deployment-resource-pending-plan
products:
  - Elastic Cloud Enterprise
---

# Cancel resource pending plan

## Paths

- `DELETE` `/deployments/{deployment_id}/{resource_kind}/{ref_id}/plan/pending`

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

#### Path Parameters

- `deployment_id` (string)
  Identifier for the Deployment
- `resource_kind` (enum)
  The kind of resource
  Values: `elasticsearch`, `kibana`, `apm`, `appsearch`, `enterprise_search`, `integrations_server`
- `ref_id` (string)
  User-specified RefId for the Resource (or '_main' if there is only one)

## Description

Cancels the pending plan of a Resource belonging to a given Deployment.

## Query String Parameters

- `force_delete` (boolean · default: false)
  When `true`, deletes the pending plan instead of attempting a graceful cancellation. The default is `false`.
- `ignore_missing` (boolean · default: false)
  When `true`, returns successfully, even when plans are missing. The default is `false`.

## Responses

#### `200`

Standard Deployment Resource Crud Response

`application/json`

- `id` (string)
  The id of the deployment
- `kind` (string)
  The kind of the stateless resource
- `ref_id` (string)
  The reference id of the resource
#### `400`

The Resource does not have a pending plan. (code: `deployments.resource_does_not_have_a_pending_plan`)

`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`)

`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

#### `409`

Vacate plans can only be cancelled by platform administrators. (code: `deployments.vacate_plan_cancellation_restricted`)

`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`

We have failed you. (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
DELETE /deployments/{deployment_id}/{resource_kind}/{ref_id}/plan/pending
```

#### curl

```curl
curl -X DELETE "/deployments/{deployment_id}/{resource_kind}/{ref_id}/plan/pending"
```

