v1

latestSwagger 2.02026-08-04232286653.5 KB
Instance Groups

Creates an instance group in the project and returns the created instance group.

post/projects/{project_id}/compute/instance-groups

Path parameters

project_idstring required

Request body

desired_countinteger required

Desired number of instances for the new instance group.

namestring required

Name for the new instance group.

template_idstring required

ID of the instance template to create the group's instances from.

Example request

{
  "desired_count": 3,
  "name": "my-instance-group",
  "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc"
}

Response

active_instancesstring[] required

List of IDs of running instances in the instance group.

created_atstring required

Creation timestamp of the instance group, in RFC3339 format.

desired_countinteger required

Desired number of instances for the instance group.

idstring required

ID of the instance group.

inactive_instancesstring[] required

List of IDs of non-running instances in the instance group.

instancesstring[] required

[To be deprecated] List of IDs of running instances in the instance group.

namestring required

Name of the instance group.

project_idstring required

ID of the project that owns the instance group.

running_instance_countinteger required

Number of running instances currently in the instance group.

statestring required

Current state of the instance group.

template_idstring required

ID of the instance template currently associated with the instance group.

updated_atstring required

Last update timestamp of the instance group, in RFC3339 format.

Example response

{
  "active_instances": [
    "066ce497-889e-4899-b53e-400df3fb7c0e"
  ],
  "created_at": "2024-01-01T00:00:00Z",
  "desired_count": 3,
  "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
  "inactive_instances": [
    "066ce497-889e-4899-b53e-400df3fb7c0e"
  ],
  "instances": [
    "066ce497-889e-4899-b53e-400df3fb7c0e"
  ],
  "name": "my-instance-group",
  "project_id": "b67aec22-2908-4427-994c-4e32be87477e",
  "running_instance_count": 3,
  "state": "HEALTHY",
  "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc",
  "updated_at": "2024-01-01T00:00:00Z"
}