Skip to content

Instance Groups

All operations require authentication.

4 operationsv2/publicCloud/project
Agent setup

Get an instance groupProduction

GET
/v2/publicCloud/project/{projectId}/compute/instanceGroup/{instanceGroupId}

Get an instance group

Returns a single instance group (placement group), including its scheduling policy and its members.

Immutable by design

Instance groups are immutable after creation. There is deliberately no PUT / update route. Neither the placement policy nor the set of members can be changed once the group exists. Membership is fixed at instance creation time: an instance joins a group via its targetSpec.group field when it is created (see the instance POST), and cannot be added to or removed from a group afterward. To change grouping you delete and recreate the affected instances into a different group.

Path parameters

instanceGroupId
required
stringuuid

Instance group ID

projectId
required
string

Project ID

Response

200InstanceGroupsuccessful operation
checksum
read-only
string

Checksum. Computed hash of the current target specification, used for optimistic concurrency control. Because an instance group has no update route, this value never changes after creation.

createdAt
read-only
stringdate-time

Creation date. Timestamp at which the instance group was created, in RFC 3339 format.

currentState
read-only
InstanceGroupCurrentState

Actual state of the instance group as reported by the backend (OpenStack/Nova server group), including its current members. This is read-only and reflects reality, in contrast to targetSpec which is the desired specification supplied on creation. May be null while the group is still being provisioned and no backend state is known yet.

currentTasks
read-only
CurrentTask[]

Current tasks. Asynchronous operations currently running against this instance group, for example the initial provisioning or the deletion. Empty or null when no operation is in progress.

id
read-only
stringuuid

Unique identifier of the instance group, assigned at creation and used to reference it on the GET/DELETE routes

resourceStatus
read-only
ResourceStatusEnum

Lifecycle status of the instance group in the system, for example whether it is being created, ready, or being deleted. Reflects readiness of the resource, not the placement policy itself.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
InstanceGroupTargetSpec

Target specification. Desired specification of the instance group as supplied on creation (name, location and placement policy). Since an instance group cannot be updated, this specification is fixed for the lifetime of the group. Compare it against currentState to see what the backend actually provisioned.

404objectError 404 response

Example uses instanceGroupId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/instanceGroup/{instanceGroupId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "location": { "availabilityZone": "string", "region": "string" }, "members": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "name": "string", "policy": "AFFINITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "policy": "AFFINITY" }}

List instance groupsProduction

GET
/v2/publicCloud/project/{projectId}/compute/instanceGroup

List instance groups

Lists all instance groups (placement groups) in the project, each with the same shape as the GET route (scheduling policy and members).

Immutable by design

Instance groups cannot be modified after creation. There is deliberately no PUT / update route, and membership is fixed at instance creation time via the instance's targetSpec.group field. See the GET route for details.

Path parameters

projectId
required
string

Project ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200InstanceGroup[]successful operation
checksum
read-only
string

Checksum. Computed hash of the current target specification, used for optimistic concurrency control. Because an instance group has no update route, this value never changes after creation.

createdAt
read-only
stringdate-time

Creation date. Timestamp at which the instance group was created, in RFC 3339 format.

currentState
read-only
InstanceGroupCurrentState

Actual state of the instance group as reported by the backend (OpenStack/Nova server group), including its current members. This is read-only and reflects reality, in contrast to targetSpec which is the desired specification supplied on creation. May be null while the group is still being provisioned and no backend state is known yet.

currentTasks
read-only
CurrentTask[]

Current tasks. Asynchronous operations currently running against this instance group, for example the initial provisioning or the deletion. Empty or null when no operation is in progress.

id
read-only
stringuuid

Unique identifier of the instance group, assigned at creation and used to reference it on the GET/DELETE routes

resourceStatus
read-only
ResourceStatusEnum

Lifecycle status of the instance group in the system, for example whether it is being created, ready, or being deleted. Reflects readiness of the resource, not the placement policy itself.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
InstanceGroupTargetSpec

Target specification. Desired specification of the instance group as supplied on creation (name, location and placement policy). Since an instance group cannot be updated, this specification is fixed for the lifetime of the group. Compare it against currentState to see what the backend actually provisioned.

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/instanceGroup \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "location": { "availabilityZone": "string", "region": "string" }, "members": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "name": "string", "policy": "AFFINITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "policy": "AFFINITY" } }]

Create an instance groupProduction

POST
/v2/publicCloud/project/{projectId}/compute/instanceGroup

Create an instance group

Creates a new instance group (placement group). Creation is asynchronous: the group starts in CREATING and becomes READY once the backend has provisioned it.

Placement policy

targetSpec.policy chooses how members are scheduled relative to each other:

  • AFFINITY — members are placed on the same hypervisor.
  • ANTI_AFFINITY — members are placed on different hypervisors (for high availability).

Immutable, membership set at instance creation

The group is immutable once created. There is deliberately no PUT / update route, so the policy can never be changed. The group is created empty: instances are not added here. An instance joins the group only at its own creation time, via its targetSpec.group field (see the instance POST), and membership cannot change afterward (OpenStack/Nova server groups are immutable).

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
InstanceGroupTargetSpec

Target specification. Desired specification of the instance group to create: its name, location and placement policy (see PolicyEnum). All of these values are fixed for the lifetime of the group, as instance groups cannot be updated once created.

Response

200InstanceGroupsuccessful operation
checksum
read-only
string

Checksum. Computed hash of the current target specification, used for optimistic concurrency control. Because an instance group has no update route, this value never changes after creation.

createdAt
read-only
stringdate-time

Creation date. Timestamp at which the instance group was created, in RFC 3339 format.

currentState
read-only
InstanceGroupCurrentState

Actual state of the instance group as reported by the backend (OpenStack/Nova server group), including its current members. This is read-only and reflects reality, in contrast to targetSpec which is the desired specification supplied on creation. May be null while the group is still being provisioned and no backend state is known yet.

currentTasks
read-only
CurrentTask[]

Current tasks. Asynchronous operations currently running against this instance group, for example the initial provisioning or the deletion. Empty or null when no operation is in progress.

id
read-only
stringuuid

Unique identifier of the instance group, assigned at creation and used to reference it on the GET/DELETE routes

resourceStatus
read-only
ResourceStatusEnum

Lifecycle status of the instance group in the system, for example whether it is being created, ready, or being deleted. Reflects readiness of the resource, not the placement policy itself.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
InstanceGroupTargetSpec

Target specification. Desired specification of the instance group as supplied on creation (name, location and placement policy). Since an instance group cannot be updated, this specification is fixed for the lifetime of the group. Compare it against currentState to see what the backend actually provisioned.

409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/instanceGroup \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "location": { "availabilityZone": "string", "region": "string" }, "members": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "name": "string", "policy": "AFFINITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "policy": "AFFINITY" }}

Delete an instance groupProduction

DELETE
/v2/publicCloud/project/{projectId}/compute/instanceGroup/{instanceGroupId}

Delete an instance group

Deletes an instance group (placement group). Deletion is asynchronous: the resource transitions to DELETING and the backend then removes it.

A group is normally removed once it is empty (has no member instances). Because membership is fixed at instance creation time and cannot be edited on an existing group, freeing a group means deleting or recreating its member instances first. Deleting the group tears down only the placement grouping. It does not delete the instances themselves. A delete already in progress is reported as ResourceAlreadyBeingDeleted.

Path parameters

instanceGroupId
required
stringuuid

Instance group ID

projectId
required
string

Project ID

Response

200InstanceGroupsuccessful operation
checksum
read-only
string

Checksum. Computed hash of the current target specification, used for optimistic concurrency control. Because an instance group has no update route, this value never changes after creation.

createdAt
read-only
stringdate-time

Creation date. Timestamp at which the instance group was created, in RFC 3339 format.

currentState
read-only
InstanceGroupCurrentState

Actual state of the instance group as reported by the backend (OpenStack/Nova server group), including its current members. This is read-only and reflects reality, in contrast to targetSpec which is the desired specification supplied on creation. May be null while the group is still being provisioned and no backend state is known yet.

currentTasks
read-only
CurrentTask[]

Current tasks. Asynchronous operations currently running against this instance group, for example the initial provisioning or the deletion. Empty or null when no operation is in progress.

id
read-only
stringuuid

Unique identifier of the instance group, assigned at creation and used to reference it on the GET/DELETE routes

resourceStatus
read-only
ResourceStatusEnum

Lifecycle status of the instance group in the system, for example whether it is being created, ready, or being deleted. Reflects readiness of the resource, not the placement policy itself.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
InstanceGroupTargetSpec

Target specification. Desired specification of the instance group as supplied on creation (name, location and placement policy). Since an instance group cannot be updated, this specification is fixed for the lifetime of the group. Compare it against currentState to see what the backend actually provisioned.

404objectError 404 response
409objectError 409 response

Example uses instanceGroupId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/instanceGroup/{instanceGroupId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "location": { "availabilityZone": "string", "region": "string" }, "members": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "name": "string", "policy": "AFFINITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "policy": "AFFINITY" }}