---
title: "Updates an instance group in the project and returns the updated instance group."
method: PATCH
path: "/projects/{project_id}/compute/instance-groups/{instance_group_id}"
tags: ["Instance Groups"]
---

# Updates an instance group in the project and returns the updated instance group.

`PATCH /projects/{project_id}/compute/instance-groups/{instance_group_id}`

## Path parameters

- `instance_group_id` string, required
- `project_id` string, required

## Request body

- InstanceGroupPatchRequest — This is a separate type from InstanceGroupPostRequest for clearer documentation, as these fields are not required in the PATCH endpoint.
  - `desired_count` DesiredCount
    - `value` integer — New desired number of instances for the instance group.
  - `name` string — New name for the instance group.
  - `template_id` string — ID of the instance template to associate with the instance group.

## Response `200`

- InstanceGroup
  - `active_instances` string[], required — List of IDs of running instances in the instance group.
  - `created_at` string, required — Creation timestamp of the instance group, in RFC3339 format.
  - `desired_count` integer, required — Desired number of instances for the instance group.
  - `id` string, required — ID of the instance group.
  - `inactive_instances` string[], required — List of IDs of non-running instances in the instance group.
  - `instances` string[], required — [To be deprecated] List of IDs of running instances in the instance group.
  - `name` string, required — Name of the instance group.
  - `project_id` string, required — ID of the project that owns the instance group.
  - `running_instance_count` integer, required — Number of running instances currently in the instance group.
  - `state` string, required — Current state of the instance group.
  - `template_id` string, required — ID of the instance template currently associated with the instance group.
  - `updated_at` string, required — Last update timestamp of the instance group, in RFC3339 format.

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `500` — Error Internal Server

---

[API](https://skmtc.dev/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.dev/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/revisions/a3fd2dedc72b/schema)
