Azure Dev Ops,无法使用二头肌部署API管理。继续获取错误' customhostnameownhipsfailed'
正如上面问题中所说。错误消息写在下面:
{"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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论