Azure Dev Ops,无法使用二头肌部署API管理。继续获取错误' customhostnameownhipsfailed'

发布于 2025-01-20 19:52:11 字数 1259 浏览 3 评论 0原文

正如上面问题中所说。错误消息写在下面:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"InvalidParameters","message":"Invalid parameter: CustomHostnameOwnershipCheckFailed. A CNAME record pointing from test to apiaresocool.azure-api.net was not found.."}]}

我尝试手动部署应用程序,效果很好。它为我创建 cname,无需验证它是否存在。

这是我的二头肌文件。我正在使用 main 来调用这个二头肌文件:

 param api_Management_Name string = 'apiManage'

resource apiManagement 'Microsoft.ApiManagement/service@2021-08-01' = {
name: api_Management_Name
location: resourceGroup().location

sku: {
capacity:0
name: 'Consumption'

}
properties: {
  customProperties: {

  }
  notificationSenderEmail: null
  publisherEmail: '******' //I add my email here
  publisherName: 'Clarion Housing'
  virtualNetworkType: 'None'
  hostnameConfigurations: [
    {
     
      certificatePassword: null
      defaultSslBinding: true
      encodedCertificate: null
      hostName: 'test'
      identityClientId: null
      keyVaultId: null
      negotiateClientCertificate: false
      type: 'Proxy'
    }
  ]
}

 }

请告知。谢谢

As said in the question above. The errror message is written below:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"InvalidParameters","message":"Invalid parameter: CustomHostnameOwnershipCheckFailed. A CNAME record pointing from test to apiaresocool.azure-api.net was not found.."}]}

I've tried deploying the app manually and it works fine. It creates the cname for me, without needing to verify it exists.

Here is my bicep file. I'm using main to call on this bicep file:

 param api_Management_Name string = 'apiManage'

resource apiManagement 'Microsoft.ApiManagement/service@2021-08-01' = {
name: api_Management_Name
location: resourceGroup().location

sku: {
capacity:0
name: 'Consumption'

}
properties: {
  customProperties: {

  }
  notificationSenderEmail: null
  publisherEmail: '******' //I add my email here
  publisherName: 'Clarion Housing'
  virtualNetworkType: 'None'
  hostnameConfigurations: [
    {
     
      certificatePassword: null
      defaultSslBinding: true
      encodedCertificate: null
      hostName: 'test'
      identityClientId: null
      keyVaultId: null
      negotiateClientCertificate: false
      type: 'Proxy'
    }
  ]
}

 }

Please advise. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文