Querying ECS Groups
Function
This API is used to query ECS groups.
URI
GET /v1/{project_id}/cloudservers/os-server-groups
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
Request
None
Response
Table 2 describes the response parameters.
| Parameter | Type | Description |
|---|---|---|
| server_groups | Array of objects | Specifies ECS groups. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Specifies the ECS group UUID. |
| name | String | Specifies the ECS group name. |
| members | Array of strings | Specifies the ECSs contained in an ECS group. |
| metadata | Object | Specifies the ECS group metadata. |
| policies | Array of strings | Specifies the policies associated with the ECS group. Options:
NOTE: Only anti-affinity policies are supported. You are not advised to use other policies. If other policies are used, creating the ECS group will fail. |
Example Request
GET https://{endpoint}/v1/{project_id}/cloudservers/os-server-groups Example Response
{
"server_groups": [
{
"id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
"name": "test",
"policies": ["anti-affinity"],
"members": [],
"metadata": {}
}
]
} Returned Values
Error Codes
Last Article: Removing an ECS from an ECS Group
Next Article: Querying Details About an ECS Group
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.