DigitalTwinsClient.GetEventRouteAsync(String, CancellationToken) Method

Definition

Gets an event route by Id asynchronously.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.DigitalTwins.Core.DigitalTwinsEventRoute>> GetEventRouteAsync (string eventRouteId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEventRouteAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.DigitalTwins.Core.DigitalTwinsEventRoute>>
override this.GetEventRouteAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.DigitalTwins.Core.DigitalTwinsEventRoute>>
Public Overridable Function GetEventRouteAsync (eventRouteId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DigitalTwinsEventRoute))

Parameters

eventRouteId
System.String

The Id of the event route.

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<Response<DigitalTwinsEventRoute>>

The application/json event routes and the http response Response<T>.

Exceptions

The exception that captures the errors from the service. Check the ErrorCode and Status properties for more details.

System.ArgumentNullException

The exception is thrown when eventRouteId is null.

Remarks

For more samples, see our repo samples.

Applies to