Skip to main content

GetSerialPortOutput

Returns the serial port output of the specified Instance resource.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetInstanceSerialPortOutputRequest =
cloudApi.compute.instance_service.GetInstanceSerialPortOutputRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.InstanceServiceClient);

const result = await client.getSerialPortOutput(
GetInstanceSerialPortOutputRequest.fromPartial({
instanceId: "instanceId",
// port: 0
})
);
console.log(result);
})();

GetInstanceSerialPortOutputRequest

instanceId : string

ID of the instance to return the serial port output for.

port : int64

Serial port to retrieve data from. The default is 1.

GetInstanceSerialPortOutputResponse

contents : string

The contents of the serial port output, starting from the time when the instance started to boot.