[英]How to publish an Azure web app using management api?
I see how to list and even create web sites using the WebSiteManagementClient, but I cannot figure out how to publish content to an existing site. 我了解了如何使用WebSiteManagementClient列出甚至创建网站,但是我不知道如何将内容发布到现有网站。 Am I missing it in the API, or is that just not supported right now?
我在API中丢失了它,还是现在不支持它?
You can't deploy using the WebSiteManagementClient itself, although it can list the source control that you have configured for the site (ie git). 您无法使用WebSiteManagementClient本身进行部署,尽管它可以列出您为站点配置的源代码管理(例如git)。
Here is a good list of how to deploy to a web app: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/ . 这是有关如何部署到Web应用程序的很好的清单: https : //azure.microsoft.com/zh-cn/documentation/articles/web-sites-deploy/ 。 Git is very easy to use and can be managed directly from the cmd line.
Git非常易于使用,可以直接从cmd行进行管理。
You can also consider using the Kudu REST API ( https://github.com/projectkudu/kudu/wiki/REST-API#zip ). 您还可以考虑使用Kudu REST API( https://github.com/projectkudu/kudu/wiki/REST-API#zip )。 You can authenticate against this REST API using basic auth with credentials that you get from the publishing settings.
您可以使用基本身份验证,并使用从发布设置中获取的凭据,对此REST API进行身份验证。 If you're looking to programmatically publish, you can easily invoke a PUT request with whatever language you're using.
如果您希望以编程方式发布,则可以使用任何语言轻松调用PUT请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.