Share via


az spring app binding cosmos

注意

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

此命令群組已隱含取代,因為命令群組 'spring app binding' 已被取代,且將在未來的版本中移除。 請改用『spring connection』。

管理 Azure Cosmos DB 系結的命令。

命令

名稱 Description 類型 狀態
az spring app binding cosmos add

將 Azure Cosmos DB 與應用程式系結。

副檔名 已取代
az spring app binding cosmos update

更新應用程式的 Azure Cosmos DB 服務系結。

副檔名 已取代

az spring app binding cosmos add

已被取代

此命令已隱含取代,因為命令群組 'spring app binding' 已被取代,且將在未來的版本中移除。 請改用『spring connection』。

將 Azure Cosmos DB 與應用程式系結。

az spring app binding cosmos add --api-type {cassandra, gremlin, mongo, sql, table}
                                 --app
                                 --name
                                 --resource-group
                                 --resource-id
                                 --service
                                 [--collection-name]
                                 [--database-name]
                                 [--key-space]

範例

系結 Azure Cosmos DB。

az spring app binding cosmos add -n cosmosProduction --app MyApp --resource-id COSMOSDB_ID --api-type mongo --database mymongo -g MyResourceGroup -s MyService

必要參數

--api-type

API 的類型。

接受的值: cassandra, gremlin, mongo, sql, table
--app

應用程式的名稱。

--name -n

服務系結的名稱。

--resource-group -g

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

--resource-id

要系結之服務的 Azure 資源識別碼。

--service -s

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

選擇性參數

--collection-name

集合的名稱。 gremlin 的必要專案。

--database-name

資料庫的名稱。 mongo、sql、gremlin 的必要專案。

--key-space

Cassandra 金鑰空間。 cassandra 的必要專案。

全域參數
--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 app binding cosmos update

已被取代

此命令已隱含取代,因為命令群組 'spring app binding' 已被取代,且將在未來的版本中移除。 請改用『spring connection』。

更新應用程式的 Azure Cosmos DB 服務系結。

az spring app binding cosmos update --app
                                    --name
                                    --resource-group
                                    --service
                                    [--collection-name]
                                    [--database-name]
                                    [--key-space]

必要參數

--app

應用程式的名稱。

--name -n

服務系結的名稱。

--resource-group -g

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

--service -s

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

選擇性參數

--collection-name

集合的名稱。 gremlin 的必要專案。

--database-name

資料庫的名稱。 mongo、sql、gremlin 的必要專案。

--key-space

Cassandra 金鑰空間。 cassandra 的必要專案。

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