Server groups¶
Keep instances on different hosts, or together.
Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.
Request and response examples are generated from the schema; the tables under Schemas are the reference.
Create a server group¶
POST /
Creates a server group in one location. An instance joins a group only when it is created (server_group_id). Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Delete a server group¶
DELETE /
Deletes the group. Refused while it has instances: an instance cannot leave its group, so delete them first. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_group_id |
path | string | No |
Responses
Schemas¶
Accepted¶
| Name | Type | Description |
|---|---|---|
operation |
OperationLink |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
OperationLink¶
| Name | Type | Description |
|---|---|---|
href |
string | Where to read the operation; also the Location header. |
id |
string | The operation's ID (op_…). |
state |
string | null | Its state when accepted, normally queued. |
ServerGroupCreateBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null | |
location |
string | |
max_server_per_host |
integer | null | anti-affinity only: how many of the group's instances one host may run (1 when left out). |
policy |
string | Where the location's cloud places the group's instances: anti-affinity on different hosts, or the instance fails to start; affinity on the same host, or it fails; soft-anti-affinity and soft-affinity the same when the cloud can, never failing for it. Hosts are not availability zones. |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |