Skip to main content

compute_instance_console_outputs

Creates, updates, deletes, gets or lists a compute_instance_console_outputs resource.

Overview​

Namecompute_instance_console_outputs
TypeResource
Idovh.public_cloud.compute_instance_console_outputs

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
outputstringCaptured console log of the instance as a single text blob, typically the most recent lines of console output

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinstance_id, project_idlength### Get console output<br /><br />Returns the serial console output (boot / system log) of the instance as text. Useful for diagnosing boot problems without opening an interactive console session. This is a read-only, synchronous call.<br /><br />Use the optional length query parameter to retrieve only the last N lines (the tail) of the log. Omit it to return all available output.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
instance_idstring (uuid)Instance ID (wire: instanceId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
lengthintegerNumber of lines to retrieve from the end of the console log. When omitted, returns all available output.

SELECT examples​

Get console output<br /><br />Returns the serial console output (boot / system log) of the instance as text. Useful for diagnosing boot problems without opening an interactive console session. This is a read-only, synchronous call.<br /><br />Use the optional length query parameter to retrieve only the last N lines (the tail) of the log. Omit it to return all available output.​

SELECT
output
FROM ovh.public_cloud.compute_instance_console_outputs
WHERE instance_id = '{{ instance_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND length = '{{ length }}'
;