Updated on 2025-12-10 GMT+08:00

Obtaining the VNC Login Address

Function

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

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permissions listed below are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

ecs:cloudServers:vnc

read

instance *

-

-

-

URI

POST /v1/{project_id}/cloudservers/{server_id}/remote_console

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

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

Request parameters

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Mandatory

Type

Description

remote_console

Yes

Object

Definition

Obtains the address for remotely logging in to an ECS. For details, see Table 3.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 remote_console parameters

Parameter

Mandatory

Type

Description

type

Yes

String

Definition

Specifies a remote login mode. Set it to novnc.

Constraints

N/A

Range

N/A

Default Value

N/A

protocol

Yes

String

Definition

Specifies a remote login protocol. Set it to vnc.

Constraints

N/A

Range

N/A

Default Value

N/A

Response

Response parameters

Table 4 describes the response parameters.

Table 4 Response parameters

Parameter

Type

Description

remote_console

Object

Definition

Obtains the address for remotely logging in to an ECS. For details, see Table 5.

Range

N/A

Table 5 remote_console field description

Parameter

Type

Description

type

String

Definition

Specifies a remote login mode.

Range

N/A

protocol

String

Definition

Specifies a remote login protocol.

Range

N/A

url

String

Definition

Specifies a remote login URL.

The URL for VNC login contains a one-time token. Keep the token secure and discard it after using it.

Range

N/A

Example Request

Obtain the VNC login address of the ECS whose ID is 47bc79ae-df61-4ade-9197-283a74e5d70e.

POST https://{endpoint}/v1/13c67a214ced4afb88d911ae4bd5721a/cloudservers/47bc79ae-df61-4ade-9197-283a74e5d70e/remote_console

{
    "remote_console": {
        "protocol": "vnc",
        "type": "novnc"
    }
}

Example Response

{
   "remote_console": {
        "type": "novnc",
        "protocol": "vnc",
        "url": "https://nova-novncproxy.az1.dc1.domainname.com:8002/vnc_auto.html?token=0fda3eca-8232-4249-****-************&lang=EN&tLength=70"
    }
}

Error Codes

See Error Codes.