Share via


az containerapp env storage

注意

此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。

用來管理容器應用程式環境的記憶體的命令。

命令

名稱 Description 類型 狀態
az containerapp env storage list

列出環境的記憶體。

核心 GA
az containerapp env storage list (containerapp 擴充功能)

列出環境的記憶體。

副檔名 GA
az containerapp env storage remove

從環境移除記憶體。

核心 GA
az containerapp env storage remove (containerapp 擴充功能)

從環境移除記憶體。

副檔名 GA
az containerapp env storage set

建立或更新記憶體。

核心 GA
az containerapp env storage set (containerapp 擴充功能)

建立或更新記憶體。

副檔名 GA
az containerapp env storage show

顯示記憶體的詳細數據。

核心 GA
az containerapp env storage show (containerapp 擴充功能)

顯示記憶體的詳細數據。

副檔名 GA

az containerapp env storage list

列出環境的記憶體。

az containerapp env storage list --name
                                 --resource-group

範例

列出環境的記憶體。

az containerapp env storage list -g MyResourceGroup -n MyEnvironment

必要參數

--name -n

Container Apps 環境的名稱。

--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 containerapp env storage list (containerapp 擴充功能)

列出環境的記憶體。

az containerapp env storage list --name
                                 --resource-group

範例

列出環境的記憶體。

az containerapp env storage list -g MyResourceGroup -n MyEnvironment

必要參數

--name -n

Container Apps 環境的名稱。

--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 containerapp env storage remove

從環境移除記憶體。

az containerapp env storage remove --name
                                   --resource-group
                                   --storage-name
                                   [--yes]

範例

從 Container Apps 環境移除記憶體。

az containerapp env storage remove -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

必要參數

--name -n

Container Apps 環境的名稱。

--resource-group -g

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

--storage-name

儲存體名稱。

選擇性參數

--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 containerapp env storage remove (containerapp 擴充功能)

從環境移除記憶體。

az containerapp env storage remove --name
                                   --resource-group
                                   --storage-name
                                   [--yes]

範例

從 Container Apps 環境移除記憶體。

az containerapp env storage remove -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

必要參數

--name -n

Container Apps 環境的名稱。

--resource-group -g

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

--storage-name

儲存體名稱。

選擇性參數

--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 containerapp env storage set

建立或更新記憶體。

az containerapp env storage set --access-mode {ReadOnly, ReadWrite}
                                --account-name
                                --azure-file-account-key
                                --azure-file-share-name
                                --name
                                --resource-group
                                --storage-name
                                [--no-wait]

範例

建立記憶體。

az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadOnly --azure-file-account-key MyAccountKey --azure-file-account-name MyAccountName --azure-file-share-name MyShareName

必要參數

--access-mode

AzureFile 記憶體的存取模式。

接受的值: ReadOnly, ReadWrite
--account-name --azure-file-account-name -a

AzureFile 記憶體帳戶的名稱。

--azure-file-account-key --storage-account-key -k

AzureFile 記憶體帳戶的金鑰。

--azure-file-share-name --file-share -f

AzureFile 記憶體上的共享名稱。

--name -n

Container Apps 環境的名稱。

--resource-group -g

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

--storage-name

儲存體名稱。

選擇性參數

--no-wait

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

預設值: 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 containerapp env storage set (containerapp 擴充功能)

建立或更新記憶體。

az containerapp env storage set --name
                                --resource-group
                                --storage-name
                                [--access-mode {ReadOnly, ReadWrite}]
                                [--account-name]
                                [--azure-file-account-key]
                                [--azure-file-share-name]
                                [--no-wait]
                                [--server]
                                [--storage-type {AzureFile, NfsAzureFile}]

範例

建立 Azure 檔案記憶體。

az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadOnly --azure-file-account-key MyAccountKey --azure-file-account-name MyAccountName --azure-file-share-name MyShareName

建立 nfs azure 檔案記憶體。

az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --storage-type NfsAzureFile --access-mode ReadOnly --server MyNfsServer.file.core.windows.net --file-share /MyNfsServer/MyShareName

必要參數

--name -n

Container Apps 環境的名稱。

--resource-group -g

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

--storage-name

儲存體名稱。

選擇性參數

--access-mode

AzureFile 或 nfs AzureFile 記憶體的存取模式。

接受的值: ReadOnly, ReadWrite
--account-name --azure-file-account-name -a

AzureFile 記憶體帳戶的名稱。

--azure-file-account-key --storage-account-key -k

AzureFile 記憶體帳戶的金鑰。

--azure-file-share-name --file-share -f

AzureFile 或 nfs AzureFile 記憶體上的共享名稱。

--no-wait

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

預設值: False
--server -s
預覽

NfsAzureFile 記憶體帳戶的伺服器。

--storage-type
預覽

記憶體的類型。 如果未指定,則假設為 AzureFile。

接受的值: AzureFile, NfsAzureFile
全域參數
--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 containerapp env storage show

顯示記憶體的詳細數據。

az containerapp env storage show --name
                                 --resource-group
                                 --storage-name

範例

顯示記憶體的詳細數據。

az containerapp env storage show -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

必要參數

--name -n

Container Apps 環境的名稱。

--resource-group -g

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

--storage-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 containerapp env storage show (containerapp 擴充功能)

顯示記憶體的詳細數據。

az containerapp env storage show --name
                                 --resource-group
                                 --storage-name

範例

顯示記憶體的詳細數據。

az containerapp env storage show -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

必要參數

--name -n

Container Apps 環境的名稱。

--resource-group -g

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

--storage-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 來取得完整偵錯記錄。