gpt4 book ai didi

azure - 使用 Bicep 部署带有电子邮件服务和托管域的 Azure 通信服务时出错

转载 作者:行者123 更新时间:2023-12-03 05:11:30 25 4
gpt4 key购买 nike

正如标题所述,我正在尝试使用 bicep 部署 Azure 通信服务并将其链接到具有 Azure 托管域的电子邮件服务。我的脚本能够创建所有资源,但在尝试将通信服务链接到域时失败并出现错误:

“无法链接指定的域。”

真正有趣的部分:域在通信服务中显示为正确链接。

我尝试使用 2023-04-01-preview api,但失败了,因为它不允许我将位置设置为全局...

这是我完整的二头肌:

var communicationServiceName = 'cs-medienstudio-dev'
var emailServiceName = 'es-medienstudio-dev'

resource emailService 'Microsoft.Communication/emailServices@2023-03-31' = {
name: emailServiceName
location: 'global'
properties: {
dataLocation: 'Europe'
}
}

resource emailServiceDomain 'Microsoft.Communication/emailServices/domains@2023-03-31' = {
parent: emailService
name: 'AzureManagedDomain'
location: 'global'
properties: {
domainManagement: 'AzureManaged'
}
}

resource senderUserName 'Microsoft.Communication/emailServices/domains/senderUsernames@2023-03-31' = {
parent: emailServiceDomain
name: 'donotreply'
properties:{
username: 'DoNotReply'
displayName: 'DoNotReply'
}
}

resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
name: communicationServiceName
location: 'global'
properties: {
dataLocation: 'Germany'
linkedDomains: [
emailServiceDomain.id
]
}
}

最佳答案

请尝试将 /domains/AzureManagedDomain 附加到 linkedDomains 中的 emailServiceDomain.id。因此,用于创建通信服务的二头肌代码可能类似于:

resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
name: communicationServiceName
location: 'global'
properties: {
dataLocation: 'Germany'
linkedDomains: [
join([emailServiceDomain.id, '/domains/AzureManagedDomain'], '')
]
}
}

关于azure - 使用 Bicep 部署带有电子邮件服务和托管域的 Azure 通信服务时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76507325/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com