Microsoft Azure SDK for Node.js - Redis
This project provides a Node.js package for accessing the Azure Redis Cache Client. Right now it supports:
- Node.js version: 6.x.x or higher
- API version: 2016-04-01
Features
- Manage Redis Cache: create, update, delete, list, get, regenerate key and get-key.
How to Install
npm install azure-arm-rediscache
How to Use
Authentication, client creation and listing redis caches in a resource group as an example
var msRestAzure = ;var AzureMgmtRedisCache = ; // Interactive Login// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, // the user will get a DeviceTokenCredentials object.msRestAzure;
Managing a RedisCache
var client = credentials 'your-subscription-id'; var resourceGroup = 'myResourceGroup';var cacheName = 'myNewCache'; //Create an Azure Redis Cache var skuProperties = capacity : 1 family : C name : 'Standard' ; var parameters = location:'West US' redisVersion : '3.0' enableNonSslPort : false sku : skuProperties ; console;clientredis; //Show properties of an existing Azure Redis Cache console;clientredis; //list all caches within a resource group console;clientredis; //list all caches within your subscription console;clientredis; //show primary and secondary keys of the cache console;clientredis; //regenerate keys of the cache var keytype = 'Primary';console;clientredis;