Permalink
Browse files

Merge pull request #591 from glennblock/release-0.6.10

Release 0.6.10 - Updating readme and changelog
  • Loading branch information...
2 parents 1242ea6 + 8661990 commit 08c4f0448b7557066d1ff79ca8ba3bf1f495ec44 André Rodrigues committed Feb 12, 2013
Showing with 88 additions and 1 deletion.
  1. +5 −0 ChangeLog.txt
  2. +83 −1 README.md
View
@@ -1,3 +1,8 @@
+2012.02.11 Version 0.6.10
+* Added helper date.* functions for generating SAS expirations (secondsFromNow, minutesFromNow, hoursFromNow, daysFromNow)
+* Added SQL classes for managing SQL Servers, Databases and Firewall rules
+* Updating to use latest xml2js
+
2012.12.12 Version 0.6.9
* Exporting WebResource, Client classes from package to support CLI.
* Install message updated to remind users the CLI is now a separate package.
View
@@ -17,6 +17,8 @@ This project provides a Node.js package that makes it easy to access Windows Azu
* Service Bus
* Queues: create, list and delete queues; create, list, and delete subscriptions; send, receive, unlock and delete messages
* Topics: create, list, and delete topics; create, list, and delete rules
+* Azure SQL Database
+ * create, list and delete Azure SQL Database servers, databases and firewall rules
* Service Runtime
* discover addresses and ports for the endpoints of other role instances in your service
* get configuration settings and access local resources
@@ -120,6 +122,21 @@ blobService.getBlobToStream('taskcontainer', 'task1', fs.createWriteStream('task
});
```
+To create a SAS URL you can use the **generateSharedAccessSignatureUrl** method. Additionally you can use the **date** helper functions to easily create a SAS that expires at some point relative to the current time.
+
+```Javascript
+var blobService = azure.createBlobService();
+
+//create a SAS that expires in an hour
+var sharedAccessPolicy = {
+ AccessPolicy: {
+ Expiry: azure.date.minutesFromNow(60);
+ }
+};
+
+var sasUrl = blobService.generateSharedAccessSignatureUrl(containerName, blobName, sharedAccessPolicy);
+```
+
## Storage Queues
The **createQueueIfNotExists** method can be used to ensure a queue exists:
@@ -245,6 +262,71 @@ serviceBusService.createSubscription(topic, subscription, function(error1){
}
});
```
+## Azure SQL Database
+
+The Azure SQL Database functions allow you to manage Azure SQL servers, databases and firewall rules.
+
+### Servers
+You can add, delete and list SQL Server instances
+
+```Javascript
+var authentication={keyvalue:"...", certvalue:"..."};
+var sqlMgmt = new azure.createSqlManagementService(subscriptionId, authentication);
+
+//create a new server
+//admin, password, location, callback
+sqlMgmt.createServer("sqladmin", "Pa$$w0rd", "West US", function(error, serverName) {
+ console.log("created server " + serverName);
+});
+
+//list out servers
+sqlMgmt.listServers(function(error, servers) {
+ console.log("servers\n" + servers);
+});
+
+```
+
+### Firewall rules
+You can list, create and delete firewall rules
+
+```Javascript
+var authentication={keyvalue:"...", certvalue:"..."};
+var sqlMgmt = new azure.createSqlManagementService(subscriptionId, authentication);
+
+//create a new rule
+//server, rule name, start ip, end ip, callback
+sqlMgmt.createServerFirewallRule(serverName, 'myrule', '192.168.100.0', '192.168.100.255',
+ function(error, rule) {
+ console.log("Rule created:\n" + rule);
+ }
+);
+
+//list rules
+sqlMgmt.listServerFirewallRules(serverName, function(error, rules) {
+ console.log("Rules:\n:" + rules);
+});
+
+```
+
+### Databases
+You can list, create and delete databases
+
+```Javascript
+var sqlService = new azure.createSqlService(serverName, 'sqlAdmin', 'Pa$$w0rd');
+
+//create a new database
+//db name, callback
+sqlServer.createServerDatabase("mydb", function(error, db) {
+ console.log("DB Created:\n" + db);
+});
+
+//list databases
+sqlServer.listServerDatabases(function(error, dbs) {
+ console.log("Databases:\n" + dbs);
+});
+
+```
+
## Service Runtime
@@ -322,4 +404,4 @@ For documentation on how to host Node.js applications on Windows Azure, please s
For documentation on the Azure cross platform CLI tool for Mac and Linux, please see our readme [here] (http://github.com/windowsazure/azure-sdk-tools-xplat)
-Check out our new IRC channel on freenode, node-azure.
+Check out our new IRC channel on freenode, node-azure.

0 comments on commit 08c4f04

Please sign in to comment.