Share via


az spring storage

注意

此參考是 Azure CLI 的 Spring 延伸模組的一部分(2.56.0 版或更高版本)。 擴充功能會在您第一次執行 az spring storage 命令時自動安裝。 深入了解擴充功能。

在 Azure Spring Apps 中管理 儲存體 的命令。

命令

名稱 Description 類型 狀態
az spring storage add

在 Azure Spring Apps 中建立新的記憶體。

副檔名 GA
az spring storage list

列出 Azure Spring Apps 中的所有現有記憶體。

副檔名 GA
az spring storage list-persistent-storage

列出與 Azure Spring Apps 中現有記憶體相關的所有永續性記憶體。

副檔名 GA
az spring storage remove

拿掉 Azure Spring Apps 中的現有記憶體。

副檔名 GA
az spring storage show

在 Azure Spring Apps 中取得現有的記憶體。

副檔名 GA
az spring storage update

更新 Azure Spring Apps 中的現有記憶體。

副檔名 GA

az spring storage add

在 Azure Spring Apps 中建立新的記憶體。

az spring storage add --account-key
                      --account-name
                      --name
                      --resource-group
                      --service
                      --storage-type

範例

使用您自己的記憶體帳戶建立 儲存體 資源。

az spring storage add --storage-type StorageAccount --account-name MyAccountName --account-key MyAccountKey  -g MyResourceGroup -s MyService -n MyStorageName

必要參數

--account-key

儲存體帳戶的帳戶金鑰。

--account-name

記憶體帳戶的名稱。

--name -n

記憶體的名稱。

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=來設定預設服務。

--storage-type

憤怒的類型。 例如 儲存體 Account。

全域參數
--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 spring storage list

列出 Azure Spring Apps 中的所有現有記憶體。

az spring storage list --resource-group
                       --service

範例

列出所有 儲存體 資源。

az spring storage list -g MyResourceGroup -s MyService

必要參數

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=來設定預設服務。

全域參數
--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 spring storage list-persistent-storage

列出與 Azure Spring Apps 中現有記憶體相關的所有永續性記憶體。

az spring storage list-persistent-storage --name
                                          --resource-group
                                          --service

範例

列出與現有記憶體相關的所有永續性記憶體。

az spring storage list-persistent-storage -g MyResourceGroup -s MyService -n MyStorageName

必要參數

--name -n

記憶體的名稱。

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=來設定預設服務。

全域參數
--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 spring storage remove

拿掉 Azure Spring Apps 中的現有記憶體。

az spring storage remove --name
                         --resource-group
                         --service

範例

拿掉 儲存體 資源。

az spring storage remove -g MyResourceGroup -s MyService -n MyStorageName

必要參數

--name -n

記憶體的名稱。

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=來設定預設服務。

全域參數
--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 spring storage show

在 Azure Spring Apps 中取得現有的記憶體。

az spring storage show --name
                       --resource-group
                       --service

範例

取得 儲存體 資源。

az spring storage show -g MyResourceGroup -s MyService -n MyStorageName

必要參數

--name -n

記憶體的名稱。

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=來設定預設服務。

全域參數
--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 spring storage update

更新 Azure Spring Apps 中的現有記憶體。

az spring storage update --account-key
                         --account-name
                         --name
                         --resource-group
                         --service
                         --storage-type

範例

使用新的名稱或新索引鍵更新 儲存體 資源。

az spring storage update --storage-type StorageAccount --account-name MyAccountName --account-key MyAccountKey  -g MyResourceGroup -s MyService -n MyStorageName

必要參數

--account-key

儲存體帳戶的帳戶金鑰。

--account-name

記憶體帳戶的名稱。

--name -n

記憶體的名稱。

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=來設定預設服務。

--storage-type

憤怒的類型。 例如 儲存體 Account。

全域參數
--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 來取得完整偵錯記錄。