1
votes

I wanted to get the properties of the Role instances in a cloud service.

I am able to get the instance properties via REST Api call as mentioned here.

This is the API I used,

https://management.core.windows.net/subscription-id/services/hostedservices/cloudservice-name/deployments/deployment-name

But I am not able to find the .Net equivalent of that. I tried the following class,

RoleInstanceDiagnosticManager

But it asks me for a connection string , deployment id and other stuffs which the REST API doesn't ask for. The REST API works well with cloudservice name and deployment name.How do I achieve this in .Net without giving connection string and other stuffs?

Is there any clear documentation to use Service Management API for .net with examples?

2

2 Answers

0
votes

Actually the library you would want to use is Azure Management Library which is a .Net wrapper over Service Management REST API. Check out this blog post from Brady which will get you started: http://www.bradygaster.com/post/getting-started-with-the-windows-azure-management-libraries.

0
votes

The following method

public static DeploymentGetResponse GetByName(this IDeploymentOperations operations, string serviceName, string deploymentName);

under DeploymentOperationsExtensions helped in getting the role instance properties.