Method: instances.getSerialPortOutput

Returns the last 1 MB of serial port output from the specified instance.

HTTP request

GET https://www.googleapis.com/compute/beta/projects/{project}/zones/{zone}/instances/{resourceId}/serialPort

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

zone

string

The name of the zone for this request.

resourceId

string

Name of the instance scoping this request.

Query parameters

Parameters
port

number

Specifies which COM or serial port to retrieve data from.

start

string (int64 format)

Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

An instance serial console output.

JSON representation
{
  "contents": string,
  "start": string,
  "next": string,
  "selfLink": string,
  "kind": string
}
Fields
contents

string

[Output Only] The contents of the console output.

start

string (int64 format)

The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.

next

string (int64 format)

[Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.

kind

string

[Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the following Google IAM permissions:

  • compute.instances.getSerialPortOutput
Was this page helpful? Let us know how we did:

Send feedback about...

Compute Engine