Can';t使用Azure CLI模板创建SendGrid资源-";提供的订阅标识符无效";
我无法使用JSON模板在Azure中创建SendGrid资源-我收到Can';t使用Azure CLI模板创建SendGrid资源-";提供的订阅标识符无效";,azure,sendgrid,azure-cli,Azure,Sendgrid,Azure Cli,我无法使用JSON模板在Azure中创建SendGrid资源-我收到ResourcePurchaseValidationFailed错误。我能够创建其他Azure资源,例如存储 复制: az login az group create --name MyResourceGroup --location "uksouth" az group deployment create ` --name MyDeployment ` --resource-group MyResourceGroup
ResourcePurchaseValidationFailed
错误。我能够创建其他Azure资源,例如存储
复制:
az login
az group create --name MyResourceGroup --location "uksouth"
az group deployment create `
--name MyDeployment `
--resource-group MyResourceGroup `
--template-file template.json `
template.json:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"apiVersion": "2015-01-01",
"name": "mysendgrid",
"type": "Sendgrid.Email/accounts",
"location": "uksouth",
"plan": {
"name": "free",
"publisher": "Sendgrid",
"product": "sendgrid_azure",
"promotionCode": ""
},
"properties": {
"password": "mypassword",
"acceptMarketingEmails": false,
"email": "me@myemail.com",
"firstName": "John",
"lastName": "Smith",
"company":"My Company",
"website": "",
}
}
]
}
错误:
"error": {
"code": "ResourcePurchaseValidationFailed",
"message": "User failed validation to purchase resources. Error message: '{\"error\":{\"code\":\"InvalidSubscriptionId\",\"message\":\"Invalid subscription identifier provided.\"}}'"
}
我不知道如何提供任何其他订阅ID。也许,您的帐户有多个订阅,默认情况下,您登录的订阅无法访问SendGrid 您可以使用以下命令显示所有订阅:
az account list
然后设置正确的一个:
az account set --subscription <name or id>
az账户集--订阅
也许,您的帐户有多个订阅,默认情况下,您登录的订阅没有访问SendGrid的权限
您可以使用以下命令显示所有订阅:
az account list
然后设置正确的一个:
az account set --subscription <name or id>
az账户集--订阅
似乎是有点。由于这不是一个与文档相关的问题,请直接联系我们的支持团队,他们可以为您提供帮助。您可以通过登录访问支持联系人选项
您可以尝试通过添加参数来指出订阅ID
az group deployment create `
--name MyDeployment `
--resource-group MyResourceGroup `
--template-file template.json `
--subscription subId
看来是有点。由于这不是一个与文档相关的问题,请直接联系我们的支持团队,他们可以为您提供帮助。您可以通过登录访问支持联系人选项
您可以尝试通过添加参数来指出订阅ID
az group deployment create `
--name MyDeployment `
--resource-group MyResourceGroup `
--template-file template.json `
--subscription subId
尝试通过门户创建相同的资源,您可能没有权限。这看起来很好,现在更新吗?你解决了吗?我正在通过门户创建相同的资源,您可能没有权限。这看起来很好,现在更新吗?你解决了吗?我也有同样的问题我不认为那是问题我不认为那是问题