0

Im referring to this for deployment to Cloud Service http://www.packtpub.com/article/managing-azure-hosted-services-with-service-management-api

For Deleting the Package there is no straight forward way to delete package from cloud service. I'm referring to below code http://code.msdn.microsoft.com/windowsazure/Windows-Azure-CSManage-e3f1882c As per above code, It uses ServiceManagermentHelper class, But I cant use the code in ServiceManagementHelper class, since it is been uploaded in Code plex. But i need better solution from ServiceManagement API. Im unable to find dll or API for ServiceManagement API. Are there any dll available for Azure Client SDK 1.7 or above? Please let me know how to delete cloudservice functionality along with check the service is deployed or not.

4

2 回答 2

1

There is currently not a managed DLL available from Microsoft that wraps the Management API; however, there are a few other options. First, there are command line tools such as the PowerShell CmdLets and the CLI tools found at http://www.windowsazure.com/en-us/downloads/. If you only need to script these calls to delete the deployment these will work for you just fine. In my opinion I would suggest NOT looking at csmanage as that is an old sample and not maintained. The command line tools are the replacement.

Second, you can do so using code to call the REST based management API much like Neil indicated in the first link you included in your question. The documentation for the API can be found at http://msdn.microsoft.com/en-us/library/windowsazure/ee460812.aspx. Note that there is a Delete Deployment specifically at http://msdn.microsoft.com/en-us/library/windowsazure/ee460815.aspx. Just like Neil's examples you'll use calls direct to the REST API.

于 2013-03-30T18:37:07.217 回答
0

Thanks to Mike for providing help. I'm able to fix problem by using Service Management API to delete Deployment. There are some Hiccups when I was deleting Deployment. If the Service Status is "Running" , Azure Service Management API throws Error, that Azure Service is in Running State. I have to change the Deployment Status to Suspended State before deleting deployment.

-Mahender

于 2013-04-01T14:27:50.687 回答