app_logs
Creates, updates, deletes, gets or lists an app_logs resource.
Overview​
| Name | app_logs |
| Type | Resource |
| Id | ovh.cloud_ai.app_logs |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
last_activity | string (date-time) | Last activity date (wire: lastActivity) |
logs | array | Logs lines |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | app_id, service_name | page, replica, size | Get the logs of an app |
url | exec | appId, service_name, kind | Generates 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.
| 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"}}) |
appId | string (uuid) | App ID |
app_id | string (uuid) | App ID (wire: appId) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
page | integer | Page of the result set |
replica | string | Only show logs from this replica |
size | integer | Size of the result set |
SELECT examples​
- get
Get the logs of an app
SELECT
last_activity,
logs
FROM ovh.cloud_ai.app_logs
WHERE app_id = '{{ app_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND page = '{{ page }}'
AND replica = '{{ replica }}'
AND size = '{{ size }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- url
Generates a temporary URL to read the logs of one kind. The URL expires.
EXEC ovh.cloud_ai.app_logs.url
@appId='{{ appId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"kind": "{{ kind }}"
}'
;