共用方式為


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
String

The Id of the event route.

cancellationToken
CancellationToken

The cancellation token.

Returns

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.

The exception is thrown when eventRouteId is null.

Remarks

For more samples, see our repo samples.

Applies to

See also