2014-12-07 148 views
1

是否可以將存儲添加到資源組? IIRC我的存儲組是在我使用門戶的「舊」版本時自動創建的。 我可以在組中看到我的域和虛擬機,但沒有存儲。我如何添加它?將存儲添加到Azure資源管理器

回答

0

假設您是指存儲帳戶,則可以在preview portal的資源組內創建一個存儲帳戶。儘管如此,您仍然無法通過ARM API或Powershell(請參閱this question)。

2

您可以在資源組由ARM通過API或PowerShell中使用以下模板以及創建存儲帳戶:

{ 
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", 
"contentVersion": "1.0.0.0", 
"parameters": { 
    "name": { 
     "type": "string" 
    }, 
    "location": { 
     "type": "string" 
    }, 
    "accountType": { 
     "type": "string" 
    } 
}, 
"resources": [ 
    { 
     "apiVersion": "2014-06-01", 
     "name": "[parameters('name')]", 
     "type": "Microsoft.ClassicStorage/StorageAccounts", 
     "location": "[parameters('location')]", 
     "properties": { 
      "accountType": "[parameters('accountType')]" 
     } 
    } 
]} 
+0

你真的嘗試?我猜你會得到一個錯誤。 *最終*這會起作用,但目前只有Azure門戶可以使用ARM API進行存儲。有關詳細信息,請參見[此評論主題](http://azure.microsoft.com/zh-cn/documentation/articles/azure-preview-portal-using-resource-groups/#comment-1739284751)。 – BenV 2015-03-13 21:23:10

+0

是的,我試過了,它對我來說工作得很好。 – 2015-05-01 06:09:27

+0

是的,那是因爲他們剛剛在2天前添加了該功能:http://azure.microsoft.com/blog/2015/04/29/build-2015-azure-storage-announcements/ – BenV 2015-05-01 14:24:49