RegistryManager class
Class representing a RegistryManager.
Constructors
Registry |
Create a RegistryManager. |
Methods
Constructor Details
RegistryManager(IotHubGatewayServiceAPIsContext)
Create a RegistryManager.
new RegistryManager(client: IotHubGatewayServiceAPIsContext)
Parameters
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): Promise<Models.RegistryManagerBulkDeviceCRUDResponse>
Parameters
- devices
- 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
- options
-
RequestOptionsBase
The optional parameters
- callback
-
ServiceCallback<BulkRegistryOperationResult>
The callback
bulkDeviceCRUD(ExportImportDevice[], ServiceCallback<BulkRegistryOperationResult>)
function bulkDeviceCRUD(devices: ExportImportDevice[], callback: ServiceCallback<BulkRegistryOperationResult>)
Parameters
- devices
- 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): Promise<Models.RegistryManagerCreateOrUpdateDeviceResponse>
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
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): Promise<Models.RegistryManagerCreateOrUpdateModuleResponse>
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
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): Promise<RestResponse>
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.
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): Promise<RestResponse>
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.
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): Promise<Models.RegistryManagerGetDeviceResponse>
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): Promise<Models.RegistryManagerGetDevicesResponse>
Parameters
- options
- Models.RegistryManagerGetDevicesOptionalParams
Returns
Promise<Models.RegistryManagerGetDevicesResponse>
Promise<Models.RegistryManagerGetDevicesResponse>
getDevices(RegistryManagerGetDevicesOptionalParams, ServiceCallback<Device[]>)
function getDevices(options: RegistryManagerGetDevicesOptionalParams, callback: ServiceCallback<Device[]>)
Parameters
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): Promise<Models.RegistryManagerGetDeviceStatisticsResponse>
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): Promise<Models.RegistryManagerGetModuleResponse>
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): Promise<Models.RegistryManagerGetModulesOnDeviceResponse>
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): Promise<Models.RegistryManagerGetServiceStatisticsResponse>
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): Promise<Models.RegistryManagerPurgeCommandQueueResponse>
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): Promise<Models.RegistryManagerQueryIotHubResponse>
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
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