az cosmosdb service

注意

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

在服務上執行作業的命令。

命令

名稱 Description 類型 狀態
az cosmosdb service create

建立 cosmosdb 服務資源。

核心 GA
az cosmosdb service create (cosmosdb-preview 擴充功能)

建立 cosmosdb 服務資源。

副檔名 預覽​​
az cosmosdb service delete

刪除指定的 cosmosdb 服務資源。

核心 GA
az cosmosdb service delete (cosmosdb-preview 擴充功能)

刪除指定的 cosmosdb 服務資源。

副檔名 預覽​​
az cosmosdb service list

列出帳戶下的所有 cosmosdb 服務資源。

核心 GA
az cosmosdb service list (cosmosdb-preview 擴充功能)

列出帳戶下的所有 cosmosdb 服務資源。

副檔名 預覽​​
az cosmosdb service show

在帳戶下取得 cosmosdb 服務資源。

核心 GA
az cosmosdb service show (cosmosdb-preview 擴充功能)

在帳戶下取得 cosmosdb 服務資源。

副檔名 預覽​​
az cosmosdb service update

更新 cosmosdb 服務資源。

核心 GA
az cosmosdb service update (cosmosdb-preview 擴充功能)

更新 cosmosdb 服務資源。

副檔名 預覽​​

az cosmosdb service create

建立 cosmosdb 服務資源。

az cosmosdb service create --account-name
                           --name
                           --resource-group-name
                           [--count]
                           [--gateway-type {DistributedQuery, IntegratedCache}]
                           [--no-wait]
                           [--size]

範例

建立 cosmosdb 服務資源。

az cosmosdb service create --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --count 3 --size "Cosmos.D4s"

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

選擇性參數

--count -c

實例計數。

預設值: 1
--gateway-type

專用閘道類型。 僅適用於 SqlDedicatedGateway 服務種類。

接受的值: DistributedQuery, IntegratedCache
預設值: IntegratedCache
--no-wait

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

預設值: False
--size

實例大小。 可能的值為:Cosmos.D4s、Cosmos.D8s、Cosmos.D16s 等。

預設值: Cosmos.D4s
全域參數
--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 cosmosdb service create (cosmosdb-preview 擴充功能)

預覽

命令群組 『cosmosdb 服務』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立 cosmosdb 服務資源。

az cosmosdb service create --account-name
                           --kind
                           --name
                           --resource-group-name
                           [--count]
                           [--gateway-type {DistributedQuery, IntegratedCache}]
                           [--no-wait]
                           [--size]

範例

建立 cosmosdb 服務資源。

az cosmosdb service create --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --kind "SqlDedicatedGateway" --count 3 --size "Cosmos.D4s"

建立cosmosdb具體化檢視產生器服務資源。

az cosmosdb service create --resource-group MyResourceGroup --account-name MyAccount --name "MaterializedViewsBuilder" --kind "MaterializedViewsBuilder" --count 3 --size "Cosmos.D4s"

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--kind -k

服務種類。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

選擇性參數

--count -c

實例計數。

預設值: 1
--gateway-type

專用閘道類型。 僅適用於 SqlDedicatedGateway 服務種類。

接受的值: DistributedQuery, IntegratedCache
預設值: IntegratedCache
--no-wait

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

預設值: False
--size

實例大小。 可能的值為:Cosmos.D4s、Cosmos.D8s、Cosmos.D16s 等。

預設值: Cosmos.D4s
全域參數
--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 cosmosdb service delete

刪除指定的 cosmosdb 服務資源。

az cosmosdb service delete --account-name
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--yes]

範例

刪除指定的 cosmosdb 服務資源。

az cosmosdb service delete --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

選擇性參數

--no-wait

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

預設值: False
--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 cosmosdb service delete (cosmosdb-preview 擴充功能)

預覽

命令群組 『cosmosdb 服務』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除指定的 cosmosdb 服務資源。

az cosmosdb service delete --account-name
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--yes]

範例

刪除指定的 cosmosdb 服務資源。

az cosmosdb service delete --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

刪除cosmosdb具體化檢視產生器服務資源。

az cosmosdb service delete --resource-group MyResourceGroup --account-name MyAccount --name "MaterializedViewsBuilder"

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

選擇性參數

--no-wait

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

預設值: False
--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 cosmosdb service list

列出帳戶下的所有 cosmosdb 服務資源。

az cosmosdb service list --account-name
                         --resource-group-name

範例

列出帳戶下的所有 cosmosdb 服務資源。

az cosmosdb service list --resource-group MyResourceGroup --account-name MyAccount

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

全域參數
--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 cosmosdb service list (cosmosdb-preview 擴充功能)

預覽

命令群組 『cosmosdb 服務』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出帳戶下的所有 cosmosdb 服務資源。

az cosmosdb service list --account-name
                         --resource-group-name

範例

列出帳戶下的所有 cosmosdb 服務資源。

az cosmosdb service list --resource-group MyResourceGroup --account-name MyAccount

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

全域參數
--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 cosmosdb service show

在帳戶下取得 cosmosdb 服務資源。

az cosmosdb service show --account-name
                         --name
                         --resource-group-name

範例

在帳戶下取得 cosmosdb 服務資源。

az cosmosdb service show --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

全域參數
--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 cosmosdb service show (cosmosdb-preview 擴充功能)

預覽

命令群組 『cosmosdb 服務』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

在帳戶下取得 cosmosdb 服務資源。

az cosmosdb service show --account-name
                         --name
                         --resource-group-name

範例

在帳戶下取得 cosmosdb 服務資源。

az cosmosdb service show --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway"

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

全域參數
--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 cosmosdb service update

更新 cosmosdb 服務資源。

az cosmosdb service update --account-name
                           --count
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--size]

範例

更新 cosmosdb 服務資源。

az cosmosdb service update --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --count 3

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--count -c

實例計數。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

選擇性參數

--no-wait

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

預設值: False
--size

實例大小。 可能的值為:Cosmos.D4s、Cosmos.D8s、Cosmos.D16s 等。

全域參數
--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 cosmosdb service update (cosmosdb-preview 擴充功能)

預覽

命令群組 『cosmosdb 服務』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

更新 cosmosdb 服務資源。

az cosmosdb service update --account-name
                           --count
                           --kind
                           --name
                           --resource-group-name
                           [--no-wait]
                           [--size]

範例

更新 cosmosdb 服務資源。

az cosmosdb service update --resource-group MyResourceGroup --account-name MyAccount --name "sqlDedicatedGateway" --kind "SqlDedicatedGateway" --count 3

更新cosmosdb具體化檢視產生器服務資源。

az cosmosdb service update --resource-group MyResourceGroup --account-name MyAccount --name "MaterializedViewsBuilder" --kind "MaterializedViewsBuilder" --count 3

必要參數

--account-name -a

Cosmos DB 資料庫帳戶的名稱。

--count -c

實例計數。

--kind -k

服務種類。

--name -n

服務名稱。

--resource-group-name -g

資料庫帳戶的資源群組名稱。

選擇性參數

--no-wait

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

預設值: False
--size

實例大小。 可能的值為:Cosmos.D4s、Cosmos.D8s、Cosmos.D16s 等。

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