QueryClient.CreateJobsQueryAsync(JobQueryOptions, CancellationToken) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
すべてのジョブに対してクエリを実行するか、種類や状態でジョブに対してクエリを実行します。
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.QueryResponse<Microsoft.Azure.Devices.ScheduledJob>> CreateJobsQueryAsync (Microsoft.Azure.Devices.JobQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateJobsQueryAsync : Microsoft.Azure.Devices.JobQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.QueryResponse<Microsoft.Azure.Devices.ScheduledJob>>
override this.CreateJobsQueryAsync : Microsoft.Azure.Devices.JobQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.QueryResponse<Microsoft.Azure.Devices.ScheduledJob>>
Public Overridable Function CreateJobsQueryAsync (Optional options As JobQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of QueryResponse(Of ScheduledJob))
パラメーター
- options
- JobQueryOptions
クエリを実行する省略可能なパラメーター。
- cancellationToken
- CancellationToken
タスクの取り消しトークン。
戻り値
クエリされたジョブの iterable セット。
例外
IoT ハブが失敗した状態コードで要求に応答した場合。 たとえば、指定された要求が調整された場合、 IotHubServiceException が ThrottlingException スローされます。 考えられるエラー ケースの完全な一覧については、「」を参照してください IotHubServiceErrorCode。
ネットワーク接続、DNS エラー、サーバー証明書の検証などの根本的な問題が原因で HTTP 要求が失敗した場合。
指定されたキャンセル トークンが取り消しを要求した場合。
例
QueryResponse<ScheduledJob> queriedJobs = await iotHubServiceClient.Query.CreateJobsQueryAsync();
while (await queriedJobs.MoveNextAsync())
{
Console.WriteLine(queriedJobs.Current.JobId);
}
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure SDK for .NET