Nava Vaisman Levy
Nava Vaisman Levy

Reputation: 514

How can I find all deployments running in my Azure environment?

I'm trying to write a small code in c# to find all deployments running under a specific subscription in Azure. I did find the RoleEnvironment class of Microsoft.WindowsAzure.ServiceRuntime Namespace that can provide me with the roles under my environment. But can anyone help me with finding what deployments are currently running and how to get their IDs?

10x,
Nava

Upvotes: 2

Views: 1362

Answers (3)

knightpfhor
knightpfhor

Reputation: 9399

If you don't want to write the wrappers for the REST API yourself, you can use the samples provided by Microsoft. The include samples of service management amongst many others. Bear in mind that this is just sample code so not all of it is production ready. I haven't had any issues using the management samples though as it's all pretty basic stuff.

Another gotcha is that what properties are called in the portal, doesn't match what they're called in the API. e.g. what is referred to as Name in the portal is Label in the API and ID in the portal is Name in the API.

Upvotes: 1

joelf
joelf

Reputation: 126

There is a pretty cool Visual Studio add-in that does this, among other things. Check it out here:

http://clumsyleaf.com/products/azurexplorer

Upvotes: 0

Mark Seemann
Mark Seemann

Reputation: 233150

You can use the Windows Azure Service Management API for things like that.

AFAIK the current SDK (1.3) have no managed classes that wrap the REST API, so you'll need to code directly against the HTTP stack. It's not particularly hard, though.

To list all services under a specific subscription you can use the List Hosted Services operation.

Upvotes: 1

Related Questions