How to get the configuration of CloudService(classic) with Azure ARM API

♀尐吖头ヾ 提交于 2019-12-11 15:29:41

问题


I wanted to get the configuration of CloudService(classic), I did the following

1) Get the Resource ID: Cloudservice->properties->resourceID

Resource Id: /subscriptions/{mySubscriptionID}/resourceGroups/{myResourceGroup}/providers/Microsoft.ClassicCompute/domainNames/{myCloudServicename}/

2) I used this resourceID as follows

https://management.azure.com/subscriptions/{mySubscriptionID}/resourceGroups/{myResourceGroup}/providers/Microsoft.ClassicCompute/domainNames/{myCloudServicename}/deploymentslots/Production?api-version=2015-06-01

It worked in the first attempt only.

Is this a correct way ? If No, then please give me a solution

NOTE: I referred this link: https://msdn.microsoft.com/en-us/library/azure/ee460804.aspx

GET https://management.core.windows.net/<subscription-id>/services/hostedservices/<cloudservice-name>/deploymentslots/<deployment-slot>

Thanks ~HARI


回答1:


Is this a correct way ? If No, then please give me a solution

I have created a test classic cloud service and use the arm api to get the configuration it work well.

It could be get multiple times.

I guess maybe something wrong with your auth token or api-version.

Here has an easy way to get the configuration.

You could access the resources explorer site created by azure.

In this site, we could directly use the arm api to get the azure resources information(this tool will send arm api to get the information, you could use F12 to check how it send the request).

After login in this site, you could search your cloud service name.

Details you could see this image:




回答2:


With the Azure resource explorer I am able to get all the ARM API's(specific to my service) and its required information like the request and response parameters specifically api-version(which is tricky to find) with simple F12.

This is quick and easy solution for my problem. Thanks @BrandoZhang for this suggestion.



来源:https://stackoverflow.com/questions/45834981/how-to-get-the-configuration-of-cloudserviceclassic-with-azure-arm-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!