Querying the Networks of a Specified ECS
Function
This API is used to query the networks of an ECS.
Constraints
None
URI
GET /v2.1/{project_id}/servers/{server_id}/ips
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
| server_id | Yes | Specifies the ECS ID. |
Request
None
Response
Table 2 describes the response parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| addresses | Yes | Object | Specifies the ECS network information. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Name of the network where the ECS accesses | Yes | Array of objects | Specifies the network where the ECS accesses. For details about the network, see Table 4. |
Example Request
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/ips Example Response
{
"addresses": {
"demo_net": [
{
"version": 4,
"addr": "10.0.0.4"
},
{
"version": 4,
"addr": "192.150.73.132"
}
],
"private_net": [
{
"version": 4,
"addr": "10.176.42.16"
},
{
"version": 6,
"addr": "::babe:10.176.42.16"
}
]
}
} Returned Values
Last Article: Querying Networks
Next Article: Querying the Specified Network of an ECS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.