public final class QueryClient extends Object
Constructor and Description |
---|
QueryClient(String connectionString)
Constructor to create instance from connection string
|
QueryClient(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential)
Create a new QueryClient instance.
|
QueryClient(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential,
QueryClientOptions options)
Create a new QueryClient instance.
|
QueryClient(String connectionString,
QueryClientOptions options)
Constructor to create instance from connection string
|
QueryClient(String hostName,
com.azure.core.credential.TokenCredential credential)
Create a new QueryClient instance.
|
QueryClient(String hostName,
com.azure.core.credential.TokenCredential credential,
QueryClientOptions options)
Create a new QueryClient instance.
|
Modifier and Type | Method and Description |
---|---|
JobQueryResponse |
queryJobs(ScheduledJobType jobType,
ScheduledJobStatus jobStatus)
Query from your IoT Hub's set of scheduled jobs by job type and job status.
|
JobQueryResponse |
queryJobs(ScheduledJobType jobType,
ScheduledJobStatus jobStatus,
QueryPageOptions options)
Query from your IoT Hub's set of scheduled jobs by job type and job status.
|
JobQueryResponse |
queryJobs(String query)
Query from your IoT Hub's set of scheduled jobs.
|
JobQueryResponse |
queryJobs(String query,
QueryPageOptions options)
Query from your IoT Hub's set of scheduled jobs.
|
RawQueryResponse |
queryRaw(String query)
Query miscellaneous data from your IoT Hub.
|
RawQueryResponse |
queryRaw(String query,
QueryPageOptions options)
Query miscellaneous data from your IoT Hub.
|
TwinQueryResponse |
queryTwins(String query)
Query from your IoT Hub's set of Twins.
|
TwinQueryResponse |
queryTwins(String query,
QueryPageOptions options)
Query from your IoT Hub's set of Twins.
|
public QueryClient(String connectionString)
connectionString
- The IoT Hub connection stringpublic QueryClient(String connectionString, QueryClientOptions options)
connectionString
- The IoT Hub connection stringoptions
- The connection options to use when connecting to the service.public QueryClient(String hostName, com.azure.core.credential.TokenCredential credential)
hostName
- The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")credential
- The custom TokenCredential
that will provide authentication tokens to
this library when they are needed. The provided tokens must be Json Web Tokens.public QueryClient(String hostName, com.azure.core.credential.TokenCredential credential, QueryClientOptions options)
hostName
- The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")credential
- The custom TokenCredential
that will provide authentication tokens to
this library when they are needed. The provided tokens must be Json Web Tokens.options
- The connection options to use when connecting to the service.public QueryClient(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential)
hostName
- The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")azureSasCredential
- The SAS token provider that will be used for authentication.public QueryClient(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential, QueryClientOptions options)
hostName
- The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")azureSasCredential
- The SAS token provider that will be used for authentication.options
- The connection options to use when connecting to the service.public TwinQueryResponse queryTwins(String query) throws IOException, IotHubException
query
- The IoT Hub query for selecting which twins to getJob.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as an incorrectly formatted query.public TwinQueryResponse queryTwins(String query, QueryPageOptions options) throws IOException, IotHubException
query
- The IoT Hub query for selecting which twins to getJob.options
- The optional parameters used to decide how the query's results are returned.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as an incorrectly formatted query.public JobQueryResponse queryJobs(String query) throws IOException, IotHubException
query
- The IoT Hub query for selecting which jobs to getJob.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as an incorrectly formatted query.public JobQueryResponse queryJobs(String query, QueryPageOptions options) throws IOException, IotHubException
query
- The IoT Hub query for selecting which jobs to getJob.options
- The optional parameters used to decide how the query's results are returned. May not be null.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as an incorrectly formatted query.public JobQueryResponse queryJobs(ScheduledJobType jobType, ScheduledJobStatus jobStatus) throws IOException, IotHubException
jobType
- The type of the job (methods or twin).jobStatus
- The status of the job ("completed", for example)IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as throttling.public JobQueryResponse queryJobs(ScheduledJobType jobType, ScheduledJobStatus jobStatus, QueryPageOptions options) throws IOException, IotHubException
jobType
- The type of the job (methods or twin).jobStatus
- The status of the job ("completed", for example)options
- The optional parameters used to decide how the query's results are returned. May not be null.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as throttling.public RawQueryResponse queryRaw(String query) throws IOException, IotHubException
query
- The IoT Hub query for selecting what information should be returned.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as an incorrectly formatted query.public RawQueryResponse queryRaw(String query, QueryPageOptions options) throws IOException, IotHubException
query
- The IoT Hub query for selecting what information should be returned.options
- The optional parameters used to decide how the query's results are returned. May not be null.IOException
- If IoT Hub cannot be reached due to network level issues.IotHubException
- If the request fails for non-network level issues such as an incorrectly formatted query.Copyright © 2023. All rights reserved.