Microsoft Azure SDK for Node.js - IoT Hub
This project provides a Node.js package that makes it easy to manage Microsoft Azure Iot Hub Resources.Right now it supports:
- Node.js version: 6.x.x or higher
How to Install
npm install azure-arm-iothub
How to Use
Authentication, client creation and listing iotHubs in a subscription as an example
var msRestAzure = ; var IoTHubClient = ; // Interactive Login msRestAzure;
Check if an IoT Hub name is available
var operationInputs = name: resourceName ; clientiotHubResource
Create an IoT Hub
var iotHubCreateParams = name: resourceName location: location subscriptionid: subscriptionId resourcegroup: resourceGroupName sku: name: 'S1' capacity: 2 properties: enableFileUploadNotifications: false ipFilterRules: filterName: "ipfilterrule" action: "accept" ipMask: "0.0.0.0/0" operationsMonitoringProperties: events: "C2DCommands": "Error" "DeviceTelemetry": "Error" "DeviceIdentityOperations": "Error" "Connections": "Error, Information" "features": "None" clientiotHubResource;
Update an IoT Hub
var iotHubUpdateParams = name: resourceName location: location subscriptionid: subscriptionId resourcegroup: resourceGroupName sku: name: 'S1' capacity: 3 properties: enableFileUploadNotifications: false ipFilterRules: filterName: "ipfilterrule2" action: "reject" ipMask: "192.168.0.0/10" operationsMonitoringProperties: events: "C2DCommands": "Error" "DeviceTelemetry": "Error" "DeviceIdentityOperations": "Error" "Connections": "Error, Information" "features": "None" clientiotHubResource;
Get an IoT Hub Description
clientiotHubResource;
Delete an IoT Hub
clientiotHubResource;
Get all IoT Hub Descriptions in a resourcegroup
clientiotHubResource;
Get IoT Hub Quota Metrics
clientiotHubResource;
Get Valid IoT Hub Skus
clientiotHubResource;
Get All IoT Hub Keys
clientiotHubResource;
Get a specific IoT Hub Key
clientiotHubResource;
Get all eventhub consumer groups
clientiotHubResource;
Add an eventhub consumer group
clientiotHubResource;
Get an eventhub consumer group
clientiotHubResource;
Delete an eventhub consumer group
clientiotHubResource;