gpt4 book ai didi

azure - 由于无法在 Azure ARM 中创建 Blob 容器,那么如何使用 ARM 启用 Archive?

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

根据documentation我可以启用 Azure Event Hubs Archive使用 Azure 资源管理器模板的功能。该模板采用 blobContainerName 参数:

  • “您希望在其中存档事件数据的 Blob 容器。”

但是据我所知,不可能使用 ARM 模板创建 Blob 容器,那么我应该如何在事件中心上启用存档功能?

ARM 模板的目的是从头开始配置所有内容,而不是使用门户手动创建某些资源。

最佳答案

以前无法在存储帐户中创建容器,但这一情况已更改。存储帐户的 ARM 模板中添加了新功能,使您能够创建容器。

要使用名为 theNameOfMyContainer 的容器创建存储帐户,请将其添加到 ARM 模板的 resources block 中。

{
"name": "[parameters('storageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2018-02-01",
"location": "[resourceGroup().location]",
"kind": "StorageV2",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"accessTier": "Hot"
},
"resources": [{
"name": "[concat('default/', 'theNameOfMyContainer')]",
"type": "blobServices/containers",
"apiVersion": "2018-03-01-preview",
"dependsOn": [
"[parameters('storageAccountName')]"
],
"properties": {
"publicAccess": "Blob"
}
}]
}

据我所知,您的 publicAccess 可以使用 NoneBlobContainer

仍然无法创建队列和表,但希望很快就会添加。

关于azure - 由于无法在 Azure ARM 中创建 Blob 容器,那么如何使用 ARM 启用 Archive?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41138155/

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