- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Returns the last 1 MB of serial port output from the specified instance.
HTTP request
GET https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/serialPort
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
zone |
The name of the zone for this request. |
instance |
Name of the instance for this request. |
Query parameters
Parameters | |
---|---|
port |
Specifies which COM or serial port to retrieve data from. |
start |
Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to If the output for that byte position is available, this field matches the You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. |
Request body
The request body must be empty.
Response body
An instance serial console output.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "kind": string, "contents": string, "start": string, "next": string, "selfLink": string } |
Fields | |
---|---|
kind |
[Output Only] Type of the resource. Always |
contents |
[Output Only] The contents of the console output. |
start |
The starting byte position of the output that was returned. This should match the |
next |
[Output Only] The position of the next byte of content, regardless of whether the content exists, following the output returned in the |
self |
[Output Only] Server-defined URL for this resource. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/compute.readonly
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 IAM permissions:
compute.instances.getSerialPortOutput
To find predefined roles that contain those permissions, see Compute Engine IAM Roles.