az storage share-rm
使用 Microsoft.Storage 資源提供者來管理 Azure 檔案共用。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az storage share-rm create |
依照要求本文所述,在指定的帳戶下建立新的共用。 共用資源包含該共用的元數據和屬性。 它不包含共用所包含的檔案清單。 |
Core | GA |
| az storage share-rm delete |
刪除指定的 Azure 檔案共享或共用快照集。 |
Core | GA |
| az storage share-rm exists |
檢查 Azure 檔案共用是否存在。 |
Core | GA |
| az storage share-rm list |
列出所有共用。 |
Core | GA |
| az storage share-rm restore |
如果啟用共用虛刪除,請在有效的保留天內還原檔案共用。 |
Core | GA |
| az storage share-rm show |
顯示指定之 Azure 檔案共享或共用快照集的屬性。 |
Core | GA |
| az storage share-rm snapshot |
在指定的帳戶下建立現有共用的快照集。 |
Core | Preview |
| az storage share-rm stats |
取得儲存在共享上的數據使用位元組。 |
Core | GA |
| az storage share-rm update |
依照要求本文所述,在指定的帳戶下更新新的共用。 共用資源包含該共用的元數據和屬性。 它不包含共用所包含的檔案清單。 |
Core | GA |
az storage share-rm create
依照要求本文所述,在指定的帳戶下建立新的共用。 共用資源包含該共用的元數據和屬性。 它不包含共用所包含的檔案清單。
az storage share-rm create --account-name --storage-account
--name --share-name
[--access-tier {Cool, Hot, Premium, TransactionOptimized}]
[--bursting-max-mibps --paid-bursting-max-bandwidth-mibps]
[--enabled-protocols {NFS, SMB}]
[--metadata]
[--paid-bursting-enabled {0, 1, f, false, n, no, t, true, y, yes}]
[--paid-bursting-max-iops]
[--provisioned-bandwidth --provisioned-bandwidth-mibps]
[--provisioned-iops]
[--quota]
[--resource-group]
[--root-squash {AllSquash, NoRootSquash, RootSquash}]
範例
在資源群組 'MyResourceGroup' 的記憶體帳戶 'mystorageaccount'(帳戶名稱) 下,建立新的 Azure 檔案共用 'myfileshare',並將元數據和配額設定為 10 GB。
az storage share-rm create -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 10 --metadata key1=value1 key2=value2
在記憶體帳戶 'mystorageaccount'(帳戶名稱) 下建立新的 Azure 檔案共用 'myfileshare',其元數據和配額為 6000 GB,可在資源群組 'MyResourceGroup' 中啟用大型檔案共用。
az storage account update -g MyResourceGroup --name mystorageaccount --enable-large-file-share
az storage share-rm create -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 6000 --metadata key1=value1 key2=value2
在記憶體帳戶 'mystorageaccount' 下建立新的 Azure 檔案共用 'myfileshare',其元數據和配額為 10 GB(帳戶標識符)。
az storage share-rm create --storage-account mystorageaccount --name myfileshare --quota 10 --metadata key1=value1 key2=value2
在記憶體帳戶 'mystorageaccount' 下建立新的 Azure 檔案共用 'myfileshare',以在資源群組 'MyResourceGroup' 中啟用 provisionedv2。
az storage account create -g res3376 --name sto328 --sku StandardV2_LRS --kind FileStorage
az storage share-rm create --storage-account sto328 -g res3376 -n share1 --provisioned-bandwidth-mibps 60 --provisioned-iops 500
必要參數
指定資源群組內的記憶體帳戶名稱。 儲存體帳戶名稱長度必須介於 3 到 24 個字元之間,且只能使用數位和小寫字母。
指定記憶體帳戶內的檔案共享名稱。 檔案共享名稱的長度必須介於 3 到 63 個字元之間,且只能使用數位、小寫字母和虛線 (-) 。 每個虛線 (-) 字元必須緊接在前面,後面接著字母或數位。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
特定共用的存取層。 GpV2 帳戶可以選擇 TransactionOptimized (預設)、經常性存取和非經常性存取。 FileStorage 帳戶可以選擇 [進階]。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | Cool, Hot, Premium, TransactionOptimized |
共用的付費高載頻寬上限,每秒以 MB 為單位。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。 允許的最大值是 10340,這是共用的最大允許頻寬。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V1 Paid Bursting Arguments |
用於檔案共用的驗證通訊協定。 NFS 通訊協定僅適用於進階檔案共用(FileStorage 帳戶類型的檔案共用)。 只能在建立共用時指定。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | NFS, SMB |
要與共用建立關聯的名稱/值組做為元數據。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
指出是否為共用啟用付費高載。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V1 Paid Bursting Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
共用的付費高載 IOPS 上限。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。 允許的最大值是 102400,這是共用允許的最大 IOPS。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V1 Paid Bursting Arguments |
共用的布建頻寬,每秒以 MB 為單位。 此屬性僅適用於在 [檔案布建 v2] 帳戶類型下建立的檔案共用。 如需布建頻寬的最小和最大值,請參閱 GetFileServiceUsage API 回應。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V2 Arguments |
共用的已布建 IOPS。 此屬性僅適用於在 [檔案布建 v2] 帳戶類型下建立的檔案共用。 請參閱 GetFileServiceUsage API 回應,以取得已布建 IOPS 的最小值和最大值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V2 Arguments |
共用的布建大小,以 Gibibytes 為單位。 必須大於 0,且小於或等於 5TB (5120)。 對於大型檔案共用,大小上限為 102400。 如需在 [檔案布建 v2] 帳戶類型下建立的檔案共用,請參閱 GetFileServiceUsage API 回應,以取得允許的布建記憶體大小下限和上限。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
減少遠端超級使用者的訪問許可權。 屬性僅適用於 NFS 共用。 預設值為 NoRootSquash。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | AllSquash, NoRootSquash, RootSquash |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm delete
刪除指定的 Azure 檔案共享或共用快照集。
刪除指定的 Azure 檔案共享或共用快照集。 重大變更:預設無法刪除快照集,如果您想要包含刪除作業的 sanpshots,我們已新增要使用的參數。
az storage share-rm delete [--account-name --storage-account]
[--ids]
[--include]
[--name --share-name]
[--resource-group]
[--snapshot]
[--subscription]
[--yes]
範例
刪除資源群組 'MyResourceGroup' 中儲存體帳戶 'mystorageaccount' (帳戶名稱) 下的 Azure 檔案共用 'myfileshare'。
az storage share-rm delete -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
刪除記憶體帳戶 'mystorageaccount' 底下的 Azure 檔案共用 'myfileshare'(帳戶標識符)。
az storage share-rm delete --storage-account mystorageaccount --name myfileshare
依資源標識碼刪除 Azure 檔案共用。
az storage share-rm delete --ids file-share-id
刪除 Azure 檔案共用快照集。
az storage share-rm delete --ids file-share-id --snapshot "2021-03-25T05:29:56.0000000Z"
刪除 Azure 檔案共用及其所有快照集。
az storage share-rm delete --include snapshots -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
刪除 Azure 檔案共用及其所有快照集(已租用/未發行)。
az storage share-rm delete --include leased-snapshots -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
指定資源群組內的記憶體帳戶名稱。 儲存體帳戶名稱長度必須介於 3 到 24 個字元之間,且只能使用數位和小寫字母。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Optional. 有效值為:快照集、租用快照集、無。 預設值為 none。 針對「快照集」,檔案共用會遭到刪除,包括其所有檔案共用快照集。 如果檔案共用包含租用快照集,則刪除會失敗。 若為 「leased-snapshots」,則會刪除檔案共用,並包含其所有檔案共用快照集 (leased/unleased)。 若沒有共用快照集,則會刪除檔案共用。 如果檔案共用包含任何快照集(租用或未發行),則刪除會失敗。
| 屬性 | 值 |
|---|---|
| 預設值: | none |
指定記憶體帳戶內的檔案共享名稱。 檔案共享名稱的長度必須介於 3 到 63 個字元之間,且只能使用數位、小寫字母和虛線 (-) 。 每個虛線 (-) 字元必須緊接在前面,後面接著字母或數位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
選擇性,用來刪除快照集。DateTime 值,指定要擷取的共用快照集。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿提示確認。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm exists
檢查 Azure 檔案共用是否存在。
az storage share-rm exists [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
範例
檢查資源群組 'MyResourceGroup' 中記憶體帳戶 'mystorageaccount' (帳戶名稱) 下是否有 Azure 檔案共用 'myfileshare'。
az storage share-rm exists -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
檢查記憶體帳戶 'mystorageaccount' 下是否有 Azure 檔案共用 'myfileshare'(帳戶標識符)。
az storage share-rm exists --storage-account mystorageaccount --name myfileshare
依資源標識子檢查 Azure 檔案共用是否存在。
az storage share-rm exists --ids file-share-id
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
檔案共享名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
記憶體帳戶的名稱或識別碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm list
列出所有共用。
az storage share-rm list --account-name --storage-account
[--filter]
[--include-deleted {0, 1, f, false, n, no, t, true, y, yes}]
[--include-snapshot {0, 1, f, false, n, no, t, true, y, yes}]
[--max-items]
[--maxpagesize]
[--next-token]
[--resource-group]
範例
列出資源群組 'MyResourceGroup' 中儲存器帳戶 'mystorageaccount' (帳戶名稱) 下的 Azure 檔案共用。
az storage share-rm list -g MyResourceGroup --storage-account mystorageaccount
列出記憶體帳戶 'mystorageaccount' 底下的 Azure 檔案共用(帳戶標識符)。
az storage share-rm list --storage-account mystorageaccount
列出記憶體帳戶 'mystorageaccount' 底下已刪除的所有檔案共用。
az storage share-rm list --storage-account mystorageaccount --include-deleted
列出所有檔案共用在其記憶體帳戶 'mystorageaccount' 底下的所有快照集
az storage share-rm list --storage-account mystorageaccount --include-snapshot
列出所有檔案共用包含其儲存體帳戶 'mystorageaccount' 下的所有快照集和已刪除的檔案共用
az storage share-rm list --storage-account mystorageaccount --include-deleted --include-snapshot
必要參數
指定資源群組內的記憶體帳戶名稱。 儲存體帳戶名稱長度必須介於 3 到 24 個字元之間,且只能使用數位和小寫字母。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
Optional. 指定時,只會列出以篩選開頭的共享名稱。
指定時包含虛刪除的檔案共用。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
指定時包含檔案共用快照集。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token 自變數中提供令牌值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Pagination Arguments |
Optional. 指定清單中可包含的共享數目上限。
標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Pagination Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm restore
如果啟用共用虛刪除,請在有效的保留天內還原檔案共用。
az storage share-rm restore --deleted-version
[--ids]
[--name]
[--resource-group]
[--restored-name]
[--storage-account]
[--subscription]
範例
如果啟用共用虛刪除,請在有效的保留天內還原檔案共用。
az storage share-rm restore -n deletedshare --deleted-version 01D64EB9886F00C4 -g MyResourceGroup --storage-account mystorageaccount
如果共用虛刪除已啟用至新名稱,請在有效的保留天數內還原檔案共用。
az storage share-rm restore -n deletedshare --deleted-version 01D64EB9886F00C4 --restored-name newname -g MyResourceGroup --storage-account mystorageaccount
必要參數
識別將還原之已刪除共用的版本。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
檔案共享名稱。 識別將還原之已刪除共享的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
要還原的新檔案共享名稱。 如果未指定,將會使用已刪除的共享名稱。
記憶體帳戶的名稱或識別碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm show
顯示指定之 Azure 檔案共享或共用快照集的屬性。
az storage share-rm show [--account-name --storage-account]
[--expand]
[--ids]
[--name --share-name]
[--resource-group]
[--snapshot]
[--subscription]
範例
在資源群組 'MyResourceGroup' 中的記憶體帳戶 'mystorageaccount' (帳戶名稱) 底下顯示 Azure 檔案共用 'myfileshare' 的屬性。
az storage share-rm show -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
在記憶體帳戶 'mystorageaccount' 底下顯示 Azure 檔案共用 'myfileshare' 的屬性(帳戶標識符)。
az storage share-rm show --storage-account mystorageaccount --name myfileshare
依資源標識碼顯示 Azure 檔案共享的屬性。
az storage share-rm show --ids file-share-id
顯示 Azure 檔案共用快照集的屬性
az storage share-rm show --ids file-share-id --snapshot "2021-03-25T05:29:56.0000000Z"
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
指定資源群組內的記憶體帳戶名稱。 儲存體帳戶名稱長度必須介於 3 到 24 個字元之間,且只能使用數位和小寫字母。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
選擇性,用來展開共用屬性內的屬性。 有效值為:已刪除、快照集。 應該以具有分隔符 ',' 的字串傳遞。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
指定記憶體帳戶內的檔案共享名稱。 檔案共享名稱的長度必須介於 3 到 63 個字元之間,且只能使用數位、小寫字母和虛線 (-) 。 每個虛線 (-) 字元必須緊接在前面,後面接著字母或數位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
選擇性,用來刪除快照集。DateTime 值,指定要擷取的共用快照集。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm snapshot
此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
在指定的帳戶下建立現有共用的快照集。
az storage share-rm snapshot [--access-tier {Cool, Hot, Premium, TransactionOptimized}]
[--enabled-protocols {NFS, SMB}]
[--ids]
[--metadata]
[--name]
[--quota]
[--resource-group]
[--root-squash {AllSquash, NoRootSquash, RootSquash}]
[--storage-account]
[--subscription]
範例
在指定的帳戶下建立現有共用的快照集。
az storage share-rm snapshot -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
特定共用的存取層。 GpV2 帳戶可以選擇 TransactionOptimized (預設)、經常性存取和非經常性存取。 FileStorage 帳戶可以選擇 [進階]。
| 屬性 | 值 |
|---|---|
| 接受的值: | Cool, Hot, Premium, TransactionOptimized |
檔案共用通訊協定的不可變屬性。 NFS 通訊協定僅適用於進階檔案共用(FileStorage 帳戶類型的檔案共用)。
| 屬性 | 值 |
|---|---|
| 接受的值: | NFS, SMB |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
與共用相關聯的空格分隔索引鍵=值組中的元數據。 這會覆寫任何現有的元數據。
檔案共享名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
以 GB 為單位的共用大小上限。 必須大於 0,且小於或等於 5TB (5120)。 對於大型檔案共用,大小上限為 102400。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
減少遠端超級使用者的訪問許可權。
| 屬性 | 值 |
|---|---|
| 接受的值: | AllSquash, NoRootSquash, RootSquash |
記憶體帳戶的名稱或識別碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm stats
取得儲存在共享上的數據使用位元組。
az storage share-rm stats [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
範例
取得儲存在共享上的數據使用位元組。
az storage share-rm stats -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
檔案共享名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
記憶體帳戶的名稱或識別碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az storage share-rm update
依照要求本文所述,在指定的帳戶下更新新的共用。 共用資源包含該共用的元數據和屬性。 它不包含共用所包含的檔案清單。
az storage share-rm update [--access-tier {Cool, Hot, Premium, TransactionOptimized}]
[--account-name --storage-account]
[--add]
[--bursting-max-mibps --paid-bursting-max-bandwidth-mibps]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--metadata]
[--name --share-name]
[--paid-bursting-enabled {0, 1, f, false, n, no, t, true, y, yes}]
[--paid-bursting-max-iops]
[--provisioned-bandwidth --provisioned-bandwidth-mibps]
[--provisioned-iops]
[--quota]
[--remove]
[--resource-group]
[--root-squash {AllSquash, NoRootSquash, RootSquash}]
[--set]
[--subscription]
範例
在資源群組 'MyResourceGroup' 中的記憶體帳戶 'mystorageaccount' (帳戶名稱) 底下,更新 Azure 檔案共用 'myfileshare' 的屬性。
az storage share-rm update -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 3 --metadata key1=value1 key2=value2
更新記憶體帳戶 'mystorageaccount' 下 Azure 檔案共用 'myfileshare' 的屬性(帳戶標識符)。
az storage share-rm update --storage-account mystorageaccount --name myfileshare --quota 3 --metadata key1=value1 key2=value2
依資源標識碼更新 Azure 檔案共用的屬性。
az storage share-rm update --ids file-share-id --quota 3 --metadata key1=value1 key2=value2
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
特定共用的存取層。 GpV2 帳戶可以選擇 TransactionOptimized (預設)、經常性存取和非經常性存取。 FileStorage 帳戶可以選擇 [進階]。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | Cool, Hot, Premium, TransactionOptimized |
指定資源群組內的記憶體帳戶名稱。 儲存體帳戶名稱長度必須介於 3 到 24 個字元之間,且只能使用數位和小寫字母。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例: --add property.listProperty <key=value, string or JSON string>.
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
共用的付費高載頻寬上限,每秒以 MB 為單位。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。 允許的最大值是 10340,這是共用的最大允許頻寬。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V1 Paid Bursting Arguments |
使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
要與共用建立關聯的名稱/值組做為元數據。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
指定記憶體帳戶內的檔案共享名稱。 檔案共享名稱的長度必須介於 3 到 63 個字元之間,且只能使用數位、小寫字母和虛線 (-) 。 每個虛線 (-) 字元必須緊接在前面,後面接著字母或數位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
指出是否為共用啟用付費高載。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V1 Paid Bursting Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
共用的付費高載 IOPS 上限。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。 允許的最大值是 102400,這是共用允許的最大 IOPS。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V1 Paid Bursting Arguments |
共用的布建頻寬,每秒以 MB 為單位。 此屬性僅適用於在 [檔案布建 v2] 帳戶類型下建立的檔案共用。 如需布建頻寬的最小和最大值,請參閱 GetFileServiceUsage API 回應。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V2 Arguments |
共用的已布建 IOPS。 此屬性僅適用於在 [檔案布建 v2] 帳戶類型下建立的檔案共用。 請參閱 GetFileServiceUsage API 回應,以取得已布建 IOPS 的最小值和最大值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Provisioned V2 Arguments |
共用的布建大小,以 Gibibytes 為單位。 必須大於 0,且小於或等於 5TB (5120)。 對於大型檔案共用,大小上限為 102400。 如需在 [檔案布建 v2] 帳戶類型下建立的檔案共用,請參閱 GetFileServiceUsage API 回應,以取得允許的布建記憶體大小下限和上限。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove> 或 --remove propertyToRemove。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
減少遠端超級使用者的訪問許可權。 屬性僅適用於 NFS 共用。 預設值為 NoRootSquash。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | AllSquash, NoRootSquash, RootSquash |
指定要設定的屬性路徑和值,以更新物件。 範例: --set property1.property2=<value>.
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |