az cosmosdb database

此命令已被取代,並將在未來版本中移除。 請改用 'cosmosdb sql database、cosmosdb mongodb 資料庫、cosmosdb cassandra keyspace 或 cosmosdb gremlin 資料庫'。

管理 Azure Cosmos DB 資料庫。

命令

名稱 Description 類型 狀態
az cosmosdb database create

建立 Azure Cosmos DB 資料庫。

核心 已取代
az cosmosdb database delete

刪除 Azure Cosmos DB 資料庫。

核心 已取代
az cosmosdb database exists

傳回布林值,指出資料庫是否存在。

核心 已取代
az cosmosdb database list

列出所有 Azure Cosmos DB 資料庫。

核心 已取代
az cosmosdb database show

顯示 Azure Cosmos DB 資料庫。

核心 已取代

az cosmosdb database create

已被取代

此命令已隱含取代,因為命令群組 'cosmosdb 資料庫' 已被取代,而且將在未來的版本中移除。 請改用 'cosmosdb sql database、cosmosdb mongodb 資料庫、cosmosdb cassandra keyspace 或 cosmosdb gremlin 資料庫'。

建立 Azure Cosmos DB 資料庫。

az cosmosdb database create --db-name
                            [--key]
                            [--name]
                            [--resource-group-name]
                            [--throughput]
                            [--url-connection]

範例

建立 Azure Cosmos DB 資料庫。

az cosmosdb database create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --db-name MyDatabase

必要參數

--db-name -d

資料庫名稱。

選擇性參數

--key

Cosmos DB 帳戶金鑰。 必須與 cosmosdb 帳戶名稱或 url-connection 搭配使用。

--name -n

Cosmos DB 帳戶名稱。 必須與資源群組的名稱或 cosmosdb 帳戶金鑰搭配使用。

--resource-group-name -g

資源群組的名稱。 必須與 cosmosdb 帳戶名稱搭配使用。

--throughput

提供輸送量(RU/秒)。

--url-connection

Cosmos DB 帳戶 URL 連線。 必須與 cosmosdb 帳戶金鑰搭配使用。

全域參數
--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 database delete

已被取代

此命令已隱含取代,因為命令群組 'cosmosdb 資料庫' 已被取代,而且將在未來的版本中移除。 請改用 'cosmosdb sql database、cosmosdb mongodb 資料庫、cosmosdb cassandra keyspace 或 cosmosdb gremlin 資料庫'。

刪除 Azure Cosmos DB 資料庫。

az cosmosdb database delete --db-name
                            [--key]
                            [--name]
                            [--resource-group-name]
                            [--url-connection]
                            [--yes]

範例

刪除 Azure Cosmos DB 資料庫(自動產生)

az cosmosdb database delete --db-name MyDatabase --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

必要參數

--db-name -d

資料庫名稱。

選擇性參數

--key

Cosmos DB 帳戶金鑰。 必須與 cosmosdb 帳戶名稱或 url-connection 搭配使用。

--name -n

Cosmos DB 帳戶名稱。 必須與資源群組的名稱或 cosmosdb 帳戶金鑰搭配使用。

--resource-group-name -g

資源群組的名稱。 必須與 cosmosdb 帳戶名稱搭配使用。

--url-connection

Cosmos DB 帳戶 URL 連線。 必須與 cosmosdb 帳戶金鑰搭配使用。

--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 database exists

已被取代

此命令已隱含取代,因為命令群組 'cosmosdb 資料庫' 已被取代,而且將在未來的版本中移除。 請改用 'cosmosdb sql database、cosmosdb mongodb 資料庫、cosmosdb cassandra keyspace 或 cosmosdb gremlin 資料庫'。

傳回布林值,指出資料庫是否存在。

az cosmosdb database exists --db-name
                            [--key]
                            [--name]
                            [--resource-group-name]
                            [--url-connection]

範例

傳回布林值,指出資料庫是否存在 (自動產生)

az cosmosdb database exists --db-name MyDatabase --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

必要參數

--db-name -d

資料庫名稱。

選擇性參數

--key

Cosmos DB 帳戶金鑰。 必須與 cosmosdb 帳戶名稱或 url-connection 搭配使用。

--name -n

Cosmos DB 帳戶名稱。 必須與資源群組的名稱或 cosmosdb 帳戶金鑰搭配使用。

--resource-group-name -g

資源群組的名稱。 必須與 cosmosdb 帳戶名稱搭配使用。

--url-connection

Cosmos DB 帳戶 URL 連線。 必須與 cosmosdb 帳戶金鑰搭配使用。

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

已被取代

此命令已隱含取代,因為命令群組 'cosmosdb 資料庫' 已被取代,而且將在未來的版本中移除。 請改用 'cosmosdb sql database、cosmosdb mongodb 資料庫、cosmosdb cassandra keyspace 或 cosmosdb gremlin 資料庫'。

列出所有 Azure Cosmos DB 資料庫。

az cosmosdb database list [--key]
                          [--name]
                          [--resource-group-name]
                          [--url-connection]

範例

列出所有 Azure Cosmos DB 資料庫 (自動產生)

az cosmosdb database list --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

選擇性參數

--key

Cosmos DB 帳戶金鑰。 必須與 cosmosdb 帳戶名稱或 url-connection 搭配使用。

--name -n

Cosmos DB 帳戶名稱。 必須與資源群組的名稱或 cosmosdb 帳戶金鑰搭配使用。

--resource-group-name -g

資源群組的名稱。 必須與 cosmosdb 帳戶名稱搭配使用。

--url-connection

Cosmos DB 帳戶 URL 連線。 必須與 cosmosdb 帳戶金鑰搭配使用。

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

已被取代

此命令已隱含取代,因為命令群組 'cosmosdb 資料庫' 已被取代,而且將在未來的版本中移除。 請改用 'cosmosdb sql database、cosmosdb mongodb 資料庫、cosmosdb cassandra keyspace 或 cosmosdb gremlin 資料庫'。

顯示 Azure Cosmos DB 資料庫。

az cosmosdb database show --db-name
                          [--key]
                          [--name]
                          [--resource-group-name]
                          [--url-connection]

範例

顯示 Azure Cosmos DB 資料庫 (自動產生)

az cosmosdb database show --db-name MyDatabase --name MyCosmosDBDatabaseAccount --resource-group-name MyResourceGroup

必要參數

--db-name -d

資料庫名稱。

選擇性參數

--key

Cosmos DB 帳戶金鑰。 必須與 cosmosdb 帳戶名稱或 url-connection 搭配使用。

--name -n

Cosmos DB 帳戶名稱。 必須與資源群組的名稱或 cosmosdb 帳戶金鑰搭配使用。

--resource-group-name -g

資源群組的名稱。 必須與 cosmosdb 帳戶名稱搭配使用。

--url-connection

Cosmos DB 帳戶 URL 連線。 必須與 cosmosdb 帳戶金鑰搭配使用。

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