简体   繁体   中英

Azure Service Management API for .Net

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?

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 .

The following method

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

under DeploymentOperationsExtensions helped in getting the role instance properties.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM