azure - 是否可以通过 Azure CLI 创建 SendGrid 帐户?

标签 azure sendgrid azure-cli

我见过的每个教程和资源都要求您通过 GUI 创建 SendGrid 帐户,但我希望能够使用 cli。可能吗?

类似于:

az sendgrid create

最佳答案

虽然您无法使用 Azure Cli 创建 SendGrid 帐户,但您可以使用 ARM 模板创建一个帐户,如下所示

{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
    "name": {
        "type": "string"
    },
    "location": {
        "type": "string"
    },
    "plan_name": {
        "type": "string"
    },
    "plan_publisher": {
        "type": "string"
    },
    "plan_product": {
        "type": "string"
    },
    "plan_promotion_code": {
        "type": "string"
    },
    "password": {
        "type": "secureString"
    },
    "email": {
        "type": "string"
    },
    "firstName": {
        "type": "string"
    },
    "lastName": {
        "type": "string"
    },
    "company": {
        "type": "string"
    },
    "website": {
        "type": "string"
    },
    "acceptMarketingEmails": {
        "type": "string"
    }
},
"resources": [
    {
        "apiVersion": "2015-01-01",
        "name": "[parameters('name')]",
        "type": "Sendgrid.Email/accounts",
        "location": "[parameters('location')]",
        "plan": {
            "name": "[parameters('plan_name')]",
            "publisher": "[parameters('plan_publisher')]",
            "product": "[parameters('plan_product')]",
            "promotionCode": "[parameters('plan_promotion_code')]"
        },
        "properties": {
            "password": "[parameters('password')]",
            "acceptMarketingEmails": "[parameters('acceptMarketingEmails')]",
            "email": "[parameters('email')]",
            "firstName": "[parameters('firstName')]",
            "lastName": "[parameters('lastName')]",
            "company": "[parameters('company')]",
            "website": "[parameters('website')]"
        }
    }
]

然后你可以使用az group deployment create配置您的模板。

关于azure - 是否可以通过 Azure CLI 创建 SendGrid 帐户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43240672/

相关文章:

azure - 使用 Azure CLI 将 VMSS 添加到应用程序网关的后端池

azure - 在azure windows webapp中使用azure cli设置dotnet core版本

azure - 将用户分配的托管标识用于具有代理的 Azure VM

azure - Asp.net core从azure云blob段获取所有文件

c# - 如何在现有 Azure MVC ASP.NET Web 应用程序上启用 "host in the cloud"

asp.net - azure 云环境中的图像管理

javascript - 使用 SendGrid 和 Firebase 的跨国电子邮件没有错误但没有电子邮件(使用 NodeMailer 作为答案)

azure - 是否有任何配置可以增加 Azure API 管理 (APIM) 的 URL 最大长度?

Node.js SendGrid 如何附加 PDF

go - SendGrid SMTP 电子邮件不会发送到 Go 中的抄送和密件抄送地址