---
title: "Detach Instances"
method: PUT
path: "/ocean/gcp/k8s/cluster/{oceanClusterId}/detachInstances"
tags: ["Ocean GKE"]
---

# Detach Instances

`PUT /ocean/gcp/k8s/cluster/{oceanClusterId}/detachInstances`

Detach instances from your Ocean cluster.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1ocean~1aws~1k8s~1cluster~1%7BoceanClusterId%7D/get/parameters/1` — unresolved $ref

## Request body

- object
  - `instancesToDetach` string[], required — Array of instance identifiers to be detached.
  - `shouldTerminateInstances` boolean — Determines whether the detached instances should be terminated or not. (Default true)
  - `shouldDecrementTargetCapacity` boolean — Determines whether the Ocean cluster's target capacity should be decremented. (Default false)
  - `drainingTimeout` integer — (Applies only if shouldTerminateInstances is on) The draining timeout (in seconds) before terminating the instance.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
