RegistryManager class

Class representing a RegistryManager.

Constructors

RegistryManager(IotHubGatewayServiceAPIsContext)

Create a RegistryManager.

Methods

bulkDeviceCRUD(ExportImportDevice[], msRest.RequestOptionsBase)

Create, update, or delete the identiies of multiple devices from the IoT hub identity registry. A device identity can be specified only once in the list. Different operations (create, update, delete) on different devices are allowed. A maximum of 100 devices can be specified per invocation. For large scale operations, consider using the import feature using blob storage(https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities).

bulkDeviceCRUD(ExportImportDevice[], RequestOptionsBase, ServiceCallback<BulkRegistryOperationResult>)
bulkDeviceCRUD(ExportImportDevice[], ServiceCallback<BulkRegistryOperationResult>)
createOrUpdateDevice(string, Device, Models.RegistryManagerCreateOrUpdateDeviceOptionalParams)

Create or update the identity of a device in the identity registry of an IoT hub. An ETag must not be specified for the create operation. An ETag must be specified for the update operation. Note that generationId and deviceId cannot be updated by the user.

createOrUpdateDevice(string, Device, RegistryManagerCreateOrUpdateDeviceOptionalParams, ServiceCallback<Device>)
createOrUpdateDevice(string, Device, ServiceCallback<Device>)
createOrUpdateModule(string, string, Module, Models.RegistryManagerCreateOrUpdateModuleOptionalParams)
createOrUpdateModule(string, string, Module, RegistryManagerCreateOrUpdateModuleOptionalParams, ServiceCallback<Module>)
createOrUpdateModule(string, string, Module, ServiceCallback<Module>)
deleteDevice(string, Models.RegistryManagerDeleteDeviceOptionalParams)

Delete the identity of a device from the identity registry of an IoT hub. This request requires the If-Match header. The client may specify the ETag for the device identity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The delete operation is performed only if the ETag sent by the client matches the value maintained by the server, indicating that the device identity has not been modified since it was retrieved by the client. To force an unconditional delete, set If-Match to the wildcard character (*).

deleteDevice(string, RegistryManagerDeleteDeviceOptionalParams, ServiceCallback<void>)
deleteDevice(string, ServiceCallback<void>)
deleteModule(string, string, Models.RegistryManagerDeleteModuleOptionalParams)
deleteModule(string, string, RegistryManagerDeleteModuleOptionalParams, ServiceCallback<void>)
deleteModule(string, string, ServiceCallback<void>)
getDevice(string, msRest.RequestOptionsBase)

Retrieve a device from the identity registry of an IoT hub.

getDevice(string, RequestOptionsBase, ServiceCallback<Device>)
getDevice(string, ServiceCallback<Device>)
getDevices(Models.RegistryManagerGetDevicesOptionalParams)
getDevices(RegistryManagerGetDevicesOptionalParams, ServiceCallback<Device[]>)
getDevices(ServiceCallback<Device[]>)
getDeviceStatistics(msRest.RequestOptionsBase)
getDeviceStatistics(RequestOptionsBase, ServiceCallback<RegistryStatistics>)
getDeviceStatistics(ServiceCallback<RegistryStatistics>)
getModule(string, string, msRest.RequestOptionsBase)
getModule(string, string, RequestOptionsBase, ServiceCallback<Module>)
getModule(string, string, ServiceCallback<Module>)
getModulesOnDevice(string, msRest.RequestOptionsBase)
getModulesOnDevice(string, RequestOptionsBase, ServiceCallback<Module[]>)
getModulesOnDevice(string, ServiceCallback<Module[]>)
getServiceStatistics(msRest.RequestOptionsBase)
getServiceStatistics(RequestOptionsBase, ServiceCallback<ServiceStatistics>)
getServiceStatistics(ServiceCallback<ServiceStatistics>)
purgeCommandQueue(string, msRest.RequestOptionsBase)

Deletes all the pending commands for this device from the IoT hub

purgeCommandQueue(string, RequestOptionsBase, ServiceCallback<PurgeMessageQueueResult>)
purgeCommandQueue(string, ServiceCallback<PurgeMessageQueueResult>)
queryIotHub(QuerySpecification, Models.RegistryManagerQueryIotHubOptionalParams)

Query an IoT hub to retrieve information regarding device twins using a SQL-like language. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information. Pagination of results is supported. This returns information about device twins only.

queryIotHub(QuerySpecification, RegistryManagerQueryIotHubOptionalParams, ServiceCallback<Twin[]>)
queryIotHub(QuerySpecification, ServiceCallback<Twin[]>)

Constructor Details

RegistryManager(IotHubGatewayServiceAPIsContext)

Create a RegistryManager.

new RegistryManager(client: IotHubGatewayServiceAPIsContext)

Parameters

client
IotHubGatewayServiceAPIsContext

Reference to the service client.

Method Details

bulkDeviceCRUD(ExportImportDevice[], msRest.RequestOptionsBase)

Create, update, or delete the identiies of multiple devices from the IoT hub identity registry. A device identity can be specified only once in the list. Different operations (create, update, delete) on different devices are allowed. A maximum of 100 devices can be specified per invocation. For large scale operations, consider using the import feature using blob storage(https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities).

function bulkDeviceCRUD(devices: ExportImportDevice[], options?: msRest.RequestOptionsBase)

Parameters

devices

ExportImportDevice[]

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerBulkDeviceCRUDResponse>

Promise<Models.RegistryManagerBulkDeviceCRUDResponse>

bulkDeviceCRUD(ExportImportDevice[], RequestOptionsBase, ServiceCallback<BulkRegistryOperationResult>)

function bulkDeviceCRUD(devices: ExportImportDevice[], options: RequestOptionsBase, callback: ServiceCallback<BulkRegistryOperationResult>)

Parameters

devices

ExportImportDevice[]

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<BulkRegistryOperationResult>

The callback

bulkDeviceCRUD(ExportImportDevice[], ServiceCallback<BulkRegistryOperationResult>)

function bulkDeviceCRUD(devices: ExportImportDevice[], callback: ServiceCallback<BulkRegistryOperationResult>)

Parameters

devices

ExportImportDevice[]

callback

ServiceCallback<BulkRegistryOperationResult>

The callback

createOrUpdateDevice(string, Device, Models.RegistryManagerCreateOrUpdateDeviceOptionalParams)

Create or update the identity of a device in the identity registry of an IoT hub. An ETag must not be specified for the create operation. An ETag must be specified for the update operation. Note that generationId and deviceId cannot be updated by the user.

function createOrUpdateDevice(id: string, device: Device, options?: Models.RegistryManagerCreateOrUpdateDeviceOptionalParams)

Parameters

id

string

Device ID.

device
Device
options
Models.RegistryManagerCreateOrUpdateDeviceOptionalParams

Returns

Promise<Models.RegistryManagerCreateOrUpdateDeviceResponse>

Promise<Models.RegistryManagerCreateOrUpdateDeviceResponse>

createOrUpdateDevice(string, Device, RegistryManagerCreateOrUpdateDeviceOptionalParams, ServiceCallback<Device>)

function createOrUpdateDevice(id: string, device: Device, options: RegistryManagerCreateOrUpdateDeviceOptionalParams, callback: ServiceCallback<Device>)

Parameters

id

string

Device ID.

device
Device
options
RegistryManagerCreateOrUpdateDeviceOptionalParams

The optional parameters

callback

ServiceCallback<Device>

The callback

createOrUpdateDevice(string, Device, ServiceCallback<Device>)

function createOrUpdateDevice(id: string, device: Device, callback: ServiceCallback<Device>)

Parameters

id

string

Device ID.

device
Device
callback

ServiceCallback<Device>

The callback

createOrUpdateModule(string, string, Module, Models.RegistryManagerCreateOrUpdateModuleOptionalParams)

function createOrUpdateModule(id: string, mid: string, module: Module, options?: Models.RegistryManagerCreateOrUpdateModuleOptionalParams)

Parameters

id

string

Device ID.

mid

string

Module ID.

module
Module
options
Models.RegistryManagerCreateOrUpdateModuleOptionalParams

Returns

Promise<Models.RegistryManagerCreateOrUpdateModuleResponse>

Promise<Models.RegistryManagerCreateOrUpdateModuleResponse>

createOrUpdateModule(string, string, Module, RegistryManagerCreateOrUpdateModuleOptionalParams, ServiceCallback<Module>)

function createOrUpdateModule(id: string, mid: string, module: Module, options: RegistryManagerCreateOrUpdateModuleOptionalParams, callback: ServiceCallback<Module>)

Parameters

id

string

Device ID.

mid

string

Module ID.

module
Module
options
RegistryManagerCreateOrUpdateModuleOptionalParams

The optional parameters

callback

ServiceCallback<Module>

The callback

createOrUpdateModule(string, string, Module, ServiceCallback<Module>)

function createOrUpdateModule(id: string, mid: string, module: Module, callback: ServiceCallback<Module>)

Parameters

id

string

Device ID.

mid

string

Module ID.

module
Module
callback

ServiceCallback<Module>

The callback

deleteDevice(string, Models.RegistryManagerDeleteDeviceOptionalParams)

Delete the identity of a device from the identity registry of an IoT hub. This request requires the If-Match header. The client may specify the ETag for the device identity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The delete operation is performed only if the ETag sent by the client matches the value maintained by the server, indicating that the device identity has not been modified since it was retrieved by the client. To force an unconditional delete, set If-Match to the wildcard character (*).

function deleteDevice(id: string, options?: Models.RegistryManagerDeleteDeviceOptionalParams)

Parameters

id

string

Device ID.

options
Models.RegistryManagerDeleteDeviceOptionalParams

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteDevice(string, RegistryManagerDeleteDeviceOptionalParams, ServiceCallback<void>)

function deleteDevice(id: string, options: RegistryManagerDeleteDeviceOptionalParams, callback: ServiceCallback<void>)

Parameters

id

string

Device ID.

options
RegistryManagerDeleteDeviceOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

deleteDevice(string, ServiceCallback<void>)

function deleteDevice(id: string, callback: ServiceCallback<void>)

Parameters

id

string

Device ID.

callback

ServiceCallback<void>

The callback

deleteModule(string, string, Models.RegistryManagerDeleteModuleOptionalParams)

function deleteModule(id: string, mid: string, options?: Models.RegistryManagerDeleteModuleOptionalParams)

Parameters

id

string

Device ID.

mid

string

Module ID.

options
Models.RegistryManagerDeleteModuleOptionalParams

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteModule(string, string, RegistryManagerDeleteModuleOptionalParams, ServiceCallback<void>)

function deleteModule(id: string, mid: string, options: RegistryManagerDeleteModuleOptionalParams, callback: ServiceCallback<void>)

Parameters

id

string

Device ID.

mid

string

Module ID.

options
RegistryManagerDeleteModuleOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

deleteModule(string, string, ServiceCallback<void>)

function deleteModule(id: string, mid: string, callback: ServiceCallback<void>)

Parameters

id

string

Device ID.

mid

string

Module ID.

callback

ServiceCallback<void>

The callback

getDevice(string, msRest.RequestOptionsBase)

Retrieve a device from the identity registry of an IoT hub.

function getDevice(id: string, options?: msRest.RequestOptionsBase)

Parameters

id

string

Device ID.

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerGetDeviceResponse>

Promise<Models.RegistryManagerGetDeviceResponse>

getDevice(string, RequestOptionsBase, ServiceCallback<Device>)

function getDevice(id: string, options: RequestOptionsBase, callback: ServiceCallback<Device>)

Parameters

id

string

Device ID.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<Device>

The callback

getDevice(string, ServiceCallback<Device>)

function getDevice(id: string, callback: ServiceCallback<Device>)

Parameters

id

string

Device ID.

callback

ServiceCallback<Device>

The callback

getDevices(Models.RegistryManagerGetDevicesOptionalParams)

function getDevices(options?: Models.RegistryManagerGetDevicesOptionalParams)

Parameters

options
Models.RegistryManagerGetDevicesOptionalParams

Returns

Promise<Models.RegistryManagerGetDevicesResponse>

Promise<Models.RegistryManagerGetDevicesResponse>

getDevices(RegistryManagerGetDevicesOptionalParams, ServiceCallback<Device[]>)

function getDevices(options: RegistryManagerGetDevicesOptionalParams, callback: ServiceCallback<Device[]>)

Parameters

options
RegistryManagerGetDevicesOptionalParams

The optional parameters

callback

ServiceCallback<Device[]>

The callback

getDevices(ServiceCallback<Device[]>)

function getDevices(callback: ServiceCallback<Device[]>)

Parameters

callback

ServiceCallback<Device[]>

The callback

getDeviceStatistics(msRest.RequestOptionsBase)

function getDeviceStatistics(options?: msRest.RequestOptionsBase)

Parameters

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerGetDeviceStatisticsResponse>

Promise<Models.RegistryManagerGetDeviceStatisticsResponse>

getDeviceStatistics(RequestOptionsBase, ServiceCallback<RegistryStatistics>)

function getDeviceStatistics(options: RequestOptionsBase, callback: ServiceCallback<RegistryStatistics>)

Parameters

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<RegistryStatistics>

The callback

getDeviceStatistics(ServiceCallback<RegistryStatistics>)

function getDeviceStatistics(callback: ServiceCallback<RegistryStatistics>)

Parameters

callback

ServiceCallback<RegistryStatistics>

The callback

getModule(string, string, msRest.RequestOptionsBase)

function getModule(id: string, mid: string, options?: msRest.RequestOptionsBase)

Parameters

id

string

Device ID.

mid

string

Module ID.

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerGetModuleResponse>

Promise<Models.RegistryManagerGetModuleResponse>

getModule(string, string, RequestOptionsBase, ServiceCallback<Module>)

function getModule(id: string, mid: string, options: RequestOptionsBase, callback: ServiceCallback<Module>)

Parameters

id

string

Device ID.

mid

string

Module ID.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<Module>

The callback

getModule(string, string, ServiceCallback<Module>)

function getModule(id: string, mid: string, callback: ServiceCallback<Module>)

Parameters

id

string

Device ID.

mid

string

Module ID.

callback

ServiceCallback<Module>

The callback

getModulesOnDevice(string, msRest.RequestOptionsBase)

function getModulesOnDevice(id: string, options?: msRest.RequestOptionsBase)

Parameters

id

string

Device ID.

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerGetModulesOnDeviceResponse>

Promise<Models.RegistryManagerGetModulesOnDeviceResponse>

getModulesOnDevice(string, RequestOptionsBase, ServiceCallback<Module[]>)

function getModulesOnDevice(id: string, options: RequestOptionsBase, callback: ServiceCallback<Module[]>)

Parameters

id

string

Device ID.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<Module[]>

The callback

getModulesOnDevice(string, ServiceCallback<Module[]>)

function getModulesOnDevice(id: string, callback: ServiceCallback<Module[]>)

Parameters

id

string

Device ID.

callback

ServiceCallback<Module[]>

The callback

getServiceStatistics(msRest.RequestOptionsBase)

function getServiceStatistics(options?: msRest.RequestOptionsBase)

Parameters

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerGetServiceStatisticsResponse>

Promise<Models.RegistryManagerGetServiceStatisticsResponse>

getServiceStatistics(RequestOptionsBase, ServiceCallback<ServiceStatistics>)

function getServiceStatistics(options: RequestOptionsBase, callback: ServiceCallback<ServiceStatistics>)

Parameters

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<ServiceStatistics>

The callback

getServiceStatistics(ServiceCallback<ServiceStatistics>)

function getServiceStatistics(callback: ServiceCallback<ServiceStatistics>)

Parameters

callback

ServiceCallback<ServiceStatistics>

The callback

purgeCommandQueue(string, msRest.RequestOptionsBase)

Deletes all the pending commands for this device from the IoT hub

function purgeCommandQueue(id: string, options?: msRest.RequestOptionsBase)

Parameters

id

string

Device ID.

options
msRest.RequestOptionsBase

Returns

Promise<Models.RegistryManagerPurgeCommandQueueResponse>

Promise<Models.RegistryManagerPurgeCommandQueueResponse>

purgeCommandQueue(string, RequestOptionsBase, ServiceCallback<PurgeMessageQueueResult>)

function purgeCommandQueue(id: string, options: RequestOptionsBase, callback: ServiceCallback<PurgeMessageQueueResult>)

Parameters

id

string

Device ID.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<PurgeMessageQueueResult>

The callback

purgeCommandQueue(string, ServiceCallback<PurgeMessageQueueResult>)

function purgeCommandQueue(id: string, callback: ServiceCallback<PurgeMessageQueueResult>)

Parameters

id

string

Device ID.

callback

ServiceCallback<PurgeMessageQueueResult>

The callback

queryIotHub(QuerySpecification, Models.RegistryManagerQueryIotHubOptionalParams)

Query an IoT hub to retrieve information regarding device twins using a SQL-like language. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information. Pagination of results is supported. This returns information about device twins only.

function queryIotHub(querySpecification: QuerySpecification, options?: Models.RegistryManagerQueryIotHubOptionalParams)

Parameters

querySpecification
QuerySpecification
options
Models.RegistryManagerQueryIotHubOptionalParams

Returns

Promise<Models.RegistryManagerQueryIotHubResponse>

Promise<Models.RegistryManagerQueryIotHubResponse>

queryIotHub(QuerySpecification, RegistryManagerQueryIotHubOptionalParams, ServiceCallback<Twin[]>)

function queryIotHub(querySpecification: QuerySpecification, options: RegistryManagerQueryIotHubOptionalParams, callback: ServiceCallback<Twin[]>)

Parameters

querySpecification
QuerySpecification
options
RegistryManagerQueryIotHubOptionalParams

The optional parameters

callback

ServiceCallback<Twin[]>

The callback

queryIotHub(QuerySpecification, ServiceCallback<Twin[]>)

function queryIotHub(querySpecification: QuerySpecification, callback: ServiceCallback<Twin[]>)

Parameters

querySpecification
QuerySpecification
callback

ServiceCallback<Twin[]>

The callback