---
title: "POST /projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances"
method: POST
path: "/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances"
tags: ["instanceGroupManagers"]
---

# POST /projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances

`POST /projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances`

Flags the specified instances in the managed instance group for immediate
deletion. The instances are also removed from any target
pools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of
instances that you delete. This operation is marked as DONE
when the action is scheduled even if the instances are still being deleted.
You must separately verify the status of the deleting action
with thelistmanagedinstances
method.

If the group is part of a backend
service that has enabled
connection draining, it can take up to 60 seconds after the connection
draining duration has elapsed before the VM instance is removed or deleted.

You can specify a maximum of 1000 instances with this method per request.

## Path parameters

- `project` string, required
- `zone` string, required
- `instanceGroupManager` string, required

## Query parameters

- `noGracefulShutdown` boolean
- `requestId` string

## Request body

- InstanceGroupManagersDeleteInstancesRequest
  - `instances` string[] — The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. Queued instances do not have URL and can be deleted only by name. One cannot specify both URLs and names in a single request.
  - `skipInstancesOnValidationError` boolean — Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/revisions/6120ed8969d4/schema)
