Create server group
Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/os-server-groups | Create server group. |
Normal response codes: 200
Request
This table shows the URI parameters for the create server group request:
Name | Type | Description |
---|---|---|
{tenant_id} | String | Project ID |
name | String | The server group name. A non-empty string with no leading or trailing spaces. Maximum length is 255 characters. |
policies | Dict | A list of one or more policy names to associate with the server group. The list must contain at least one policy name. Each policy name must be a non-empty string with no leading or trailing spaces. Maximum length is 255 characters. "anti-affinity" and "affinity" can be specified. To make a redundant configuration in an availability zone, specify "anti-affinity". When trying to create an instance with the server group UUID of "anti-affinity" but there is no VM host where it can be created, its status becomes ERROR after the creation request is received. |
availability_zone | String (Optional) |
Specifies the availability zone where the server group will be created. If omitted, the availability zone will be determined automatically from the UUID of the domain that the request execution user belongs to. |
This table shows the body parameters for the create server group request:
Name | Type | Description |
---|---|---|
name | String | The server group name. A non-empty string with no leading or trailing spaces. Maximum length is 255 characters. |
policies | Dict (Optional) |
A list of one or more policy names to associate with the server group. The list must contain at least one policy name. Each policy name must be a non-empty string with no leading or trailing spaces. Maximum length is 255 characters. "anti-affinity" and "affinity" can be specified. To make a redundant configuration in an availability zone, specify "anti-affinity". |
availability_zone | String (Optional) |
Specifies the availability zone where the server group will be created. If omitted, the availability zone will be determined automatically from the UUID of the domain that the request execution user belongs to. |
Example. Create server group: JSON request
{
"server_group": {
"name": "test",
"policies": [
"anti-affinity"
]
}
}
Response
Example. Create server group: JSON response
{
"server_group":{
"members":[],
"metadata":{},
"id":"03a54e57-4fcc-40bc-b532-6426a238ee70",
"policies":[
"anti-affinity"
],
"name":"test"
}
}