Skip to main content

job_logs

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

Overview​

Namejob_logs
TypeResource
Idovh.cloud_ai.job_logs

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
last_activitystring (date-time)Last activity date (wire: lastActivity)
logsarrayLogs lines

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectjob_id, service_namepage, sizeGet the logs of a job
urlexecjobId, service_name, kindGenerates a temporary URL to read the logs of one kind. The URL expires.

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"}})
jobIdstring (uuid)Job ID
job_idstring (uuid)Job ID (wire: jobId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
pageintegerPage of the result set
sizeintegerSize of the result set

SELECT examples​

Get the logs of a job

SELECT
last_activity,
logs
FROM ovh.cloud_ai.job_logs
WHERE job_id = '{{ job_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND page = '{{ page }}'
AND size = '{{ size }}'
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Generates a temporary URL to read the logs of one kind. The URL expires.

EXEC ovh.cloud_ai.job_logs.url
@jobId='{{ jobId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"kind": "{{ kind }}"
}'
;