DevicesClient.GetJobsAsync(CancellationToken) Method

Definition

List all registry jobs for the IoT hub.

public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.IotHubJobResponse>> GetJobsAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetJobsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Devices.IotHubJobResponse>>
override this.GetJobsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Devices.IotHubJobResponse>>
Public Overridable Function GetJobsAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of IotHubJobResponse))

Parameters

cancellationToken
CancellationToken

The token which allows the operation to be canceled.

Returns

IEnumerable of JobProperties of all jobs for this IoT hub.

Exceptions

If IoT hub responded to the request with a non-successful status code. For example, if the provided request was throttled, IotHubServiceException with ThrottlingException is thrown. For a complete list of possible error cases, see IotHubServiceErrorCode.

If the HTTP request fails due to an underlying issue such as network connectivity, DNS failure, or server certificate validation.

If the provided cancellation token has requested cancellation.

Applies to