【发布时间】:2020-05-12 15:02:31
【问题描述】:
我正在尝试使用 node.js SDK(npm 包@azure/arm-appservice)在 Azure 上创建一个部署槽
这就是我调用方法的方式:
const msRest = require('@azure/ms-rest-nodeauth');
const armWebsite = require('@azure/arm-appservice');
async function createDeploymentSlot(){
const credentials = await msRest.loginWithServicePrincipalSecret("clientId", "secret", "domain");
const webManagementClient = armWebsite.WebSiteManagementClient(credentials, "subscriptionId");
const deployment = {
location : "westus"
}
return webManagementClient.webApps.createDeploymentSlot(
"test-resource-group-name",
"test-app-name",
"", //ID of an existing deployment??
"test-new-slot-name",
deployment
)
}
我收到以下错误:
错误:找不到资源组“test-resource-group-name”下的资源“Microsoft.Web/sites/test-app-name/slots/test-new-slot-name”。
这很奇怪,因为它说找不到我要创建的资源。
我做错了什么?
谢谢
【问题讨论】:
标签: node.js azure azure-web-app-service