• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Status Management
  6. Obtaining a VNC-based Remote Login Address (Microversion 2.6 or Later)

Obtaining a VNC-based Remote Login Address (Microversion 2.6 or Later)

Function Description

This interface is used to obtain the address for remotely logging in to an ECS using VNC.

URI

POST /v2.1/{project_id}/servers/{server_id}/remote-consoles

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.

Constraints

  • When using this interface, ensure that the microversion is 2.6 or later.
  • An obtained login address is valid for 10 minutes. Obtain a new one after expiration.

Request

Table 2 Request parameters

Parameter

Type

Mandatory

Description

remote_console

Dic

Yes

Obtains the address for remotely logging in to an ECS using VNC.

Table 3 type parameters

Parameter

Type

Mandatory

Description

type

String

Yes

Specifies a remote login mode. Set it to novnc.

protocol

String

Yes

Specifies a remote login protocol. Set it to vnc.

Response

Response parameters

Table 4 describes the response parameters.

Table 4 Response parameters

Parameter

Type

Description

remote_console

Dict

Obtains the address for remotely logging in to an ECS.

Table 5 type parameters

Parameter

Type

Description

type

String

Specifies a remote login mode.

protocol

String

Specifies a remote login protocol.

url

String

Specifies a remote login URL.

The URL is valid for 10 minutes. Obtain a new one after expiration.

Examples

  • Example request
    POST v2.1/13c67a214ced4afb88d911ae4bd5721a/servers/47bc79ae-df61-4ade-9197-283a74e5d70e/remote-consoles
    {
       "remote_console" : {
            "type" : "novnc",
            "protocol": "vnc"
        }
    }
  • Example response
    {
        "remote_console":{"url": "https://nova-novncproxy.az21.dc1.domainname.com:8002/vnc.auto.html?token=80fa7c8d-37fe-451e-8b08-bfbd9fb6a4df&lang=EN","type":"novnc","protocol": "vnc"}
    }

Returned Values

See General Request Returned Values.

Error Code

See Error Code Description.