public class ConfigurationsClient extends Object
| Constructor and Description |
|---|
ConfigurationsClient(String connectionString)
Constructor to create instance from connection string
|
ConfigurationsClient(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential)
Create a new ConfigurationsClient instance.
|
ConfigurationsClient(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential,
ConfigurationsClientOptions options)
Create a new ConfigurationsClient instance.
|
ConfigurationsClient(String connectionString,
ConfigurationsClientOptions options)
Constructor to create instance from connection string
|
ConfigurationsClient(String hostName,
com.azure.core.credential.TokenCredential credential)
Create a new ConfigurationsClient instance.
|
ConfigurationsClient(String hostName,
com.azure.core.credential.TokenCredential credential,
ConfigurationsClientOptions options)
Create a new ConfigurationsClient instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyConfigurationContentOnDevice(String deviceId,
ConfigurationContent content)
Apply the provided configuration content to the provided device
|
Configuration |
create(Configuration configuration)
Create a new configuration using the given Configuration object
Return with the response configuration object from IotHub
|
void |
delete(Configuration configuration)
Send remove configuration request and verify response
|
void |
delete(String configurationId)
Send remove configuration request and verify response
|
List<Configuration> |
get(int maxCount)
Get list of Configuration
|
Configuration |
get(String configurationId)
Get configuration by configuration Id from IotHub
|
Configuration |
replace(Configuration configuration)
Update configuration not forced
|
public ConfigurationsClient(String connectionString)
connectionString - The iot hub connection stringpublic ConfigurationsClient(String connectionString, ConfigurationsClientOptions options)
connectionString - The iot hub connection stringoptions - The connection options to use when connecting to the service.public ConfigurationsClient(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 ConfigurationsClient(String hostName, com.azure.core.credential.TokenCredential credential, ConfigurationsClientOptions 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 ConfigurationsClient(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 ConfigurationsClient(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential, ConfigurationsClientOptions 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 Configuration create(Configuration configuration) throws IOException, IotHubException
configuration - The configuration object to createIOException - This exception is thrown if the IO operation failedIotHubException - This exception is thrown if the response verification failedpublic Configuration get(String configurationId) throws IOException, IotHubException
configurationId - The id of requested configurationIOException - This exception is thrown if the IO operation failedIotHubException - This exception is thrown if the response verification failedpublic List<Configuration> get(int maxCount) throws IOException, IotHubException
maxCount - The requested count of configurationsIOException - This exception is thrown if the IO operation failedIotHubException - This exception is thrown if the response verification failedpublic Configuration replace(Configuration configuration) throws IOException, IotHubException
configuration - The configuration object containing updated dataIOException - This exception is thrown if the IO operation failedIotHubException - This exception is thrown if the response verification failedpublic void delete(String configurationId) throws IOException, IotHubException
configurationId - The configuration to be removedIOException - This exception is thrown if the IO operation failedIotHubException - This exception is thrown if the response verification failedpublic void delete(Configuration configuration) throws IOException, IotHubException
configuration - The configuration to be removedIOException - This exception is thrown if the IO operation failedIotHubException - This exception is thrown if the response verification failedpublic void applyConfigurationContentOnDevice(String deviceId, ConfigurationContent content) throws IOException, IotHubException
deviceId - The device to apply the configuration tocontent - The configuration content to apply to the deviceIOException - If the iot hub cannot be reachedIotHubException - If the response from the hub was an error code. This exception will contain that codeCopyright © 2024. All rights reserved.