Skip to content
A node.js utility to parse the Windows Azure publishsettings file, and create ServiceManagementService objects to work with the Azure Service Management API.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
der.js
index.js
package.json
pkcs.js
readme.md

readme.md

azure-publishsettings-parser

A node.js utility to parse the Windows Azure publishsettings file, and create ServiceManagementService objects to work with the Azure Service Management API.

A publishsettings file contains the information, including the certificates, required to connect to the Windows Azure Service Management API.

Your file can be downloaded from here: http://go.microsoft.com/fwlink/?LinkId=254432

Installation

$ node install azure-publishsettings-parser

Usage

var parser = require('azure-publishsettings-parser');
parser.loadFromFile('my.publishsettings', function(err, subscriptions){

    // the parser will provide an array of subscriptions on a callback
    subscriptions.forEach(function(subscription){

        console.log(subscription.Name);
        console.log(subscription.Id);
        console.log(subscription.ManagementCertificate);

    });
});

You can also parse the settings file from a string:

parser.loadFromString("<xml...>", function(err, subscriptions){
    ...
});

When you have found the subscription you want (often there is only one!) you can create an instance of Windows Azure Service Management Service:

var azure = require('azure');
var sms = parser.createServiceManagementService(azure, subscription);
sms.listStorageAccounts(function(err,data){
    console.log(data.body);
});

For more information on the ServiceManagementService see the Microsoft documentation:

http://www.windowsazure.com/en-us/documentation/articles/virtual-machines-linux-how-to-service-api/

Thanks

Thanks to the Microsoft Azure team for the pfx2pem function!

License

MIT

Something went wrong with that request. Please try again.