【发布时间】:2015-10-18 09:36:27
【问题描述】:
我希望升级的服务位于资源组中,并且我的用户帐户被配置为该资源组的所有者。用户帐户仅限于访问一个资源组。
通过上传cspkg 和cscfg 文件,我可以使用新的管理门户成功更新云服务。
我正在尝试使用 Azure Powershell 自动执行此过程。
这是我迄今为止尝试过的:
Set-AzureDeployment -Upgrade -ServiceName test-service -Configuration C:\temp\test-service.cscfg -Package "https://test-service.blob.core.windows.net/azurepowershelldeploy/test-package.cspkg" -Slot Production -Mode Auto -Label test-2015-07-28T00:33:04
ForbiddenError: The server failed to authenticate the request.
Verify that the certificate is valid and is associated with this subscription.
看一下提琴手,它正在向这个端点发出请求,并返回一个 403 禁止。
POST /xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/services/hostedservices/test-service/deploymentslots/Production/?comp=upgrade HTTP/1.1
我认为 ASM API 不能与资源组一起正常工作。是否有使用新 ARM API 更新云服务的方法?
【问题讨论】:
-
如何设置凭据? Get-AzureDeployment 可以使用吗?
-
您是该订阅的管理员并已连接吗?
-
@jisaak 我使用 Add-AzureAccount 设置我的凭据。
-
@JamesWoolfenden 正如我所说,此帐户不是订阅的管理员,它是一个受限帐户,但它是包含服务的资源组的所有者,并且可以从门户部署服务.
标签: powershell azure azure-resource-manager