用于ComputeManagementClient操作(例如创建,获取,交换)的等效Azure ARM API [英] Equivalent Azure ARM APIs for ComputeManagementClient operations like create, get, swap

查看:194
本文介绍了用于ComputeManagementClient操作(例如创建,获取,交换)的等效Azure ARM API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须用Azure ARM替换服务管理API,并且发现很难找到适用于以下等效Azure ARM API的适当文档

I have to replace the service management API's with Azure ARM and I am finding very difficult to find a proper documentation for the following equivalent Azure ARM API's

1) ComputeManagementClient.Deployments.Create -我在azure资源浏览器的帮助下找到了按插槽进行GET部署的API.

1) ComputeManagementClient.Deployments.Create - I found the API to GET deployment by slot with the help of azure resource explorer.

https://management.azure.com/subscriptions/{mySubID}/resourceGroups/{myResourcegroup}/providers/Microsoft.ClassicCompute/domainNames/{myCloudService}/slots/Production?api-version=2016-04-01

相同的PUT/POST请求正文是什么?

What is PUT/POST request body for the same ?

2) ComputeManagementClient.Deployments.swap -使用生产插槽交换部署的API是什么?

2) ComputeManagementClient.Deployments.swap - What is the API to Swap deployment with Production slot ?

3) ComputeManagementClient.HostedServices.Create

 https://management.azure.com/subscriptions/{mySubID}/resourceGroups/{myResourcegroup}/providers/Microsoft.ClassicCompute/domainNames/{myCloudService}/slots/Production?api-version=2016-04-01

以上API将创建云服务吗?如果是这样的话,请求正文中应包含哪些参数?

Will the above API create cloud service ? If so what are the parameters should be in the Request body ?

推荐答案

有关Deployments.Create,请参阅4c74356b41的答案.我在我旁边测试了create cloudservice和swap插槽,它可以正常工作.

For Deployments.Create please refer to 4c74356b41's answer. I test the create cloudservice and swap slot on my side, it works correctly.

ComputeManagementClient.Deployments.swap-使用生产插槽交换部署的API是什么?

ComputeManagementClient.Deployments.swap - What is the API to Swap deployment with Production slot ?

请尝试使用以下REST API将部署与生产广告位交换.

please have a try to use the following REST API to swap the deployment with Production slot.

post https://management.azure.com/subscriptions/{subscriptionid}/resourceGroups/{resourcegroupname}/providers/Microsoft.ClassicCompute/domainNames/{cloudservicename}/swap?api-version=2015-06-01

以上API将创建云服务吗?如果是这样的话,请求正文中应包含哪些参数?

Will the above API create cloud service ? If so what are the parameters should be in the Request body ?

是的,我们可以使用Rest API创建云服务.

Yes, we could use the Rest API to create cloudservice.

put https://management.azure.com/subscriptions/{subscriptionid}/resourceGroups/{resourcegroupname}/providers/Microsoft.ClassicCompute/domainNames/{cloudservicename}?api-version=2016-04-01

身体:

  {
   "properties": {},
   "location": "eastus" //location
  }

注意:请确保您的订阅支持在该位置创建云服务.如果不支持,则会出现以下错误.

Note: please make sure that your subcription supports to create the cloudservice in that location. If it is not supported, we will get the following error.

位置限制无效

The location constraint is not valid

这篇关于用于ComputeManagementClient操作(例如创建,获取,交换)的等效Azure ARM API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆