我能够使用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": "xxx.xx@xx.com"
}
}
“错误”:{ “ code”:“ ResourcePurchaseValidationFailed”, “消息”:“用户验证购买资源失败。错误消息:此订阅上的该项目未接受法律条款:'dXXXX-xxxx-xx-xx-xxxxxxxxxx'。要使用PowerShell接受法律条款,请使用Get-AzureRmMarketplaceTerms和Set-AzureRmMarketplaceTerms API(https://go.microsoft.com/fwlink/?linkid=862451)或通过Azure门户进行部署以接受条款“” }
答案 0 :(得分:0)
您需要运行几行PowerShell以获取并设置对条款的接受程度。例如:
$terms = Get-AzureRmMarketplaceTerms -Publisher 'SendGrid' -Product 'sendgrid_azure' -Name 'bronze'
Set-AzureRmMarketplaceTerms -Publisher 'SendGrid' -Product 'sendgrid_azure' -Name 'bronze' -Terms $terms -Accept
答案 1 :(得分:0)
从错误中您遇到的共享问题是因为您尚未接受SendGrid条款和条件。每个订阅只需要执行一次。
Powershell:
RestAPI (因为您使用的是JSON)