Obtaining ECS Management Console Logs
Function
This API is used to obtain ECS management console logs.
URI
POST /v2.1/{project_id}/servers/{server_id}/action
| 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. |
Constraints
This API will be discarded since a version later than microversion 2.5. When using this API, set the microversion to 2.5 or earlier.
Request
Table 2 describes the request parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| os-getConsoleOutput | Yes | Object | Obtains ECS management console logs. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| length | Yes | Integer | Specifies the number of request log rows. The value is greater than or equal to -1, which indicates that the output is not limited. |
Response
None
Example Request
POST https://{endpoint}/v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/47e9be4e-a7b9-471f-92d9-ffc83814e07a/action {
"os-getConsoleOutput" : {
"length" : "50"
}
} Example Response
{
"output": "FAKE CONSOLEOUTPUT\nANOTHER\nLAST LINE"
} Returned Values
Last Article: ECS Console Management
Next Article: Obtaining a VNC-based Remote Login Address (Microversion 2.6 or Later)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.