New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

azure-publishsettings-parser

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created

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

FAQs

Package last updated on 25 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts