az cosmosdb collection

此命令已被取代,並將在未來版本中移除。 請改用 'cosmosdb sql 容器、cosmosdb mongodb 集合、cosmosdb cassandra 資料表、cosmosdb gremlin 圖形或 cosmosdb 資料表'。

管理 Azure Cosmos DB 集合。

命令

名稱 Description 類型 狀態
az cosmosdb collection create

建立 Azure Cosmos DB 集合。

核心 已取代
az cosmosdb collection delete

刪除 Azure Cosmos DB 集合。

核心 已取代
az cosmosdb collection exists

傳回布林值,指出集合是否存在。

核心 已取代
az cosmosdb collection list

列出所有 Azure Cosmos DB 集合。

核心 已取代
az cosmosdb collection show

顯示 Azure Cosmos DB 集合及其供應專案。

核心 已取代
az cosmosdb collection update

更新 Azure Cosmos DB 集合。

核心 已取代

az cosmosdb collection create

已被取代

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

建立 Azure Cosmos DB 集合。

az cosmosdb collection create --collection-name
                              --db-name
                              [--cep]
                              [--default-ttl]
                              [--indexing-policy]
                              [--key]
                              [--name]
                              [--partition-key-path]
                              [--resource-group-name]
                              [--throughput]
                              [--url-connection]

必要參數

--collection-name -c

集合名稱。

--db-name -d

資料庫名稱。

選擇性參數

--cep

用戶端加密原則,您可以將它輸入為字串或檔案,例如 --cep 或 --cep @policy-file.json 「{」includedPaths「: [{」path「: 」/path1「,」clientEncryptionKeyId「: 」key1「,」encryptionAlgorithm「: 」AEAD_AES_256_CBC_HMAC_SHA256「,」encryptionType「: 」Deterministic「}],」policyFormatVersion「: 2}」。

--default-ttl

預設 TTL。 提供 0 以停用。

--indexing-policy

索引編制原則,您可以將它輸入為字串或檔案,例如 --indexing-policy @policy-file.json) 。

預設值: { "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] }
--key

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

--name -n

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

--partition-key-path

分割區索引鍵路徑,例如 '/properties/name'。

--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 collection delete

已被取代

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

刪除 Azure Cosmos DB 集合。

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

必要參數

--collection-name -c

集合名稱。

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

已被取代

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

傳回布林值,指出集合是否存在。

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

必要參數

--collection-name -c

集合名稱。

--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 collection list

已被取代

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

列出所有 Azure Cosmos DB 集合。

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

必要參數

--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 collection show

已被取代

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

顯示 Azure Cosmos DB 集合及其供應專案。

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

必要參數

--collection-name -c

集合名稱。

--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 collection update

已被取代

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

更新 Azure Cosmos DB 集合。

az cosmosdb collection update --collection-name
                              --db-name
                              [--default-ttl]
                              [--indexing-policy]
                              [--key]
                              [--name]
                              [--resource-group-name]
                              [--throughput]
                              [--url-connection]

必要參數

--collection-name -c

集合名稱。

--db-name -d

資料庫名稱。

選擇性參數

--default-ttl

預設 TTL。 提供 0 以停用。

--indexing-policy

索引編制原則,您可以將它輸入為字串或檔案,例如 --indexing-policy @policy-file.json) 。

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