az storage container-rm

使用 Microsoft 管理 Azure 容器。儲存體 資源提供者。

命令

名稱 Description 類型 狀態
az storage container-rm create

在指定的記憶體帳戶下建立新的容器。

核心 GA
az storage container-rm delete

刪除其帳戶下的指定容器。

核心 GA
az storage container-rm exists

檢查容器是否存在。

核心 GA
az storage container-rm list

列出指定記憶體帳戶下的所有容器。

核心 GA
az storage container-rm migrate-vlw

將 Blob 容器從容器層級 WORM 移轉至已啟用物件層級不變性的容器。

核心 預覽
az storage container-rm show

顯示指定容器的屬性。

核心 GA
az storage container-rm update

更新容器的屬性。

核心 GA

az storage container-rm create

在指定的記憶體帳戶下建立新的容器。

az storage container-rm create --name
                               --storage-account
                               [--default-encryption-scope]
                               [--deny-encryption-scope-override {false, true}]
                               [--enable-vlw {false, true}]
                               [--fail-on-exist]
                               [--metadata]
                               [--public-access {blob, container, off}]
                               [--resource-group]
                               [--root-squash {AllSquash, NoRootSquash, RootSquash}]

範例

在指定的記憶體帳戶下建立新的容器。

az storage container-rm create --storage-account myaccount --name mycontainer

在指定的記憶體帳戶(帳戶標識符)下,建立具有元數據和公用存取權作為 Blob 的新容器。

az storage container-rm create --storage-account myaccountid --name mycontainer --public-access blob --metada key1=value1 key2=value2

必要參數

--name -n

容器名稱。

--storage-account

記憶體帳戶的名稱或識別碼。

選擇性參數

--default-encryption-scope -d

默認為容器,以針對所有寫入使用指定的加密範圍。

--deny-encryption-scope-override --deny-override

封鎖從容器預設值覆寫加密範圍。

接受的值: false, true
--enable-vlw
預覽

容器的物件層級不變性屬性。 屬性是不可變的,而且只能在容器建立期間設定為 true。 現有的容器必須經過移轉程式。

接受的值: false, true
--fail-on-exist

如果容器已經存在,則擲回例外狀況。

預設值: False
--metadata

空格分隔索引鍵=值組中的元數據。 這會覆寫任何現有的元數據。

--public-access

指定容器中的數據是否可以公開存取。

接受的值: blob, container, off
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--root-squash

在 Blob 容器上啟用 NFSv3 壁球。

接受的值: AllSquash, NoRootSquash, RootSquash
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage container-rm delete

刪除其帳戶下的指定容器。

az storage container-rm delete [--ids]
                               [--name]
                               [--resource-group]
                               [--storage-account]
                               [--subscription]
                               [--yes]

範例

刪除其帳戶下的指定容器。

az storage container-rm delete --storage-account myAccount --name mycontainer

刪除其帳戶下指定的容器(帳戶標識元)。

az storage container-rm delete --storage-account myaccountid --name mycontainer

依資源標識碼刪除指定的容器。

az storage container-rm delete --ids mycontainerid

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

容器名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--storage-account

記憶體帳戶的名稱或識別碼。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage container-rm exists

檢查容器是否存在。

az storage container-rm exists [--ids]
                               [--name]
                               [--resource-group]
                               [--storage-account]
                               [--subscription]

範例

檢查指定的記憶體帳戶下是否有容器。

az storage container-rm exists --storage-account myaccount --name mycontainer

檢查指定記憶體帳戶下是否有容器存在(帳戶標識符)。

az storage container-rm exists --storage-account myaccountid --name mycontainer

依資源標識子檢查容器是否存在。

az storage container-rm exists --ids mycontainerid

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

容器名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--storage-account

記憶體帳戶的名稱或識別碼。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage container-rm list

列出指定記憶體帳戶下的所有容器。

az storage container-rm list --storage-account
                             [--include-deleted]
                             [--resource-group]

範例

列出指定記憶體帳戶下的所有容器。

az storage container-rm list --storage-account myaccount

列出指定記憶體帳戶下的所有容器(帳戶標識符)。

az storage container-rm list --storage-account myaccountid

列出指定記憶體帳戶下的所有容器,包括已刪除的容器。

az storage container-rm list --storage-account myaccount --include-deleted

必要參數

--storage-account

記憶體帳戶的名稱或識別碼。

選擇性參數

--include-deleted

指定時包含虛刪除的容器。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage container-rm migrate-vlw

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將 Blob 容器從容器層級 WORM 移轉至已啟用物件層級不變性的容器。

az storage container-rm migrate-vlw [--ids]
                                    [--name]
                                    [--no-wait]
                                    [--resource-group]
                                    [--storage-account]
                                    [--subscription]

範例

將 Blob 容器從容器層級 WORM 移轉至已啟用物件層級不變性的容器。

az storage container-rm migrate-vlw -n mycontainer --storage-account myaccount -g myresourcegroup

將 Blob 容器從容器層級 WORM 移轉至已啟用物件層級不變性的容器,而不需等候。

az storage container-rm migrate-vlw -n mycontainer --storage-account myaccount -g myresourcegroup --no-wait
az storage container-rm show -n mycontainer --storage-account myaccount -g myresourcegroup  --query immutableStorageWithVersioning.migrationState

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

容器名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--storage-account

記憶體帳戶的名稱或識別碼。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage container-rm show

顯示指定容器的屬性。

az storage container-rm show [--ids]
                             [--name]
                             [--resource-group]
                             [--storage-account]
                             [--subscription]

範例

顯示指定記憶體帳戶下容器的屬性。

az storage container-rm show --storage-account myaccount --name mycontainer

在指定的記憶體帳戶下顯示容器的屬性(帳戶標識元)。

az storage container-rm show --storage-account myaccountid --name mycontainer

依資源識別碼顯示容器的屬性。

az storage container-rm show --ids mycontainerid

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

容器名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--storage-account

記憶體帳戶的名稱或識別碼。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage container-rm update

更新容器的屬性。

az storage container-rm update [--add]
                               [--force-string]
                               [--ids]
                               [--metadata]
                               [--name]
                               [--public-access {blob, container, off}]
                               [--remove]
                               [--resource-group]
                               [--root-squash {AllSquash, NoRootSquash, RootSquash}]
                               [--set]
                               [--storage-account]
                               [--subscription]

範例

將指定記憶體帳戶下容器的公用存取層級更新為 『blob』。

az storage container-rm update --storage-account myaccount --name mycontainer --public-access blob

在指定的記憶體帳戶下更新容器的元數據(帳戶標識元)。

az storage container-rm update --storage-account myaccountid --name mycontainer --metadata newkey1=newvalue1 newkey2=newvalue2

依資源標識碼更新容器的公用存取層級。

az storage container-rm update --ids mycontainerid --public-access blob

選擇性參數

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>

預設值: []
--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--metadata

空格分隔索引鍵=值組中的元數據。 這會覆寫任何現有的元數據。

--name -n

容器名稱。

--public-access

指定容器中的數據是否可以公開存取。

接受的值: blob, container, off
--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

預設值: []
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--root-squash

在 Blob 容器上啟用 NFSv3 壁球。

接受的值: AllSquash, NoRootSquash, RootSquash
--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>

預設值: []
--storage-account

記憶體帳戶的名稱或識別碼。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。