Skip to main content

event_routes

Creates, updates, deletes, gets or lists an event_routes resource.

Overview

Nameevent_routes
TypeResource
Idazure.digital_twins_core.event_routes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe id of the event route.
endpointNamestringThe name of the endpoint this event route is bound to. Required.
filterstringAn expression which describes the events which are routed to the endpoint. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_idselectid, endpointtraceparent, tracestateRetrieves an event route. Status codes: * 200 OK * 404 Not Found * EventRouteNotFound - The event route was not found.
listselectendpointtraceparent, tracestate, max-items-per-pageRetrieves all event routes. Status codes: * 200 OK.
deletedeleteid, endpointtraceparent, tracestateDeletes an event route. Status codes: * 204 No Content * 404 Not Found * EventRouteNotFound - The event route was not found.
addexecid, endpoint, endpointName, filtertraceparent, tracestateAdds or replaces an event route. Status codes: * 204 No Content * 400 Bad Request * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active. * EventRouteFilterInvalid - The event route filter is invalid. * EventRouteIdInvalid - The event route id is invalid. * LimitExceeded - The maximum number of event routes allowed has been reached.

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
endpointstringThe service endpoint host (no scheme). (default: )
idstringThe id for an event route. The id is unique within event routes and case sensitive. Required.
max-items-per-pageinteger
traceparentstring
tracestatestring

SELECT examples

Retrieves an event route. Status codes: * 200 OK * 404 Not Found * EventRouteNotFound - The event route was not found.

SELECT
id,
endpointName,
filter
FROM azure.digital_twins_core.event_routes
WHERE id = '{{ id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;

DELETE examples

Deletes an event route. Status codes: * 204 No Content * 404 Not Found * EventRouteNotFound - The event route was not found.

DELETE FROM azure.digital_twins_core.event_routes
WHERE id = '{{ id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;

Lifecycle Methods

Adds or replaces an event route. Status codes: * 204 No Content * 400 Bad Request * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active. * EventRouteFilterInvalid - The event route filter is invalid. * EventRouteIdInvalid - The event route id is invalid. * LimitExceeded - The maximum number of event routes allowed has been reached.

EXEC azure.digital_twins_core.event_routes.add 
@id='{{ id }}' --required,
@endpoint='{{ endpoint }}' --required,
@traceparent='{{ traceparent }}',
@tracestate='{{ tracestate }}'
@@json=
'{
"endpointName": "{{ endpointName }}",
"filter": "{{ filter }}"
}'
;