且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更新使用Azure的PowerShell中的Azure云服务设置

更新时间:2023-02-08 23:41:06

目前为止,还没有办法更新只是一个单一的设置(服务管理API不允许它 - 它仅接受了整个服务配置)。因此,为了更新单个设置,你将不得不更新整个配置。你还可以使用PowerShell做到这一点:

So far there is no way to update just a single setting (the Service Management API does not allow it - it only accepts the whole service configuration). So, in order to update a single setting, you will have to update the entire configuration. And you can do this with PowerShell:

# Add the Azure Account first - this will create a login promppt
Add-AzureAccount 
# when you have more then one subscription - you have explicitly select the one 
# which holds your cloud service you want to update
Select-AzureSubscription "<Subscription name with spaces goes here>"
# then Update the configuration for the cloud service
Set-AzureDeployment -Config -ServiceName "<cloud_service_name_goes_here>" `
                    -Configuration "D:/tmp/cloud/ServiceConfiguration.Cloud.cscfg" `
                    -Slot "Production"

有关的了`构型的参数我已经提供了完整的本地路径为新的配置文件,我想用我的云服务的使用。

For the the `-Configuration' parameter I have provided full local path to the new config file I want to use with my cloud service.

这是验证和工作方案。