compute_instance_console_outputs
Creates, updates, deletes, gets or lists a compute_instance_console_outputs resource.
Overview​
| Name | compute_instance_console_outputs |
| Type | Resource |
| Id | ovh.public_cloud.compute_instance_console_outputs |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
output | string | Captured 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | instance_id, project_id | length | ### 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_id | string (uuid) | Instance ID (wire: instanceId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
length | integer | Number of lines to retrieve from the end of the console log. When omitted, returns all available output. |
SELECT examples​
- get
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 }}'
;