gpt4 book ai didi

Azure ARM 模板

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

需要您快速帮助:

  1. 如何设置使用arm模板启用存储帐户“软删除”选项?

2.我应该在arm模板中使用什么属性。尝试浏览此网站但无法获得太多信息 - https://learn.microsoft.com/en-us/rest/api/storagerp/storageaccounts/getproperties

非常感谢任何帮助。

洛基

最佳答案

随着存储模板 2018 年 11 月 1 日版本的发布,现在可以在 ARM 模板中启用软删除。您可以在下面找到我使用过的模板:

{
"parameters": {
"NameForResources": {
"type": "string",
},
"ResourceLocation": {
"type": "string",
"defaultValue": "westeurope"
},
"Storage_Type": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS"
],
"metadata": {
"description": "Storage Account type"
}
}
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "[parameters('Storage_Type')]"
},
"kind": "Storage",
"name": "[parameters('NameForResources')]",
"apiVersion": "2018-11-01",
"location": "[parameters('ResourceLocation')]",
"properties": {
"encryption": {
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
},
"supportsHttpsTrafficOnly": true
},
"resources": [
{
"name": "[concat(parameters('NameForResources'),'/','default')]",
"type": "Microsoft.Storage/storageAccounts/blobServices",
"apiVersion": "2018-11-01",
"properties": {
"deleteRetentionPolicy": {
"enabled": true,
"days": 30
}
},
"dependsOn": ["[concat('Microsoft.Storage/storageAccounts/', parameters('NameForResources'))]"]
}
]
}
],
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0"
}

关于Azure ARM 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50951884/

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