job_log_subscriptions
Creates, updates, deletes, gets or lists a job_log_subscriptions resource.
Overview​
| Name | job_log_subscriptions |
| Type | Resource |
| Id | ovh.cloud_ai.job_log_subscriptions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
stream_id | string | Id of the destination log stream (wire: streamId) |
subscription_id | string (uuid) | Subscription ID (wire: subscriptionId) |
service_name | string | Name of the destination log service (wire: serviceName) |
created_at | string (date-time) | Creation date of the subscription (wire: createdAt) |
kind | string | Log kind name of this subscription |
resource | object | Subscribed resource, where the logs come from |
updated_at | string (date-time) | Last update date of the subscription (wire: updatedAt) |
Log subscription
| Name | Datatype | Description |
|---|---|---|
stream_id | string | Id of the destination log stream (wire: streamId) |
subscription_id | string (uuid) | Subscription ID (wire: subscriptionId) |
service_name | string | Name of the destination log service (wire: serviceName) |
created_at | string (date-time) | Creation date of the subscription (wire: createdAt) |
kind | string | Log kind name of this subscription |
resource | object | Subscribed resource, where the logs come from |
updated_at | string (date-time) | Last update date of the subscription (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | job_id, subscription_id, service_name | Returns the log kind and the destination stream of a subscription. | |
list | select | job_id, service_name | kind, x_pagination_mode | Returns the identifiers of the AI Training log subscriptions. Set kind to restrict the list to one log kind. |
create | insert | job_id, service_name, kind, stream_id | Forwards AI Training logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier. | |
delete | delete | job_id, subscription_id, service_name | Deletes the subscription and stops forwarding AI Training logs to the stream. |
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"}}) |
job_id | string (uuid) | Job ID (wire: jobId) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
subscription_id | string (uuid) | Subscription ID (wire: subscriptionId) |
kind | string | Filter on a specific kind (e.g., audit) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Returns the log kind and the destination stream of a subscription.
SELECT
stream_id,
subscription_id,
service_name,
created_at,
kind,
resource,
updated_at
FROM ovh.cloud_ai.job_log_subscriptions
WHERE job_id = '{{ job_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Returns the identifiers of the AI Training log subscriptions. Set kind to restrict the list to one log kind.
SELECT
stream_id,
subscription_id,
service_name,
created_at,
kind,
resource,
updated_at
FROM ovh.cloud_ai.job_log_subscriptions
WHERE job_id = '{{ job_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND kind = '{{ kind }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Forwards AI Training logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier.
INSERT INTO ovh.cloud_ai.job_log_subscriptions (
kind,
stream_id,
job_id,
service_name
)
SELECT
'{{ kind }}' /* required */,
'{{ stream_id }}' /* required */,
'{{ job_id }}',
'{{ service_name }}'
RETURNING
operation_id,
service_name
;
# Description fields are for documentation purposes
- name: job_log_subscriptions
props:
- name: job_id
value: "{{ job_id }}"
description: Required parameter for the job_log_subscriptions resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the job_log_subscriptions resource.
- name: kind
value: "{{ kind }}"
description: |
Log kind name to subscribe to
- name: stream_id
value: "{{ stream_id }}"
description: |
Customer log stream ID
DELETE examples​
- delete
Deletes the subscription and stops forwarding AI Training logs to the stream.
DELETE FROM ovh.cloud_ai.job_log_subscriptions
WHERE job_id = '{{ job_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;