• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Network Management
  6. Query the Networks of a Specified ECS

Query the Networks of a Specified ECS

Function Description

This interface is used to query the networks of an ECS.

Constraints

N/A

URI

GET /v2/{project_id}/servers/{server_id}/ips

GET /v2.1/{project_id}/servers/{server_id}/ips

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the ECS ID.

Request

N/A

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Mandatory

Description

addresses

Dict

Yes

Specifies the ECS network information.

Table 3 addresses parameter structure description

Parameter

Type

Mandatory

Description

Name of the network where the ECS accesses

List(Dict)

Yes

Specifies the network where the ECS accesses. For details about the network, see Table 4.

Table 4 ECS network parameter structure description

Attribute

Type

CRUD

Default Value

Constraint

Remarks

version

Int

R

N/A

4 or 6

Specifies the IP address version. The value of this parameter can be 4 or 6.

addr

String

R

N/A

IP address format

Specifies the IP address.

Examples

  • 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

See General Request Returned Values.