JobClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Job management.
public class JobClient : IDisposable
type JobClient = class
interface IDisposable
Public Class JobClient
Implements IDisposable
- Inheritance
-
JobClient
- Implements
Remarks
For more information, see https://github.com/Azure/azure-iot-sdk-csharp#iot-hub-service-sdk.
This client creates lifetime long instances of HttpClient that are tied to the URI of the IoT hub specified, configure any proxy settings, and connection lease timeout. For that reason, the instances are not static and an application using this client should create and save it for all use. Repeated creation may cause socket exhaustion.
Constructors
JobClient() |
Creates JobClient, provided for unit testing purposes only. |
Methods
CancelJobAsync(String, CancellationToken) |
Cancels/Deletes the job with the specified Id. |
CancelJobAsync(String) |
Cancels/Deletes the job with the specified Id. |
CloseAsync() |
Closes the JobClient instance and disposes its resources. |
Create(String, AzureSasCredential, HttpTransportSettings) |
Creates JobClient using a shared access signature provided and refreshed as necessary by the caller. |
Create(String, TokenCredential, HttpTransportSettings) |
Creates JobClient, authenticating using an identity in Azure Active Directory (AAD). |
CreateFromConnectionString(String, HttpTransportSettings) |
Creates JobClient from the IoT hub connection string and HTTP transport settings. |
CreateFromConnectionString(String) |
Creates JobClient from the IoT hub connection string. |
CreateQuery() |
Get IQuery through which job responses for all job types and statuses are retrieved page by page |
CreateQuery(Nullable<Int32>) |
Get IQuery through which job responses are retrieved page by page and specify page size |
CreateQuery(Nullable<JobType>, Nullable<JobStatus>, Nullable<Int32>) |
Get IQuery through which job responses for specified jobType and jobStatus are retrieved page by page, and specify page size |
CreateQuery(Nullable<JobType>, Nullable<JobStatus>) |
Get IQuery through which job responses for specified jobType and jobStatus are retrieved page by page |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources. |
GetJobAsync(String, CancellationToken) |
Gets the job with the specified Id. |
GetJobAsync(String) |
Gets the job with the specified Id. |
OpenAsync() |
Explicitly open the JobClient instance. |
ScheduleDeviceMethodAsync(String, String, CloudToDeviceMethod, DateTime, Int64, CancellationToken) |
Creates a new Job to run a device method on one or multiple devices |
ScheduleDeviceMethodAsync(String, String, CloudToDeviceMethod, DateTime, Int64) |
Creates a new Job to run a device method on one or multiple devices |
ScheduleTwinUpdateAsync(String, String, Twin, DateTime, Int64, CancellationToken) |
Creates a new Job to update twin tags and desired properties on one or multiple devices |
ScheduleTwinUpdateAsync(String, String, Twin, DateTime, Int64) |
Creates a new Job to update twin tags and desired properties on one or multiple devices |
Applies to
Azure SDK for .NET