---
title: "Detach Instances"
method: PUT
path: "/gcp/gce/group/{groupId}/deatchInstances"
tags: ["Elastigroup GCP"]
---

# Detach Instances

`PUT /gcp/gce/group/{groupId}/deatchInstances`

Detach instances from an Elastigroup

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1gcp~1gce~1group~1%7BgroupId%7D/get/parameters/1` — unresolved $ref

## Request body

- object
  - `instancesToDetach` string[] — The names of the instances to detach from the group.
  - `shouldTerminateInstances` boolean — Indicates whether to terminate the instances or not.
  - `shouldDecrementTargetCapacity` boolean — Indicates whether to decrement the capacity of the group, so no new instance will be launched instead of the detached one.
  - `drainingTimeout` integer — (Applies only if shouldTerminateInstances is on) The draining timeout (in seconds) before terminating the instance. If no draining timeout is defined, the group's draining timeout applies.

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