Skip to main content

service_log_subscriptions

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

Overview​

Nameservice_log_subscriptions
TypeResource
Idovh.email_exchange.service_log_subscriptions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
stream_idstringId of the destination log stream (wire: streamId)
subscription_idstring (uuid)Subscription ID (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
getselectexchange_service, organization_name, subscription_idReturns the log kind and the destination stream of a subscription. (Alpha version)
listselectexchange_service, organization_namekind, x_pagination_modeReturns the identifiers of the Exchange log subscriptions. Set kind to restrict the list to one log kind. (Alpha version)
createinsertexchange_service, organization_name, kind, stream_idForwards Exchange logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier. (Alpha version)
deletedeleteexchange_service, organization_name, subscription_idDeletes the subscription and stops forwarding Exchange logs to the stream. (Alpha 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"}})
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
organization_namestringThe internal name of your exchange organization (wire: organizationName)
subscription_idstring (uuid)Subscription ID (wire: subscriptionId)
kindstringFilter on a specific kind (e.g., audit)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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

SELECT
stream_id,
subscription_id,
service_name,
created_at,
kind,
resource,
updated_at
FROM ovh.email_exchange.service_log_subscriptions
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples​

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

INSERT INTO ovh.email_exchange.service_log_subscriptions (
kind,
stream_id,
exchange_service,
organization_name
)
SELECT
'{{ kind }}' /* required */,
'{{ stream_id }}' /* required */,
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
operation_id,
service_name
;

DELETE examples​

Deletes the subscription and stops forwarding Exchange logs to the stream. (Alpha version)

DELETE FROM ovh.email_exchange.service_log_subscriptions
WHERE exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;