gpt4 book ai didi

azure - 如何以编程方式接受 sendgrid 青铜帐户的 ARM 模板的市场条款

转载 作者:行者123 更新时间:2023-12-02 07:39:55 25 4
gpt4 key购买 nike

我能够使用 ARM 模板创建免费的 sendgrid 帐户,但无法创建青铜类型帐户。

{
"name": "[variables('testsendgrid')]",
"type": "Sendgrid.Email/accounts",
"location": "[resourceGroup().location]",
"apiVersion": "2015-01-01",
"plan": {
"name": "bronze",
"publisher": "Sendgrid",
"product": "sendgrid_azure",
"promotionCode": ""
},
"properties": {
"password": "[variables('pswd')]",
"acceptMarketingEmails":true,
"email": "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ff7f7f7a1f7f7cff7f7a1ece0e2" rel="noreferrer noopener nofollow">[email protected]</a>"
}
}

“错误”:{ "code": "资源购买验证失败", "message": "用户无法验证购买资源。错误消息:'此订阅中的该项目尚未接受法律条款:'dXXXX-xxxx-xx-xx-xxxxxxxx'。要使用 PowerShell 接受法律条款,请使用Get-AzureRmMarketplaceTerms 和 Set-AzureRmMarketplaceTerms API( https://go.microsoft.com/fwlink/?linkid=862451 ) 或通过 Azure 门户进行部署以接受条款” }

最佳答案

您需要运行几行 PowerShell 来获取和设置对条款的接受。例如:

$terms = Get-AzureRmMarketplaceTerms -Publisher 'SendGrid' -Product 'sendgrid_azure' -Name 'bronze'
Set-AzureRmMarketplaceTerms -Publisher 'SendGrid' -Product 'sendgrid_azure' -Name 'bronze' -Terms $terms -Accept

确保属性Accepted: 设置为True。结果: enter image description here

关于azure - 如何以编程方式接受 sendgrid 青铜帐户的 ARM 模板的市场条款,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56130260/

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