event_routes
Creates, updates, deletes, gets or lists an event_routes resource.
Overview
| Name | event_routes |
| Type | Resource |
| Id | azure.digital_twins_core.event_routes |
Fields
The following fields are returned by SELECT queries:
- get_by_id
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The id of the event route. |
endpointName | string | The name of the endpoint this event route is bound to. Required. |
filter | string | An expression which describes the events which are routed to the endpoint. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | The id of the event route. |
endpointName | string | The name of the endpoint this event route is bound to. Required. |
filter | string | An expression which describes the events which are routed to the endpoint. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_id | select | id, endpoint | traceparent, tracestate | Retrieves an event route. Status codes: * 200 OK * 404 Not Found * EventRouteNotFound - The event route was not found. |
list | select | endpoint | traceparent, tracestate, max-items-per-page | Retrieves all event routes. Status codes: * 200 OK. |
delete | delete | id, endpoint | traceparent, tracestate | Deletes an event route. Status codes: * 204 No Content * 404 Not Found * EventRouteNotFound - The event route was not found. |
add | exec | id, endpoint, endpointName, filter | traceparent, tracestate | 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. |
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 |
|---|---|---|
endpoint | string | The service endpoint host (no scheme). (default: ) |
id | string | The id for an event route. The id is unique within event routes and case sensitive. Required. |
max-items-per-page | integer | |
traceparent | string | |
tracestate | string |
SELECT examples
- get_by_id
- list
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 }}'
;
Retrieves all event routes. Status codes: * 200 OK.
SELECT
id,
endpointName,
filter
FROM azure.digital_twins_core.event_routes
WHERE endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
AND max-items-per-page = '{{ max-items-per-page }}'
;
DELETE examples
- delete
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
- add
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 }}"
}'
;