az cosmosdb sql container
Note
此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。
管理 Azure Cosmos DB SQL 容器。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az cosmosdb sql container create |
在 Azure Cosmos DB SQL 資料庫下建立 SQL 容器。 |
Core | GA |
| az cosmosdb sql container create (cosmosdb-preview 擴充功能) |
在 Azure Cosmos DB SQL 資料庫下建立 SQL 容器。 |
Extension | GA |
| az cosmosdb sql container delete |
刪除 Azure Cosmos DB SQL 資料庫下的 SQL 容器。 |
Core | GA |
| az cosmosdb sql container exists |
檢查 Azure Cosmos DB SQL 容器是否存在。 |
Core | GA |
| az cosmosdb sql container list |
列出 Azure Cosmos DB SQL 資料庫底下的 SQL 容器。 |
Core | GA |
| az cosmosdb sql container merge |
合併 sql 容器的數據分割。 |
Extension | Preview |
| az cosmosdb sql container redistribute-partition-throughput |
重新發佈 sql 容器的數據分割輸送量。 |
Extension | Preview |
| az cosmosdb sql container restore |
還原相同帳戶內已刪除的 SQL 容器。 |
Core | GA |
| az cosmosdb sql container restore (cosmosdb-preview 擴充功能) |
還原相同帳戶內已刪除的 SQL 容器。 |
Extension | Preview |
| az cosmosdb sql container retrieve-partition-throughput |
擷取 sql 容器的數據分割輸送量。 |
Extension | Preview |
| az cosmosdb sql container show |
顯示 Azure Cosmos DB SQL 資料庫下 SQL 容器的詳細數據。 |
Core | GA |
| az cosmosdb sql container throughput |
在 Azure Cosmos DB 帳戶下管理 SQL 容器的輸送量。 |
核心和擴充功能 | GA |
| az cosmosdb sql container throughput migrate |
在自動調整和手動布建之間移轉 SQL 容器的輸送量。 |
Core | GA |
| az cosmosdb sql container throughput migrate (cosmosdb-preview 擴充功能) |
在自動調整和手動布建之間移轉 SQL 容器的輸送量。 |
Extension | GA |
| az cosmosdb sql container throughput show |
取得 Azure Cosmos DB SQL 資料庫下 SQL 容器的輸送量。 |
Core | GA |
| az cosmosdb sql container throughput show (cosmosdb-preview 擴充功能) |
取得 Azure Cosmos DB SQL 資料庫下 SQL 容器的輸送量。 |
Extension | GA |
| az cosmosdb sql container throughput update |
更新 Azure Cosmos DB SQL 資料庫下 SQL 容器的輸送量。 |
Core | GA |
| az cosmosdb sql container throughput update (cosmosdb-preview 擴充功能) |
更新 Azure Cosmos DB SQL 資料庫下 SQL 容器的輸送量。 |
Extension | GA |
| az cosmosdb sql container update |
更新 Azure Cosmos DB SQL 資料庫下的 SQL 容器。 |
Core | GA |
| az cosmosdb sql container update (cosmosdb-preview 擴充功能) |
更新 Azure Cosmos DB SQL 資料庫下的 SQL 容器。 |
Extension | GA |
az cosmosdb sql container create
在 Azure Cosmos DB SQL 資料庫下建立 SQL 容器。
az cosmosdb sql container create --account-name
--database-name
--name
--partition-key-path
--resource-group
[--analytical-storage-ttl]
[--cep]
[--conflict-resolution-policy]
[--full-text-policy]
[--idx]
[--max-throughput]
[--partition-key-version]
[--throughput]
[--ttl]
[--unique-key-policy]
[--vector-embeddings]
範例
建立 Azure Cosmos DB SQL 容器。
az cosmosdb sql container create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyContainer --partition-key-path "/my/path" --idx @policy-file.json --ttl 1000 --throughput "700"
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
分割區索引鍵路徑,例如 『/address/zipcode』。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
分析 TTL,啟用分析記憶體時。
用戶端加密原則,您可以將它輸入為字串或檔案,例如 --cep 或 --cep @policy-file.json “{”includedPaths“: [{”path“: ”/path1“,”clientEncryptionKeyId“: ”key1“,”encryptionAlgorithm“: ”AEAD_AES_256_CBC_HMAC_SHA256“,”encryptionType“: ”Deterministic“}],”policyFormatVersion“: 2}”。
衝突解決原則,您可以將它輸入為字串或檔案,例如 --conflict-resolution-policy 或 --conflict-resolution-policy @policy-file.json “{”mode“: ”lastWriterWins“, ”conflictResolutionPath“: ”/path“}”。
全文檢索原則,您可以將它輸入為字串或檔案,例如 --full-text-policy 或 --full-text-policy @policy-file.json “{”fullTextPaths“: [{”path“: ”/ftPath1“, ”language“: ”en-US“ }]}”。
編製索引原則,您可以將它輸入為字串或檔案,例如 --idx @policy-file.json 或 --idx “{”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}],”vectorIndexes“: [{”path“: ”/vector1“,”type“: ”flat“}]}”。
| 屬性 | 值 |
|---|---|
| 預設值: | { "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] } |
輸送量資源上限可以調整為 (RU/秒)。 提供資源啟用自動調整時。 最小值可以是 4000 (RU/秒)。
分割區索引鍵的版本。
SQL 容器的輸送量(RU/秒)。 預設值為 400。 如果資料庫具有共用輸送量,除非容器應具有專用輸送量,否則請省略此參數。
預設 TTL。 如果值遺失或設定為 「-1」,則專案不會過期。 如果值設定為 「n」 則專案會在上次修改時間之後的 「n」 秒到期。
唯一索引鍵原則,您可以將它輸入為字串或檔案,例如 --unique-key-policy 或 --unique-key-policy @policy-file.json “{”uniqueKeys“: [{”paths“: [”/path/to/key1“]},{”paths“: [”/path/to/key2“]}}”。
向量內嵌原則,您可以將它輸入為字串或檔案,例如 --vector-embeddings @policy-file.json 或 --vector-embeddings “{”vectorEmbeddings“: [{”path“: ”/vector1“, ”dataType“: ”float32“, ”dimensions“: 2, ”distanceFunction“: ”dotproduct“ }]}”。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container create (cosmosdb-preview 擴充功能)
在 Azure Cosmos DB SQL 資料庫下建立 SQL 容器。
az cosmosdb sql container create --account-name
--database-name
--name
--partition-key-path
--resource-group
[--analytical-storage-ttl]
[--cep]
[--conflict-resolution-policy]
[--idx]
[--materialized-view-definition]
[--max-throughput]
[--partition-key-version]
[--throughput]
[--ttl]
[--unique-key-policy]
範例
建立 Azure Cosmos DB SQL 容器。
az cosmosdb sql container create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyContainer --partition-key-path "/my/path" --idx @policy-file.json --ttl 1000 --throughput "700"
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
分割區索引鍵路徑,例如 『/address/zipcode』。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
分析 TTL,啟用分析記憶體時。
用戶端加密原則,您可以將它輸入為字串或檔案,例如 --cep @policy-file.json 或 --cep “{ ”includedPaths“: [{”path“: ”/path1“,”clientEncryptionKeyId“: ”key1“,”encryptionAlgorithm“: ”AEAD_AES_256_CBC_HMAC_SHA256“,”encryptionType“: ”Deterministic“}], ”policyFormatVersion“: 2}”。
衝突解決原則,您可以將它輸入為字串或檔案,例如 --conflict-resolution-policy @policy-file.json 或 --conflict-resolution-policy “{ ”mode“: ”lastWriterWins“、”conflictResolutionPath“: ”/path“ }”。
編製索引原則,您可以將它輸入為字串或檔案, 例如,-idx @policy-file.json 或 --idx “{ ”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}] }”。
| 屬性 | 值 |
|---|---|
| 預設值: | { "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] } |
具體化檢視定義,您可以將它輸入為字串或檔案,例如 --materialized-view-definition @materializedview-definition-file.json 或 --materialized-view-definition -m '{ “sourceCollectionId”: “MySourceCollectionName”, “definition”: “SELECT * FROM root r”}'。
輸送量資源上限可以調整為 (RU/秒)。 提供資源啟用自動調整時。 最小值可以是 4000 (RU/秒)。
分割區索引鍵的版本。
SQL 容器的輸送量(RU/秒)。 預設值為 400。 如果資料庫具有共用輸送量,除非容器應具有專用輸送量,否則請省略此參數。
預設 TTL。 如果值遺失或設定為 「-1」,則專案不會過期。 如果值設定為 「n」 則專案會在上次修改時間之後的 「n」 秒到期。
唯一索引鍵原則,您可以將它輸入為字串或檔案,例如 --unique-key-policy @policy-file.json 或 --unique-key-policy “{ ”uniqueKeys“: [{”path“: [”/path/to/key1“]}, {”path“: [”/path/to/key2“}] }”。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container delete
刪除 Azure Cosmos DB SQL 資料庫下的 SQL 容器。
az cosmosdb sql container delete --account-name
--database-name
--name
--resource-group
[--yes]
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請勿提示確認。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container exists
檢查 Azure Cosmos DB SQL 容器是否存在。
az cosmosdb sql container exists --account-name
--database-name
--name
--resource-group
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container list
列出 Azure Cosmos DB SQL 資料庫底下的 SQL 容器。
az cosmosdb sql container list --account-name
--database-name
--resource-group
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container merge
此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
合併 sql 容器的數據分割。
az cosmosdb sql container merge --account-name
--database-name
--name
--resource-group
範例
容器 my-container 的合併分割區
az cosmosdb sql container merge -g my-resource-group -a my-account -d my-db --name my-container
必要參數
CosmosDB 資料庫帳戶的名稱。
CosmosDB 資料庫名稱的名稱。
CosmosDB 集合的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container redistribute-partition-throughput
此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
重新發佈 sql 容器的數據分割輸送量。
az cosmosdb sql container redistribute-partition-throughput --account-name
--database-name
--name
--resource-group
[--evenly-distribute {false, true}]
[--source-partition-info]
[--target-partition-info]
範例
將 sql 容器的數據分割輸送量平均分散到所有實體分割區之間
az cosmosdb sql container redistribute-partition-throughput --account-name account_name --database-name db_name --name container_name --resource-group rg_name --evenly-distribute
將 sql 容器的數據分割輸送量從來源數據分割重新散發至目標數據分割
az cosmosdb sql container redistribute-partition-throughput --account-name account_name --database-name db_name --name container_name --resource-group rg_name --target-partition-info 8=1200 6=1200]' --source-partition-info 9]'
必要參數
CosmosDB 資料庫帳戶的名稱。
CosmosDB 資料庫名稱的名稱。
CosmosDB 集合的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
切換為在所有實體分割區之間平均分散輸送量。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
| 接受的值: | false, true |
空間分隔的來源實體分割區標識碼,例如:1 2。
| 屬性 | 值 |
|---|---|
| 預設值: | [] |
所需目標實體分割區輸送量的相關信息,例如:0=1200 1=1200。
| 屬性 | 值 |
|---|---|
| 預設值: | [] |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container restore
還原相同帳戶內已刪除的 SQL 容器。
az cosmosdb sql container restore --account-name
--database-name
--name
--resource-group
[--disable-ttl]
[--restore-timestamp]
範例
還原相同帳戶內已刪除的 SQL 容器。
az cosmosdb sql container restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_container_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
停用 TTL 還原的旗標。
使用方式:--disable-ttl True 預設值:false。
容器必須還原至的時間戳。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container restore (cosmosdb-preview 擴充功能)
此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
還原相同帳戶內已刪除的 SQL 容器。
az cosmosdb sql container restore --account-name
--database-name
--name
--resource-group
[--disable-ttl {false, true}]
[--restore-timestamp]
範例
還原相同帳戶內已刪除的 SQL 容器。
az cosmosdb sql container restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_container_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
啟用或停用已停用ttl還原。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
容器必須還原至的時間戳。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container retrieve-partition-throughput
此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
擷取 sql 容器的數據分割輸送量。
az cosmosdb sql container retrieve-partition-throughput --account-name
--database-name
--name
--resource-group
[--all-partitions {false, true}]
[--physical-partition-ids]
範例
擷取特定實體分割區的容器container_name輸送量
az cosmosdb sql container retrieve-partition-throughput --account-name account_name --database-name db_name --name container_name --resource-group rg_name --physical-partition-ids 8 9
擷取所有實體分割區的容器container_name輸送量
az cosmosdb sql container retrieve-partition-throughput --account-name account_name --database-name db_name --name container_name --resource-group rg_name --all-partitions
必要參數
CosmosDB 資料庫帳戶的名稱。
CosmosDB 資料庫名稱的名稱。
CosmosDB 容器的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
切換以擷取所有實體分割區的輸送量。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
| 接受的值: | false, true |
實體分割區標識子的空間分隔清單。
| 屬性 | 值 |
|---|---|
| 預設值: | [] |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container show
顯示 Azure Cosmos DB SQL 資料庫下 SQL 容器的詳細數據。
az cosmosdb sql container show --account-name
--database-name
--name
--resource-group
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container update
更新 Azure Cosmos DB SQL 資料庫下的 SQL 容器。
az cosmosdb sql container update --account-name
--database-name
--name
--resource-group
[--analytical-storage-ttl]
[--full-text-policy]
[--idx]
[--ttl]
[--vector-embeddings]
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
分析 TTL,啟用分析記憶體時。
全文檢索原則,您可以將它輸入為字串或檔案,例如 --full-text-policy 或 --full-text-policy @policy-file.json “{”fullTextPaths“: [{”path“: ”/ftPath1“, ”language“: ”en-US“ }]}”。
編製索引原則,您可以將它輸入為字串或檔案,例如 --idx @policy-file.json 或 --idx “{”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}],”vectorIndexes“: [{”path“: ”/vector1“,”type“: ”flat“}]}”。
預設 TTL。 如果值遺失或設定為 「-1」,則專案不會過期。 如果值設定為 「n」 則專案會在上次修改時間之後的 「n」 秒到期。
向量內嵌原則,您可以將它輸入為字串或檔案,例如 --vector-embeddings @policy-file.json 或 --vector-embeddings “{”vectorEmbeddings“: [{”path“: ”/vector1“, ”dataType“: ”float32“, ”dimensions“: 2, ”distanceFunction“: ”dotproduct“ }]}”。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql container update (cosmosdb-preview 擴充功能)
更新 Azure Cosmos DB SQL 資料庫下的 SQL 容器。
az cosmosdb sql container update --account-name
--database-name
--name
--resource-group
[--analytical-storage-ttl]
[--idx]
[--materialized-view-definition]
[--ttl]
必要參數
Cosmosdb 帳戶名稱。
資料庫名稱。
容器名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
分析 TTL,啟用分析記憶體時。
編製索引原則,您可以將它輸入為字串或檔案, 例如,-idx @policy-file.json 或 --idx “{ ”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}] }”。
具體化檢視定義,您可以將它輸入為字串或檔案,例如 --materialized-view-definition @materializedview-definition-file.json 或 --materialized-view-definition -m '{ “sourceCollectionId”: “MySourceCollectionName”, “definition”: “SELECT * FROM root r”}'。
預設 TTL。 如果值遺失或設定為 「-1」,則專案不會過期。 如果值設定為 「n」 則專案會在上次修改時間之後的 「n」 秒到期。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |