import { IotHubGatewayServiceAPIsModels as Models } from '../pl/iotHubGatewayServiceAPIs'; import { IoTHubTokenCredentials } from '../auth/iothub_token_credentials'; /** * @export * @type Device Type alias to simplify the auto generated type's name */ export type Device = Models.Device; /** * @export * @type Module Type alias to simplify the auto generated type's name */ export type Module = Models.Module; /** * @export * @type DevicesGetIdentityResponse Type alias to simplify the auto generated type's name */ export type DevicesGetIdentityResponse = Models.DevicesGetIdentityResponse; /** * @export * @type DevicesCreateOrUpdateIdentityResponse Type alias to simplify the auto generated type's name */ export type DevicesCreateOrUpdateIdentityResponse = Models.DevicesCreateOrUpdateIdentityResponse; /** * @export * @type DevicesGetDevicesResponse Type alias to simplify the auto generated type's name */ export type DevicesGetDevicesResponse = Models.DevicesGetDevicesResponse; /** * @export * @type ModulesCreateOrUpdateIdentityResponse Type alias to simplify the auto generated type's name */ export type ModulesCreateOrUpdateIdentityResponse = Models.ModulesCreateOrUpdateIdentityResponse; /** * @export * @type ModulesGetIdentityResponse Type alias to simplify the auto generated type's name */ export type ModulesGetIdentityResponse = Models.ModulesGetIdentityResponse; /** * @export * @type ModulesGetModulesOnDeviceResponse Type alias to simplify the auto generated type's name */ export type ModulesGetModulesOnDeviceResponse = Models.ModulesGetModulesOnDeviceResponse; /** * @export * @type ModulesDeleteIdentityOptionalParams Type alias to simplify the auto generated type's name */ export type ModulesDeleteIdentityOptionalParams = Models.ModulesDeleteIdentityOptionalParams; /** * @export * @type StatisticsGetServiceStatisticsResponse Type alias to simplify the auto generated type's name */ export type StatisticsGetServiceStatisticsResponse = Models.StatisticsGetServiceStatisticsResponse; /** * @export * @type StatisticsGetDeviceStatisticsResponse Type alias to simplify the auto generated type's name */ export type StatisticsGetDeviceStatisticsResponse = Models.StatisticsGetDeviceStatisticsResponse; /** * @export * @type DevicesGetDevicesOptionalParams Type alias to simplify the auto generated type's name */ export type DevicesGetDevicesOptionalParams = Models.DevicesGetDevicesOptionalParams; /** * @export * @type BulkRegistryUpdateRegistryResponse Type alias to simplify the auto generated type's name */ export type BulkRegistryUpdateRegistryResponse = Models.BulkRegistryUpdateRegistryResponse; /** * @export * @type ExportImportDevice Type alias to simplify the auto generated type's name */ export type ExportImportDevice = Models.ExportImportDevice; /** * @export * @type QuerySpecification Type alias to simplify the auto generated type's name */ export type QuerySpecification = Models.QuerySpecification; /** * @export * @type QueryGetTwinsResponse Type alias to simplify the auto generated type's name */ export type QueryGetTwinsResponse = Models.QueryGetTwinsResponse; /** * @export * @type DevicesGetTwinResponse Type alias to simplify the auto generated type's name */ export type DevicesGetTwinResponse = Models.DevicesGetTwinResponse; /** * @export * @type Twin Type alias to simplify the auto generated type's name */ export type Twin = Models.Twin; /** * @export * @type DevicesReplaceTwinResponse Type alias to simplify the auto generated type's name */ export type DevicesReplaceTwinResponse = Models.DevicesReplaceTwinResponse; /** * @export * @type DevicesUpdateTwinOptionalParams Type alias to simplify the auto generated type's name */ export type DevicesUpdateTwinOptionalParams = Models.DevicesUpdateTwinOptionalParams; /** * @export * @type ModulesGetTwinResponse Type alias to simplify the auto generated type's name */ export type ModulesGetTwinResponse = Models.ModulesGetTwinResponse; /** * @export * @type DevicesUpdateTwinResponse Type alias to simplify the auto generated type's name */ export type DevicesUpdateTwinResponse = Models.DevicesUpdateTwinResponse; /** * @export * @type ModulesReplaceTwinResponse Type alias to simplify the auto generated type's name */ export type ModulesReplaceTwinResponse = Models.ModulesReplaceTwinResponse; /** * @export * @type ModulesUpdateTwinOptionalParams Type alias to simplify the auto generated type's name */ export type ModulesUpdateTwinOptionalParams = Models.ModulesUpdateTwinOptionalParams; /** * @export * @type CloudToDeviceMethod Type alias to simplify the auto generated type's name */ export type CloudToDeviceMethod = Models.CloudToDeviceMethod; /** * @export * @type DevicesInvokeMethodResponse Type alias to simplify the auto generated type's name */ export type DevicesInvokeMethodResponse = Models.DevicesInvokeMethodResponse; /** * @export * @class IoTHubRegistryManager Main class to implement IoTHub Registry Manager Operations * based on the top of the auto generated IotHub REST APIs */ export declare class IoTHubRegistryManager { /** * @private * The IoTHub token credentials used for creating the Protocol Layer client. */ private _creds; /** * @private * The Protocol Layer Client instance used by the DigitalTwinClient. */ private _pl; /** * @private * The Azure IoT service's API version. */ private _apiVersion; /** * Constructor which also creates an instance of the Protocol Layer Client used by the DigitalTwinClient. * * @param {IoTHubTokenCredentials} creds The IoTHub token credentials used for creating the Protocol Layer client. * @memberof DigitalTwinClient */ constructor(creds: IoTHubTokenCredentials); /** * @method createDeviceWithSas module: azure-iot-digitaltwins-service.IoTHubRegistryManager.createDeviceWithSas * @description Creates a device identity on IoTHub using SAS authentication. * @param {string} deviceId The name (Id) of the device. * @param {string} primaryKey Primary authentication key. * @param {string} secondaryKey Secondary authentication key. * @param {boolean} isEnabled The status of the device. If the status disabled, a device cannot connect to the service. * @returns Promise The return object containing the created device and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ createDeviceWithSas(deviceId: string, primaryKey: string, secondaryKey: string, isEnabled: boolean): Promise; /** * @method createDeviceWithX509 module: azure-iot-digitaltwins-service.IoTHubRegistryManager.createDeviceWithX509 * @description Creates a device identity on IoTHub using X509 authentication. * @param {string} deviceId The name (Id) of the device. * @param {string} primaryThumbprint Primary X509 thumbprint. * @param {string} secondaryThumbprint Secondary X509 thumbprint. * @param {boolean} isEnabled The status of the device. If the status disabled, a device cannot connect to the service. * @param {boolean} iotEdge The device is part of a IoTEdge or not. * @returns Promise The return object containing the created device and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ createDeviceWithX509(deviceId: string, primaryThumbprint: string, secondaryThumbprint: string, isEnabled: boolean, iotEdge?: boolean): Promise; /** * @method createDeviceWithCertificateAuthority module: azure-iot-digitaltwins-service.IoTHubRegistryManager.createDeviceWithCertificateAuthority * @description Creates a device identity on IoTHub using X509 authentication. * @param {string} deviceId The name (Id) of the device. * @param {boolean} isEnabled The status of the device. If the status disabled, a device cannot connect to the service. * @param {boolean} iotEdge The device is part of a IoTEdge or not. * @returns Promise The return object containing the created device and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ createDeviceWithCertificateAuthority(deviceId: string, isEnabled: boolean, iotEdge?: boolean): Promise; /** * @method updateDevice module: azure-iot-digitaltwins-service.IoTHubRegistryManager.updateDevice * @description Updates a device identity on IoTHub * @param {string} deviceId The name (Id) of the device. * @param {Device} device The contents of the device identity. * @returns Promise The return object containing the updated device and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ updateDevice(deviceId: string, device: Device): Promise; /** * @method getDevice module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getDevice * @description Retrieves a device identity from IoTHub. * @param {string} deviceId The name (Id) of the device. * @returns Promise The return object containing the device and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getDevice(deviceId: string): Promise; /** * @method deleteDevice module: azure-iot-digitaltwins-service.IoTHubRegistryManager.deleteDevice * @description Deletes a device identity from IoTHub. * @param {string} deviceId The name (Id) of the device. * @returns void None * @memberof IoTHubRegistryManager */ deleteDevice(deviceId: string, eTag?: string): void; /** * @method createModuleWithSas module: azure-iot-digitaltwins-service.IoTHubRegistryManager.createModuleWithSas * @description Creates a module identity for a device on IoTHub using SAS authentication. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {string} managed_by The name of the manager device (edge). * @param {string} primaryKey Primary authentication key. * @param {string} secondaryKey Secondary authentication key. * @returns Promise The return object containing the created module and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ createModuleWithSas(deviceId: string, moduleId: string, managedBy: string, primaryKey: string, secondaryKey: string): Promise; /** * @method createModuleWithX509 module: azure-iot-digitaltwins-service.IoTHubRegistryManager.createModuleWithX509 * @description Creates a module identity for a device on IoTHub using X509 authentication. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {string} managed_by The name of the manager device (edge). * @param {string} primaryThumbprint Primary X509 thumbprint. * @param {string} secondaryThumbprint Secondary X509 thumbprint. * @returns Promise The return object containing the created module and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ createModuleWithX509(deviceId: string, moduleId: string, managedBy: string, primaryThumbprint: string, secondaryThumbprint: string): Promise; /** * @method createModuleWithCertificateAuthority module: azure-iot-digitaltwins-service.IoTHubRegistryManager.createModuleWithCertificateAuthority * @description Creates a module identity for a device on IoTHub using certificate authority. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {string} managed_by The name of the manager device (edge). * @returns Promise The return object containing the created module and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ createModuleWithCertificateAuthority(deviceId: string, moduleId: string, managedBy: string): Promise; /** * @method updateModule module: azure-iot-digitaltwins-service.IoTHubRegistryManager.updateModule * @description Updates a module identity for a device on IoTHub using SAS authentication. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {Module} module The contents of the module identity. * @returns Promise The return object containing the updated module and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ updateModule(deviceId: string, moduleId: string, module: Module): Promise; /** * @method getModule module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getModule * @description Retrieves a module identity for a device from IoTHub. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @returns Promise The return object containing the module and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getModule(deviceId: string, moduleId: string): Promise; /** * @method getModules module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getModules * @description Retrieves all module identities on a device. * @param {string} deviceId The name (Id) of the device. * @returns Promise The return object containing the array of modules and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getModules(deviceId: string): Promise; /** * @method deleteModule module: azure-iot-digitaltwins-service.IoTHubRegistryManager.deleteModule * @description Deletes a module identity for a device from IoTHub. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @returns void * @memberof IoTHubRegistryManager */ deleteModule(deviceId: string, moduleId: string, eTag?: string): void; /** * @method getServiceStatistics module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getServiceStatistics * @description Retrieves the IoTHub service statistics. * @returns Promise The return object containing the service statistics and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getServiceStatistics(): Promise; /** * @method getDeviceRegistryStatistics module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getDeviceRegistryStatistics * @description Retrieves the IoTHub device registry statistics. * @returns Promise The return object containing the registry statistics and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getDeviceRegistryStatistics(): Promise; /** * @method getDevices module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getDevices * @description Get the identities of multiple devices from the IoTHub identity * registry. Not recommended. Use the IoTHub query language to retrieve * device twin and device identity information. See * https://docs.microsoft.com/en-us/rest/api/iothub/service/queryiothub * and * https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-query-language * for more information. * @param {number} maxNumberOfDevices This parameter when specified, defines the maximum number * of device identities that are returned. Any value outside the range of * 1-1000 is considered to be 1000. * @returns Promise The return object containing the array of devices and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getDevices(maxNumberOfDevices: number): Promise; /** * @method bulkCreateOrUpdateDevices module: azure-iot-digitaltwins-service.IoTHubRegistryManager.bulkCreateOrUpdateDevices * @description Create, update, or delete the identities of multiple devices from the * IoTHub identity registry. * Create, update, or delete the identities of multiple devices from the * IoTHub 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). * @param {ExportImportDevice[]} devices The list of device objects to operate on. * @returns Promise The return object containing the bulk update result and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ bulkCreateOrUpdateDevices(devices: ExportImportDevice[]): Promise; /** * @method queryIoTHub module: azure-iot-digitaltwins-service.IoTHubRegistryManager.queryIoTHub * @description Query an IoTHub 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. * @param {QuerySpecification} querySpecification The query specification. * @returns Promise The return object containing the query result and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ queryIoTHub(querySpecification: QuerySpecification): Promise; /** * @method getTwin module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getTwin * @description Gets a device twin. * @param {string} deviceId The name (Id) of the device. * @returns Promise The return object containing the twin and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getTwin(deviceId: string): Promise; /** * @method replaceTwin module: azure-iot-digitaltwins-service.IoTHubRegistryManager.replaceTwin * @description Replaces tags and desired properties of a device twin. * @param {string} deviceId The name (Id) of the device. * @param {Twin} deviceTwin The twin info of the device. * @returns Promise The return object containing the twin and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ replaceTwin(deviceId: string, deviceTwin: Twin): Promise; /** * @method updateTwin module: azure-iot-digitaltwins-service.IoTHubRegistryManager.updateTwin * @description Updates tags and desired properties of a device twin. * @param {string} deviceId The name (Id) of the device. * @param {Twin} deviceTwin The twin info of the device. * @param {string} eTag The etag (if_match) value to use for the update operation. * @returns Promise The return object containing the twin and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ updateTwin(deviceId: string, deviceTwin: Twin, eTag: string): Promise; /** * @method getModuleTwin module: azure-iot-digitaltwins-service.IoTHubRegistryManager.getModuleTwin * @description Gets a module twin. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @returns Promise The return object containing the twin and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ getModuleTwin(deviceId: string, moduleId: string): Promise; /** * @method replaceModuleTwin module: azure-iot-digitaltwins-service.IoTHubRegistryManager.replaceModuleTwin * @description Replaces tags and desired properties of a module twin. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {Twin} moduleTwin The twin info of the module. * @returns Promise The return object containing the twin and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ replaceModuleTwin(deviceId: string, moduleId: string, moduleTwin: Twin): Promise; /** * @method updateModuleTwin module: azure-iot-digitaltwins-service.IoTHubRegistryManager.updateModuleTwin * @description Updates tags and desired properties of a module twin. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {Twin} moduleTwin The twin info of the module. * @param {string} eTag The etag (if_match) value to use for the update operation. * @returns Promise The return object containing the twin and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ updateModuleTwin(deviceId: string, moduleId: string, moduleTwin: Twin, eTag: string): Promise; /** * @method invokeDeviceMethod module: azure-iot-digitaltwins-service.IoTHubRegistryManager.invokeDeviceMethod * @description Invoke a direct method on a device. * @param {string} deviceId The name (Id) of the device. * @param {CloudToDeviceMethod} directMethodRequest The method request. * @returns Promise The return object containing the result of the method call and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ invokeDeviceMethod(deviceId: string, directMethodRequest: CloudToDeviceMethod): Promise; /** * @method invokeDeviceModuleMethod module: azure-iot-digitaltwins-service.IoTHubRegistryManager.invokeDeviceModuleMethod * @description Invoke a direct method on a module of a device. * @param {string} deviceId The name (Id) of the device. * @param {string} moduleId The name (Id) of the module. * @param {CloudToDeviceMethod} directMethodRequest The method request. * @returns Promise The return object containing the result of the method call and the parsed HttpResponse. * @memberof IoTHubRegistryManager */ invokeDeviceModuleMethod(deviceId: string, moduleId: string, directMethodRequest: CloudToDeviceMethod): Promise; }