public final class DevicesClient extends Object
Modifier and Type | Method and Description |
---|---|
Group |
createOrUpdateGroup(String groupId,
Group group)
Create or update a device group.
|
com.azure.core.http.rest.Response<Group> |
createOrUpdateGroupWithResponse(String groupId,
Group group,
com.azure.core.util.Context context)
Create or update a device group.
|
void |
deleteGroup(String groupId)
Deletes a device group.
|
com.azure.core.http.rest.Response<Void> |
deleteGroupWithResponse(String groupId,
com.azure.core.util.Context context)
Deletes a device group.
|
com.azure.core.http.rest.PagedIterable<DeviceClass> |
getAllDeviceClasses()
Gets a list of all device classes (unique combinations of device manufacturer and model) for all devices
connected to Device Update for IoT Hub.
|
com.azure.core.http.rest.PagedIterable<DeviceClass> |
getAllDeviceClasses(com.azure.core.util.Context context)
Gets a list of all device classes (unique combinations of device manufacturer and model) for all devices
connected to Device Update for IoT Hub.
|
com.azure.core.http.rest.PagedIterable<Device> |
getAllDevices(String filter)
Gets a list of devices connected to Device Update for IoT Hub.
|
com.azure.core.http.rest.PagedIterable<Device> |
getAllDevices(String filter,
com.azure.core.util.Context context)
Gets a list of devices connected to Device Update for IoT Hub.
|
com.azure.core.http.rest.PagedIterable<DeviceTag> |
getAllDeviceTags()
Gets a list of available group device tags for all devices connected to Device Update for IoT Hub.
|
com.azure.core.http.rest.PagedIterable<DeviceTag> |
getAllDeviceTags(com.azure.core.util.Context context)
Gets a list of available group device tags for all devices connected to Device Update for IoT Hub.
|
com.azure.core.http.rest.PagedIterable<Group> |
getAllGroups()
Gets a list of all device groups.
|
com.azure.core.http.rest.PagedIterable<Group> |
getAllGroups(com.azure.core.util.Context context)
Gets a list of all device groups.
|
Device |
getDevice(String deviceId)
Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub.
|
DeviceClass |
getDeviceClass(String deviceClassId)
Gets the properties of a device class.
|
com.azure.core.http.rest.PagedIterable<String> |
getDeviceClassDeviceIds(String deviceClassId)
Gets a list of device identifiers in a device class.
|
com.azure.core.http.rest.PagedIterable<String> |
getDeviceClassDeviceIds(String deviceClassId,
com.azure.core.util.Context context)
Gets a list of device identifiers in a device class.
|
com.azure.core.http.rest.PagedIterable<UpdateId> |
getDeviceClassInstallableUpdates(String deviceClassId)
Gets a list of installable updates for a device class.
|
com.azure.core.http.rest.PagedIterable<UpdateId> |
getDeviceClassInstallableUpdates(String deviceClassId,
com.azure.core.util.Context context)
Gets a list of installable updates for a device class.
|
com.azure.core.http.rest.Response<DeviceClass> |
getDeviceClassWithResponse(String deviceClassId,
com.azure.core.util.Context context)
Gets the properties of a device class.
|
DeviceTag |
getDeviceTag(String tagName)
Gets a count of how many devices have a device tag.
|
com.azure.core.http.rest.Response<DeviceTag> |
getDeviceTagWithResponse(String tagName,
com.azure.core.util.Context context)
Gets a count of how many devices have a device tag.
|
com.azure.core.http.rest.Response<Device> |
getDeviceWithResponse(String deviceId,
com.azure.core.util.Context context)
Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub.
|
Group |
getGroup(String groupId)
Gets the properties of a group.
|
com.azure.core.http.rest.PagedIterable<UpdatableDevices> |
getGroupBestUpdates(String groupId,
String filter)
Get the best available updates for a group and a count of how many devices need each update.
|
com.azure.core.http.rest.PagedIterable<UpdatableDevices> |
getGroupBestUpdates(String groupId,
String filter,
com.azure.core.util.Context context)
Get the best available updates for a group and a count of how many devices need each update.
|
UpdateCompliance |
getGroupUpdateCompliance(String groupId)
Get group update compliance information such as how many devices are on their latest update, how many need new
updates, and how many are in progress on receiving a new update.
|
com.azure.core.http.rest.Response<UpdateCompliance> |
getGroupUpdateComplianceWithResponse(String groupId,
com.azure.core.util.Context context)
Get group update compliance information such as how many devices are on their latest update, how many need new
updates, and how many are in progress on receiving a new update.
|
com.azure.core.http.rest.Response<Group> |
getGroupWithResponse(String groupId,
com.azure.core.util.Context context)
Gets the properties of a group.
|
UpdateCompliance |
getUpdateCompliance()
Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress
receiving new updates.
|
com.azure.core.http.rest.Response<UpdateCompliance> |
getUpdateComplianceWithResponse(com.azure.core.util.Context context)
Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress
receiving new updates.
|
public com.azure.core.http.rest.PagedIterable<DeviceClass> getAllDeviceClasses()
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<DeviceClass> getAllDeviceClasses(com.azure.core.util.Context context)
context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public DeviceClass getDeviceClass(String deviceClassId)
deviceClassId
- Device class identifier.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<DeviceClass> getDeviceClassWithResponse(String deviceClassId, com.azure.core.util.Context context)
deviceClassId
- Device class identifier.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<String> getDeviceClassDeviceIds(String deviceClassId)
deviceClassId
- Device class identifier.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<String> getDeviceClassDeviceIds(String deviceClassId, com.azure.core.util.Context context)
deviceClassId
- Device class identifier.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<UpdateId> getDeviceClassInstallableUpdates(String deviceClassId)
deviceClassId
- Device class identifier.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<UpdateId> getDeviceClassInstallableUpdates(String deviceClassId, com.azure.core.util.Context context)
deviceClassId
- Device class identifier.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<Device> getAllDevices(String filter)
filter
- Restricts the set of devices returned. You can only filter on device GroupId.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<Device> getAllDevices(String filter, com.azure.core.util.Context context)
filter
- Restricts the set of devices returned. You can only filter on device GroupId.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public Device getDevice(String deviceId)
deviceId
- Device identifier in Azure IOT Hub.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Device> getDeviceWithResponse(String deviceId, com.azure.core.util.Context context)
deviceId
- Device identifier in Azure IOT Hub.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public UpdateCompliance getUpdateCompliance()
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<UpdateCompliance> getUpdateComplianceWithResponse(com.azure.core.util.Context context)
context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<DeviceTag> getAllDeviceTags()
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<DeviceTag> getAllDeviceTags(com.azure.core.util.Context context)
context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public DeviceTag getDeviceTag(String tagName)
tagName
- Tag name.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<DeviceTag> getDeviceTagWithResponse(String tagName, com.azure.core.util.Context context)
tagName
- Tag name.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<Group> getAllGroups()
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<Group> getAllGroups(com.azure.core.util.Context context)
context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public Group getGroup(String groupId)
groupId
- Group identifier.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Group> getGroupWithResponse(String groupId, com.azure.core.util.Context context)
groupId
- Group identifier.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public Group createOrUpdateGroup(String groupId, Group group)
groupId
- Group identifier.group
- The group properties.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Group> createOrUpdateGroupWithResponse(String groupId, Group group, com.azure.core.util.Context context)
groupId
- Group identifier.group
- The group properties.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void deleteGroup(String groupId)
groupId
- Group identifier.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> deleteGroupWithResponse(String groupId, com.azure.core.util.Context context)
groupId
- Group identifier.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public UpdateCompliance getGroupUpdateCompliance(String groupId)
groupId
- Group identifier.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<UpdateCompliance> getGroupUpdateComplianceWithResponse(String groupId, com.azure.core.util.Context context)
groupId
- Group identifier.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<UpdatableDevices> getGroupBestUpdates(String groupId, String filter)
groupId
- Group identifier.filter
- Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version
property.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.PagedIterable<UpdatableDevices> getGroupBestUpdates(String groupId, String filter, com.azure.core.util.Context context)
groupId
- Group identifier.filter
- Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version
property.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.Copyright © 2021 Microsoft Corporation. All rights reserved.