Skip to main content

kafka_log_subscriptions

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

Overview​

Namekafka_log_subscriptions
TypeResource
Idovh.public_cloud_analytics.kafka_log_subscriptions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
stream_idstringIdentifier of the destination log stream (wire: streamId)
subscription_idstring (uuid)Unique identifier of the subscription, used to change or stop the forwarding (wire: subscriptionId)
service_namestringName of the destination log service (wire: serviceName)
created_atstring (date-time)Creation date of the subscription (wire: createdAt)
kindstringLog kind name of this subscription
resourceobjectSubscribed resource, where the logs come from
updated_atstring (date-time)Last update date of the subscription (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_id, subscription_id, project_idReturns the log kind and the destination stream of a subscription. (Beta version)
listselectservice_id, project_idx_pagination_cursor, x_pagination_size, kind, x_pagination_modeReturns the identifiers of the Kafka log subscriptions. Set kind to restrict the list to one log kind. (Beta version)
createinsertservice_id, project_id, kind, stream_idForwards Kafka logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier. (Beta version)
deletedeleteservice_id, subscription_id, project_idDeletes the subscription and stops forwarding Kafka logs to the stream. (Beta version)

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"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
service_idstring (uuid)Service ID (wire: serviceId)
subscription_idstring (uuid)Subscription ID (wire: subscriptionId)
kindstringFilter subscriptions by log kind
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the log kind and the destination stream of a subscription. (Beta version)

SELECT
stream_id,
subscription_id,
service_name,
created_at,
kind,
resource,
updated_at
FROM ovh.public_cloud_analytics.kafka_log_subscriptions
WHERE service_id = '{{ service_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Forwards Kafka logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier. (Beta version)

INSERT INTO ovh.public_cloud_analytics.kafka_log_subscriptions (
kind,
stream_id,
service_id,
project_id
)
SELECT
'{{ kind }}' /* required */,
'{{ stream_id }}' /* required */,
'{{ service_id }}',
'{{ project_id }}'
RETURNING
operation_id,
service_name
;

DELETE examples​

Deletes the subscription and stops forwarding Kafka logs to the stream. (Beta version)

DELETE FROM ovh.public_cloud_analytics.kafka_log_subscriptions
WHERE service_id = '{{ service_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;