az cosmosdb

注意

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

管理 Azure Cosmos DB 資料庫帳戶。

命令

名稱 Description 類型 狀態
az cosmosdb cassandra

管理 Azure Cosmos DB 帳戶的 Cassandra 資源。

核心 GA
az cosmosdb cassandra keyspace

管理 Azure Cosmos DB Cassandra keyspaces。

核心 GA
az cosmosdb cassandra keyspace create

在 Azure Cosmos DB 帳戶下建立 Cassandra Keyspace。

核心 GA
az cosmosdb cassandra keyspace delete

刪除 Azure Cosmos DB 帳戶底下的 Cassandra Keyspace。

核心 GA
az cosmosdb cassandra keyspace exists

檢查 Azure Cosmos DB Cassandra Keyspace 是否存在。

核心 GA
az cosmosdb cassandra keyspace list

列出 Azure Cosmos DB 帳戶底下的 Cassandra 密鑰空間。

核心 GA
az cosmosdb cassandra keyspace show

顯示 Azure Cosmos DB 帳戶下 Cassandra Keyspace 的詳細數據。

核心 GA
az cosmosdb cassandra keyspace throughput

管理 Azure Cosmos DB 帳戶下 Cassandra Keyspace 的輸送量。

核心 GA
az cosmosdb cassandra keyspace throughput migrate

在自動調整和手動布建之間移轉 Cassandra Keyspace 的輸送量。

核心 GA
az cosmosdb cassandra keyspace throughput show

取得 Azure Cosmos DB 帳戶下 Cassandra Keyspace 的輸送量。

核心 GA
az cosmosdb cassandra keyspace throughput update

更新 Azure Cosmos DB 帳戶下 Cassandra Keyspace 的輸送量。

核心 GA
az cosmosdb cassandra table

管理 Azure Cosmos DB Cassandra 數據表。

核心 GA
az cosmosdb cassandra table create

在 Azure Cosmos DB Cassandra keyspace 下建立 Cassandra 數據表。

核心 GA
az cosmosdb cassandra table delete

刪除 Azure Cosmos DB Cassandra keyspace 底下的 Cassandra 數據表。

核心 GA
az cosmosdb cassandra table exists

檢查 Azure Cosmos DB Cassandra 數據表是否存在。

核心 GA
az cosmosdb cassandra table list

列出 Azure Cosmos DB Cassandra keyspace 底下的 Cassandra 數據表。

核心 GA
az cosmosdb cassandra table show

顯示 Azure Cosmos DB Cassandra keyspace 底下 Cassandra 數據表的詳細數據。

核心 GA
az cosmosdb cassandra table throughput

管理 Azure Cosmos DB 帳戶下 Cassandra 數據表的輸送量。

核心 GA
az cosmosdb cassandra table throughput migrate

在自動調整和手動布建之間移轉 Cassandra 數據表的輸送量。

核心 GA
az cosmosdb cassandra table throughput show

取得 Azure Cosmos DB Cassandra keyspace 下 Cassandra 數據表的輸送量。

核心 GA
az cosmosdb cassandra table throughput update

更新 Azure Cosmos DB Cassandra keyspace 下 Cassandra 數據表的輸送量。

核心 GA
az cosmosdb cassandra table update

更新 Azure Cosmos DB Cassandra keyspace 底下的 Cassandra 數據表。

核心 GA
az cosmosdb check-name-exists

檢查 Azure Cosmos DB 帳戶名稱是否存在。

核心 GA
az cosmosdb collection

管理 Azure Cosmos DB 集合。

核心 已取代
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 copy

管理容器複製作業。

副檔名 預覽​​
az cosmosdb copy cancel

取消容器複製作業。

副檔名 預覽​​
az cosmosdb copy complete

完成在線容器複製作業。

副檔名 預覽​​
az cosmosdb copy create

建立容器複製作業。

副檔名 預覽​​
az cosmosdb copy list

取得容器複製作業。

副檔名 預覽​​
az cosmosdb copy pause

暫停容器複製作業。

副檔名 預覽​​
az cosmosdb copy resume

繼續容器複製作業。

副檔名 預覽​​
az cosmosdb copy show

取得容器複製作業。

副檔名 預覽​​
az cosmosdb create

建立新的 Azure Cosmos DB 資料庫帳戶。

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

建立新的 Azure Cosmos DB 資料庫帳戶。

副檔名 預覽​​
az cosmosdb database

管理 Azure Cosmos DB 資料庫。

核心 已取代
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 delete

刪除 Azure Cosmos DB 資料庫帳戶。

核心 GA
az cosmosdb dts

使用cosmosdb管理資料傳輸作業。

副檔名 預覽和已淘汰
az cosmosdb dts cancel

取消資料傳輸作業。

副檔名 預覽和已淘汰
az cosmosdb dts copy

建立數據傳輸複製作業。

副檔名 預覽和已淘汰
az cosmosdb dts list

取得資料傳輸作業的清單。

副檔名 預覽和已淘汰
az cosmosdb dts pause

暫停數據傳輸作業。

副檔名 預覽和已淘汰
az cosmosdb dts resume

繼續數據傳輸作業。

副檔名 預覽和已淘汰
az cosmosdb dts show

取得數據傳輸作業。

副檔名 預覽和已淘汰
az cosmosdb failover-priority-change

變更 Azure Cosmos DB 資料庫帳戶的故障轉移優先順序。

核心 GA
az cosmosdb gremlin

管理 Azure Cosmos DB 帳戶的 Gremlin 資源。

核心和擴充功能 GA
az cosmosdb gremlin database

管理 Azure Cosmos DB Gremlin 資料庫。

核心和擴充功能 GA
az cosmosdb gremlin database create

在 Azure Cosmos DB 帳戶下建立 Gremlin 資料庫。

核心 GA
az cosmosdb gremlin database delete

刪除 Azure Cosmos DB 帳戶底下的 Gremlin 資料庫。

核心 GA
az cosmosdb gremlin database exists

檢查 Azure Cosmos DB Gremlin 資料庫是否存在。

核心 GA
az cosmosdb gremlin database list

列出 Azure Cosmos DB 帳戶底下的 Gremlin 資料庫。

核心 GA
az cosmosdb gremlin database restore

還原相同帳戶內已刪除的 gremlin 資料庫。

核心 GA
az cosmosdb gremlin database restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的 gremlin 資料庫。

副檔名 預覽​​
az cosmosdb gremlin database show

在 Azure Cosmos DB 帳戶下顯示 Gremlin 資料庫的詳細數據。

核心 GA
az cosmosdb gremlin database throughput

在 Azure Cosmos DB 帳戶下管理 Gremlin 資料庫的輸送量。

核心 GA
az cosmosdb gremlin database throughput migrate

在自動調整和手動布建之間移轉 Gremlin 資料庫的輸送量。

核心 GA
az cosmosdb gremlin database throughput show

取得 Azure Cosmos DB 帳戶下 Gremlin 資料庫的輸送量。

核心 GA
az cosmosdb gremlin database throughput update

更新 Azure Cosmos DB 帳戶下 Gremlin 資料庫的輸送量。

核心 GA
az cosmosdb gremlin graph

管理 Azure Cosmos DB Gremlin 圖形。

核心和擴充功能 GA
az cosmosdb gremlin graph create

在 Azure Cosmos DB Gremlin 資料庫下建立 Gremlin 圖形。

核心 GA
az cosmosdb gremlin graph delete

刪除 Azure Cosmos DB Gremlin 資料庫底下的 Gremlin 圖形。

核心 GA
az cosmosdb gremlin graph exists

檢查 Azure Cosmos DB Gremlin 圖形是否存在。

核心 GA
az cosmosdb gremlin graph list

列出 Azure Cosmos DB Gremlin 資料庫底下的 Gremlin 圖形。

核心 GA
az cosmosdb gremlin graph restore

還原相同帳戶內已刪除的 gremlin 圖形。

核心 GA
az cosmosdb gremlin graph restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的 gremlin 圖形。

副檔名 預覽​​
az cosmosdb gremlin graph show

在 Azure Cosmos DB Gremlin 資料庫下顯示 Gremlin 圖形的詳細數據。

核心 GA
az cosmosdb gremlin graph throughput

在 Azure Cosmos DB 帳戶下管理 Gremlin 圖形的輸送量。

核心 GA
az cosmosdb gremlin graph throughput migrate

在自動調整和手動布建之間移轉 Gremlin Graph 的輸送量。

核心 GA
az cosmosdb gremlin graph throughput show

取得 Azure Cosmos DB Gremlin 資料庫下 Gremlin 圖形的輸送量。

核心 GA
az cosmosdb gremlin graph throughput update

更新 Azure Cosmos DB Gremlin 資料庫下 Gremlin 圖形的輸送量。

核心 GA
az cosmosdb gremlin graph update

更新 Azure Cosmos DB Gremlin 資料庫下的 Gremlin 圖形。

核心 GA
az cosmosdb gremlin restorable-database

管理可在 Azure Cosmos DB 帳戶中還原的不同 Gremlin 資料庫版本。

核心和擴充功能 GA
az cosmosdb gremlin restorable-database list

列出在指定可還原帳戶中建立/修改/刪除之所有 gremlin 資料庫的所有版本。

核心 GA
az cosmosdb gremlin restorable-database list (cosmosdb-preview 擴充功能)

列出在指定可還原帳戶中建立/修改/刪除之所有 gremlin 資料庫的所有版本。

副檔名 預覽​​
az cosmosdb gremlin restorable-graph

管理 Azure Cosmos DB 帳戶資料庫中可還原的不同 Gremlin 圖形版本。

核心和擴充功能 GA
az cosmosdb gremlin restorable-graph list

列出在指定資料庫中建立/修改/刪除的所有 gremlin 圖形版本,以及可還原的帳戶。

核心 GA
az cosmosdb gremlin restorable-graph list (cosmosdb-preview 擴充功能)

列出在指定資料庫中建立/修改/刪除的所有 gremlin 圖形版本,以及可還原的帳戶。

副檔名 預覽​​
az cosmosdb gremlin restorable-resource

在指定的時間戳和區域中,管理可在指定帳戶中還原的資料庫及其圖形。

核心和擴充功能 GA
az cosmosdb gremlin restorable-resource list

列出可在指定時間戳和區域之指定帳戶中還原的所有資料庫及其圖形。

核心 GA
az cosmosdb gremlin restorable-resource list (cosmosdb-preview 擴充功能)

列出可在指定時間戳和區域之指定帳戶中還原的所有資料庫及其圖形。

副檔名 預覽​​
az cosmosdb gremlin retrieve-latest-backup-time

擷取指定區域中指定 gremlin 圖形的最新可還原時間戳。

核心 GA
az cosmosdb gremlin retrieve-latest-backup-time (cosmosdb-preview 擴充功能)

擷取指定區域中指定 gremlin 圖形的最新可還原時間戳。

副檔名 預覽​​
az cosmosdb identity

管理 Azure Cosmos DB 受控服務識別。

核心 預覽​​
az cosmosdb identity assign

指派 Azure Cosmos DB 資料庫帳戶的 SystemAssigned 身分識別。

核心 預覽​​
az cosmosdb identity remove

拿掉 Azure Cosmos DB 資料庫帳戶的 SystemAssigned 身分識別。

核心 預覽​​
az cosmosdb identity show

顯示 Azure Cosmos DB 資料庫帳戶的身分識別。

核心 預覽​​
az cosmosdb keys

管理 Azure Cosmos DB 金鑰。

核心 GA
az cosmosdb keys list

列出 Azure Cosmos DB 資料庫帳戶的存取密鑰或 連接字串。

核心 GA
az cosmosdb keys regenerate

重新產生 Azure Cosmos DB 資料庫帳戶的存取密鑰。

核心 GA
az cosmosdb list

列出 Azure Cosmos DB 資料庫帳戶。

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

列出 Azure Cosmos DB 資料庫帳戶。

副檔名 GA
az cosmosdb list-connection-strings

列出 Azure Cosmos DB 資料庫帳戶的 連接字串。

核心 已取代
az cosmosdb list-keys

列出 Azure Cosmos DB 資料庫帳戶的存取密鑰。

核心 已取代
az cosmosdb list-read-only-keys

列出 Azure Cosmos DB 資料庫帳戶的唯讀取密鑰。

核心 已取代
az cosmosdb locations

管理 Azure Cosmos DB 位置屬性。

核心 GA
az cosmosdb locations list

擷取 cosmosdb 位置和其屬性的清單。

核心 GA
az cosmosdb locations show

顯示指定位置中的 Azure Cosmos DB 位置屬性。

核心 GA
az cosmosdb mongocluster

Mongo 叢集。

副檔名 預覽​​
az cosmosdb mongocluster create

建立 Mongo 叢集。

副檔名 預覽​​
az cosmosdb mongocluster delete

刪除 Mongo 叢集資源。

副檔名 預覽​​
az cosmosdb mongocluster firewall

Mongo 叢集防火牆。

副檔名 預覽​​
az cosmosdb mongocluster firewall rule

Mongo 叢集防火牆規則。

副檔名 預覽​​
az cosmosdb mongocluster firewall rule create

建立 Mongo 叢集防火牆規則。

副檔名 預覽​​
az cosmosdb mongocluster firewall rule delete

刪除 Mongo 叢集防火牆規則。

副檔名 預覽​​
az cosmosdb mongocluster firewall rule list

列出 Mongo 叢集上的防火牆規則。

副檔名 預覽​​
az cosmosdb mongocluster firewall rule show

取得 Mongo 叢集防火牆規則。

副檔名 預覽​​
az cosmosdb mongocluster firewall rule update

建立 Mongo 叢集防火牆規則。

副檔名 預覽​​
az cosmosdb mongocluster list

列出 Mongo 叢集資源。

副檔名 預覽​​
az cosmosdb mongocluster show

取得 Mongo 叢集資源。

副檔名 預覽​​
az cosmosdb mongocluster update

更新 Mongo 叢集。

副檔名 預覽​​
az cosmosdb mongodb

管理 Azure Cosmos DB 帳戶的 MongoDB 資源。

核心和擴充功能 GA
az cosmosdb mongodb collection

管理 Azure Cosmos DB MongoDB 集合。

核心和擴充功能 GA
az cosmosdb mongodb collection create

在 Azure Cosmos DB MongoDB 資料庫下建立 MongoDB 集合。

核心 GA
az cosmosdb mongodb collection delete

刪除 Azure Cosmos DB MongoDB 資料庫下的 MongoDB 集合。

核心 GA
az cosmosdb mongodb collection exists

檢查 Azure Cosmos DB MongoDB 集合是否存在。

核心 GA
az cosmosdb mongodb collection list

列出 Azure Cosmos DB MongoDB 資料庫底下的 MongoDB 集合。

核心 GA
az cosmosdb mongodb collection merge

合併 mongodb 集合的數據分割。

副檔名 預覽​​
az cosmosdb mongodb collection redistribute-partition-throughput

重新發佈 mongodb 集合的數據分割輸送量。

副檔名 預覽​​
az cosmosdb mongodb collection restore

還原相同帳戶內已刪除的 mongodb 集合。

核心 GA
az cosmosdb mongodb collection restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的 mongodb 集合。

副檔名 預覽​​
az cosmosdb mongodb collection retrieve-partition-throughput

擷取 mongodb 集合的數據分割輸送量。

副檔名 預覽​​
az cosmosdb mongodb collection show

顯示 Azure Cosmos DB MongoDB 資料庫下 MongoDB 集合的詳細數據。

核心 GA
az cosmosdb mongodb collection throughput

在 Azure Cosmos DB 帳戶下管理 MongoDB 集合的輸送量。

核心 GA
az cosmosdb mongodb collection throughput migrate

在自動調整和手動布建之間移轉 MongoDB 集合的輸送量。

核心 GA
az cosmosdb mongodb collection throughput show

取得 Azure Cosmos DB MongoDB 資料庫下 MongoDB 集合的輸送量。

核心 GA
az cosmosdb mongodb collection throughput update

更新 Azure Cosmos DB MongoDB 資料庫下 MongoDB 集合的輸送量。

核心 GA
az cosmosdb mongodb collection update

更新 Azure Cosmos DB MongoDB 資料庫下的 MongoDB 集合。

核心 GA
az cosmosdb mongodb database

管理 Azure Cosmos DB MongoDB 資料庫。

核心和擴充功能 GA
az cosmosdb mongodb database create

在 Azure Cosmos DB 帳戶下建立 MongoDB 資料庫。

核心 GA
az cosmosdb mongodb database delete

刪除 Azure Cosmos DB 帳戶下的 MongoDB 資料庫。

核心 GA
az cosmosdb mongodb database exists

檢查 Azure Cosmos DB MongoDB 資料庫是否存在。

核心 GA
az cosmosdb mongodb database list

列出 Azure Cosmos DB 帳戶下的 MongoDB 資料庫。

核心 GA
az cosmosdb mongodb database merge

合併 mongodb 資料庫的分割區。

副檔名 預覽​​
az cosmosdb mongodb database restore

還原相同帳戶內已刪除的 mongodb 資料庫。

核心 GA
az cosmosdb mongodb database restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的 mongodb 資料庫。

副檔名 預覽​​
az cosmosdb mongodb database show

在 Azure Cosmos DB 帳戶下顯示 MongoDB 資料庫的詳細數據。

核心 GA
az cosmosdb mongodb database throughput

在 Azure Cosmos DB 帳戶下管理 MongoDB 資料庫的輸送量。

核心 GA
az cosmosdb mongodb database throughput migrate

在自動調整和手動布建之間移轉 MongoDB 資料庫的輸送量。

核心 GA
az cosmosdb mongodb database throughput show

取得 Azure Cosmos DB 帳戶下 MongoDB 資料庫的輸送量。

核心 GA
az cosmosdb mongodb database throughput update

更新 Azure Cosmos DB 帳戶下 MongoDB 資料庫的輸送量。

核心 GA
az cosmosdb mongodb restorable-collection

管理可在 Azure Cosmos DB 帳戶資料庫中還原的不同 mongodb 集合版本。

核心和擴充功能 GA
az cosmosdb mongodb restorable-collection list

列出在指定資料庫中建立/修改/刪除的所有 mongodb 集合版本,以及可還原的帳戶。

核心 GA
az cosmosdb mongodb restorable-collection list (cosmosdb-preview 擴充功能)

列出在指定資料庫中建立/修改/刪除的所有 mongodb 集合版本,以及可還原的帳戶。

副檔名 預覽​​
az cosmosdb mongodb restorable-database

管理可在 Azure Cosmos DB 帳戶中還原的不同 Mongodb 資料庫版本。

核心 GA
az cosmosdb mongodb restorable-database list

列出在指定可還原帳戶中建立/修改/刪除的所有 mongodb 資料庫版本。

核心 GA
az cosmosdb mongodb restorable-resource

管理資料庫及其集合,這些資料庫可以在指定的時間取樣和區域中還原於指定的帳戶中。

核心 GA
az cosmosdb mongodb restorable-resource list

列出可在指定時間取樣和區域之指定帳戶中還原的所有資料庫及其集合。

核心 GA
az cosmosdb mongodb retrieve-latest-backup-time

擷取指定區域中指定 mongodb 集合的最新可還原時間戳。

核心 GA
az cosmosdb mongodb role

管理 Azure Cosmos DB Mongo 角色資源。

核心和擴充功能 GA
az cosmosdb mongodb role definition

管理 Azure Cosmos DB Mongo 角色定義。

核心和擴充功能 GA
az cosmosdb mongodb role definition create

在 Azure Cosmos DB 帳戶下建立 Mongo DB 角色定義。

核心 GA
az cosmosdb mongodb role definition create (cosmosdb-preview 擴充功能)

在 Azure Cosmos DB 帳戶下建立 Mongo DB 角色定義。

副檔名 GA
az cosmosdb mongodb role definition delete

刪除 Azure Cosmos DB 帳戶底下的 CosmosDb MongoDb 角色定義。

核心 GA
az cosmosdb mongodb role definition delete (cosmosdb-preview 擴充功能)

刪除 Azure Cosmos DB 帳戶底下的 CosmosDb MongoDb 角色定義。

副檔名 GA
az cosmosdb mongodb role definition exists

檢查 Azure Cosmos DB MongoDb 角色定義是否存在。

核心 GA
az cosmosdb mongodb role definition exists (cosmosdb-preview 擴充功能)

檢查 Azure Cosmos DB MongoDb 角色定義是否存在。

副檔名 GA
az cosmosdb mongodb role definition list

列出 Azure Cosmos DB 帳戶下的所有 MongoDb 角色定義。

核心 GA
az cosmosdb mongodb role definition list (cosmosdb-preview 擴充功能)

列出 Azure Cosmos DB 帳戶下的所有 MongoDb 角色定義。

副檔名 GA
az cosmosdb mongodb role definition show

顯示 Azure Cosmos DB 帳戶下 MongoDb 角色定義的屬性。

核心 GA
az cosmosdb mongodb role definition show (cosmosdb-preview 擴充功能)

顯示 Azure Cosmos DB 帳戶下 MongoDb 角色定義的屬性。

副檔名 GA
az cosmosdb mongodb role definition update

更新 Azure Cosmos DB 帳戶下的 MongoDb 角色定義。

核心 GA
az cosmosdb mongodb role definition update (cosmosdb-preview 擴充功能)

更新 Azure Cosmos DB 帳戶下的 MongoDb 角色定義。

副檔名 GA
az cosmosdb mongodb user

管理 Azure Cosmos DB Mongo 用戶資源。

核心和擴充功能 GA
az cosmosdb mongodb user definition

管理 Azure Cosmos DB Mongo 用戶定義。

核心和擴充功能 GA
az cosmosdb mongodb user definition create

在 Azure Cosmos DB 帳戶下建立 Mongo DB 用戶定義。

核心 GA
az cosmosdb mongodb user definition create (cosmosdb-preview 擴充功能)

在 Azure Cosmos DB 帳戶下建立 Mongo DB 用戶定義。

副檔名 GA
az cosmosdb mongodb user definition delete

刪除 Azure Cosmos DB 帳戶底下的 CosmosDb MongoDb 用戶定義。

核心 GA
az cosmosdb mongodb user definition delete (cosmosdb-preview 擴充功能)

刪除 Azure Cosmos DB 帳戶底下的 CosmosDb MongoDb 用戶定義。

副檔名 GA
az cosmosdb mongodb user definition exists

檢查 Azure Cosmos DB MongoDb 使用者定義是否存在。

核心 GA
az cosmosdb mongodb user definition exists (cosmosdb-preview 擴充功能)

檢查 Azure Cosmos DB MongoDb 使用者定義是否存在。

副檔名 GA
az cosmosdb mongodb user definition list

列出 Azure Cosmos DB 帳戶下的所有 MongoDb 用戶定義。

核心 GA
az cosmosdb mongodb user definition list (cosmosdb-preview 擴充功能)

列出 Azure Cosmos DB 帳戶下的所有 MongoDb 用戶定義。

副檔名 GA
az cosmosdb mongodb user definition show

在 Azure Cosmos DB 帳戶下顯示 MongoDb 使用者定義的屬性。

核心 GA
az cosmosdb mongodb user definition show (cosmosdb-preview 擴充功能)

在 Azure Cosmos DB 帳戶下顯示 MongoDb 使用者定義的屬性。

副檔名 GA
az cosmosdb mongodb user definition update

更新 Azure Cosmos DB 帳戶下的 MongoDb 用戶定義。

核心 GA
az cosmosdb mongodb user definition update (cosmosdb-preview 擴充功能)

更新 Azure Cosmos DB 帳戶下的 MongoDb 用戶定義。

副檔名 GA
az cosmosdb network-rule

管理 Azure Cosmos DB 網路規則。

核心 GA
az cosmosdb network-rule add

將虛擬網路規則新增至現有的 Cosmos DB 資料庫帳戶。

核心 GA
az cosmosdb network-rule list

列出與 Cosmos DB 帳戶相關聯的虛擬網路帳戶。

核心 GA
az cosmosdb network-rule remove

從現有的 Cosmos DB 資料庫帳戶中移除虛擬網路規則。

核心 GA
az cosmosdb postgres

管理適用於 PostgreSQL 資源的 Azure Cosmos DB。

核心 GA
az cosmosdb postgres check-name-availability

檢查叢集名稱的可用性。 叢集名稱應該是全域唯一的;至少 3 個字元,最多 40 個字元;它們只能包含小寫字母、數位和連字元;和不得以連字元開頭或結尾。

核心 GA
az cosmosdb postgres cluster

管理適用於 PostgreSQL 叢集的 Azure Cosmos DB。

核心 GA
az cosmosdb postgres cluster create

使用節點建立新的叢集。

核心 GA
az cosmosdb postgres cluster delete

將叢集與其中節點一起刪除。

核心 GA
az cosmosdb postgres cluster list

列出訂用帳戶或資源群組中的所有叢集。

核心 GA
az cosmosdb postgres cluster promote

將讀取複本叢集升階為獨立的讀寫叢集。

核心 GA
az cosmosdb postgres cluster restart

重新啟動叢集中的所有節點。

核心 GA
az cosmosdb postgres cluster server

管理適用於 PostgreSQL 叢集伺服器的 Azure Cosmos DB。

核心 GA
az cosmosdb postgres cluster server list

列出叢集的節點。

核心 GA
az cosmosdb postgres cluster server show

取得叢集中節點的相關信息。

核心 GA
az cosmosdb postgres cluster show

取得叢集的相關信息,例如計算和記憶體組態,以及叢集生命週期元數據,例如叢集建立日期和時間。

核心 GA
az cosmosdb postgres cluster start

在所有叢集節點上啟動已停止的計算。

核心 GA
az cosmosdb postgres cluster stop

停止所有叢集節點上的計算。

核心 GA
az cosmosdb postgres cluster update

更新現有的叢集。 要求主體可以包含叢集定義的一或多個屬性。

核心 GA
az cosmosdb postgres cluster wait

將 CLI 置於等候狀態,直到符合條件為止。

核心 GA
az cosmosdb postgres configuration

管理適用於 PostgreSQL 設定的 Azure Cosmos DB。

核心 GA
az cosmosdb postgres configuration coordinator

管理適用於 PostgreSQL 的 Azure Cosmos DB 協調器設定。

核心 GA
az cosmosdb postgres configuration coordinator show

取得協調器設定的資訊。

核心 GA
az cosmosdb postgres configuration coordinator update

更新 叢集中協調器設定。

核心 GA
az cosmosdb postgres configuration coordinator wait

將 CLI 置於等候狀態,直到符合條件為止。

核心 GA
az cosmosdb postgres configuration list

列出叢集的所有組態。

核心 GA
az cosmosdb postgres configuration node

管理適用於 PostgreSQL 的 Azure Cosmos DB 節點組態。

核心 GA
az cosmosdb postgres configuration node show

取得背景工作節點的組態資訊。

核心 GA
az cosmosdb postgres configuration node update

更新 叢集中背景工作節點的設定。

核心 GA
az cosmosdb postgres configuration node wait

將 CLI 置於等候狀態,直到符合條件為止。

核心 GA
az cosmosdb postgres configuration server

管理適用於 PostgreSQL 的 Azure Cosmos DB 伺服器組態。

核心 GA
az cosmosdb postgres configuration server list

列出叢集中伺服器的所有組態。

核心 GA
az cosmosdb postgres configuration show

取得協調器和節點的組態資訊。

核心 GA
az cosmosdb postgres firewall-rule

管理適用於 PostgreSQL 的 Azure Cosmos DB 防火牆規則。

核心 GA
az cosmosdb postgres firewall-rule create

建立新的叢集防火牆規則,或更新現有的叢集防火牆規則。

核心 GA
az cosmosdb postgres firewall-rule delete

刪除叢集防火牆規則。

核心 GA
az cosmosdb postgres firewall-rule list

列出叢集上的所有防火牆規則。

核心 GA
az cosmosdb postgres firewall-rule show

取得叢集防火牆規則的相關信息。

核心 GA
az cosmosdb postgres firewall-rule update

更新現有的叢集防火牆規則。

核心 GA
az cosmosdb postgres firewall-rule wait

將 CLI 置於等候狀態,直到符合條件為止。

核心 GA
az cosmosdb postgres role

管理適用於 PostgreSQL 角色的 Azure Cosmos DB。

核心 GA
az cosmosdb postgres role create

建立新的角色或更新現有的角色。

核心 GA
az cosmosdb postgres role delete

刪除叢集角色。

核心 GA
az cosmosdb postgres role list

列出指定叢集中的所有角色。

核心 GA
az cosmosdb postgres role show

取得叢集角色的相關信息。

核心 GA
az cosmosdb postgres role update

更新現有的角色。

核心 GA
az cosmosdb postgres role wait

將 CLI 置於等候狀態,直到符合條件為止。

核心 GA
az cosmosdb private-endpoint-connection

管理 Azure Cosmos DB 私人端點連線。

核心 GA
az cosmosdb private-endpoint-connection approve

核准與 Azure Cosmos DB 相關聯的指定私人端點連線。

核心 GA
az cosmosdb private-endpoint-connection delete

刪除與 Azure Cosmos DB 相關聯的指定私人端點連線。

核心 GA
az cosmosdb private-endpoint-connection reject

拒絕與 Azure Cosmos DB 相關聯的指定私人端點連線。

核心 GA
az cosmosdb private-endpoint-connection show

顯示與 Azure Cosmos DB 相關聯的私人端點連線詳細數據。

核心 GA
az cosmosdb private-link-resource

管理 Azure Cosmos DB 私人鏈接資源。

核心 GA
az cosmosdb private-link-resource list

列出 Azure Cosmos DB 支援的私人鏈接資源。

核心 GA
az cosmosdb regenerate-key

重新產生 Azure Cosmos DB 資料庫帳戶的存取密鑰。

核心 已取代
az cosmosdb restorable-database-account

管理可還原的 Azure Cosmos DB 帳戶。

核心和擴充功能 GA
az cosmosdb restorable-database-account list

列出可以還原的所有資料庫帳戶。

核心 GA
az cosmosdb restorable-database-account list (cosmosdb-preview 擴充功能)

列出可以還原的所有資料庫帳戶。

副檔名 GA
az cosmosdb restorable-database-account show

顯示可還原之資料庫帳戶的詳細數據。

核心 GA
az cosmosdb restorable-database-account show (cosmosdb-preview 擴充功能)

顯示可還原之資料庫帳戶的詳細數據。

副檔名 GA
az cosmosdb restore

從現有的資料庫帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶。

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

從現有的資料庫帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶。

副檔名 預覽​​
az cosmosdb service

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

核心和擴充功能 GA
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 show

取得 Azure Cosmos DB 資料庫帳戶的詳細數據。

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

取得 Azure Cosmos DB 資料庫帳戶的詳細數據。

副檔名 GA
az cosmosdb sql

管理 Azure Cosmos DB 帳戶的 SQL 資源。

核心和擴充功能 GA
az cosmosdb sql container

管理 Azure Cosmos DB SQL 容器。

核心和擴充功能 GA
az cosmosdb sql container create

在 Azure Cosmos DB SQL 資料庫下建立 SQL 容器。

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

在 Azure Cosmos DB SQL 資料庫下建立 SQL 容器。

副檔名 GA
az cosmosdb sql container delete

刪除 Azure Cosmos DB SQL 資料庫下的 SQL 容器。

核心 GA
az cosmosdb sql container exists

檢查 Azure Cosmos DB SQL 容器是否存在。

核心 GA
az cosmosdb sql container list

列出 Azure Cosmos DB SQL 資料庫底下的 SQL 容器。

核心 GA
az cosmosdb sql container merge

合併 sql 容器的數據分割。

副檔名 預覽​​
az cosmosdb sql container redistribute-partition-throughput

重新發佈 sql 容器的數據分割輸送量。

副檔名 預覽​​
az cosmosdb sql container restore

還原相同帳戶內已刪除的 SQL 容器。

核心 GA
az cosmosdb sql container restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的 SQL 容器。

副檔名 預覽​​
az cosmosdb sql container retrieve-partition-throughput

擷取 sql 容器的數據分割輸送量。

副檔名 預覽​​
az cosmosdb sql container show

顯示 Azure Cosmos DB SQL 資料庫下 SQL 容器的詳細數據。

核心 GA
az cosmosdb sql container throughput

在 Azure Cosmos DB 帳戶下管理 SQL 容器的輸送量。

核心 GA
az cosmosdb sql container throughput migrate

在自動調整和手動布建之間移轉 SQL 容器的輸送量。

核心 GA
az cosmosdb sql container throughput show

取得 Azure Cosmos DB SQL 資料庫下 SQL 容器的輸送量。

核心 GA
az cosmosdb sql container throughput update

更新 Azure Cosmos DB SQL 資料庫下 SQL 容器的輸送量。

核心 GA
az cosmosdb sql container update

更新 Azure Cosmos DB SQL 資料庫下的 SQL 容器。

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

更新 Azure Cosmos DB SQL 資料庫下的 SQL 容器。

副檔名 GA
az cosmosdb sql database

管理 Azure Cosmos DB SQL 資料庫。

核心和擴充功能 GA
az cosmosdb sql database create

在 Azure Cosmos DB 帳戶下建立 SQL 資料庫。

核心 GA
az cosmosdb sql database delete

刪除 Azure Cosmos DB 帳戶下的 SQL 資料庫。

核心 GA
az cosmosdb sql database exists

檢查 Azure Cosmos DB SQL 資料庫是否存在。

核心 GA
az cosmosdb sql database list

列出 Azure Cosmos DB 帳戶下的 SQL 資料庫。

核心 GA
az cosmosdb sql database merge

合併 sql Database 的數據分割。

副檔名 預覽​​
az cosmosdb sql database restore

還原相同帳戶內已刪除的 SQL 資料庫。

核心 GA
az cosmosdb sql database restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的 SQL 資料庫。

副檔名 預覽​​
az cosmosdb sql database show

在 Azure Cosmos DB 帳戶下顯示 SQL 資料庫的詳細數據。

核心 GA
az cosmosdb sql database throughput

在 Azure Cosmos DB 帳戶下管理 SQL 資料庫的輸送量。

核心 GA
az cosmosdb sql database throughput migrate

在自動調整和手動布建之間移轉 SQL 資料庫的輸送量。

核心 GA
az cosmosdb sql database throughput show

取得 Azure Cosmos DB 帳戶下 SQL 資料庫的輸送量。

核心 GA
az cosmosdb sql database throughput update

更新 Azure Cosmos DB 帳戶下 SQL 資料庫的輸送量。

核心 GA
az cosmosdb sql restorable-container

管理可在 Azure Cosmos DB 帳戶資料庫中還原的不同 SQL 容器版本。

核心和擴充功能 GA
az cosmosdb sql restorable-container list

列出在指定資料庫中建立/修改/刪除的所有 SQL 容器版本,以及可還原的帳戶。

核心 GA
az cosmosdb sql restorable-container list (cosmosdb-preview 擴充功能)

列出在指定資料庫中建立/修改/刪除的所有 SQL 容器版本,以及可還原的帳戶。

副檔名 預覽​​
az cosmosdb sql restorable-database

管理可在 Azure Cosmos DB 帳戶中還原的不同 SQL 資料庫版本。

核心 GA
az cosmosdb sql restorable-database list

列出在指定可還原帳戶中建立/修改/刪除的所有 SQL 資料庫版本。

核心 GA
az cosmosdb sql restorable-resource

管理可在指定時間取樣和區域的指定帳戶中還原的資料庫及其容器。

核心 GA
az cosmosdb sql restorable-resource list

列出可在指定時間取樣和區域之指定帳戶中還原的所有資料庫及其容器。

核心 GA
az cosmosdb sql retrieve-latest-backup-time

擷取指定區域中指定 SQL 容器的最新可還原時間戳。

核心 GA
az cosmosdb sql role

管理 Azure Cosmos DB SQL 角色資源。

核心 GA
az cosmosdb sql role assignment

管理 Azure Cosmos DB SQL 角色指派。

核心 GA
az cosmosdb sql role assignment create

在 Azure Cosmos DB 帳戶下建立 SQL 角色指派。

核心 GA
az cosmosdb sql role assignment delete

刪除 Azure Cosmos DB 帳戶下的 SQL 角色指派。

核心 GA
az cosmosdb sql role assignment exists

檢查 Azure Cosmos DB 角色指派是否存在。

核心 GA
az cosmosdb sql role assignment list

列出 Azure Cosmos DB 帳戶下的所有 SQL 角色指派。

核心 GA
az cosmosdb sql role assignment show

顯示 Azure Cosmos DB 帳戶下 SQL 角色指派的屬性。

核心 GA
az cosmosdb sql role assignment update

更新 Azure Cosmos DB 帳戶下的 SQL 角色指派。

核心 GA
az cosmosdb sql role assignment wait

輪詢 SQL 角色指派,直到符合特定條件為止。

核心 GA
az cosmosdb sql role definition

管理 Azure Cosmos DB SQL 角色定義。

核心 GA
az cosmosdb sql role definition create

在 Azure Cosmos DB 帳戶下建立 SQL 角色定義。

核心 GA
az cosmosdb sql role definition delete

刪除 Azure Cosmos DB 帳戶下的 SQL 角色定義。

核心 GA
az cosmosdb sql role definition exists

檢查 Azure Cosmos DB 角色定義是否存在。

核心 GA
az cosmosdb sql role definition list

列出 Azure Cosmos DB 帳戶下的所有 SQL 角色定義。

核心 GA
az cosmosdb sql role definition show

顯示 Azure Cosmos DB 帳戶下 SQL 角色定義的屬性。

核心 GA
az cosmosdb sql role definition update

更新 Azure Cosmos DB 帳戶下的 SQL 角色定義。

核心 GA
az cosmosdb sql role definition wait

輪詢 SQL 角色定義,直到符合特定條件為止。

核心 GA
az cosmosdb sql stored-procedure

管理 Azure Cosmos DB SQL 預存程式。

核心 GA
az cosmosdb sql stored-procedure create

在 Azure Cosmos DB SQL 容器下建立 SQL 預存程式。

核心 GA
az cosmosdb sql stored-procedure delete

刪除 Azure Cosmos DB SQL 容器下的 SQL 預存程式。

核心 GA
az cosmosdb sql stored-procedure list

列出 Azure Cosmos DB SQL 容器下的 SQL 預存程式。

核心 GA
az cosmosdb sql stored-procedure show

在 Azure Cosmos DB SQL 容器下顯示 SQL 預存程式的詳細數據。

核心 GA
az cosmosdb sql stored-procedure update

建立或 更新 Azure Cosmos DB SQL 預存程式。

核心 GA
az cosmosdb sql trigger

管理 Azure Cosmos DB SQL 觸發程式。

核心 GA
az cosmosdb sql trigger create

在 Azure Cosmos DB SQL 容器下建立 SQL 觸發程式。

核心 GA
az cosmosdb sql trigger delete

刪除 Azure Cosmos DB SQL 容器下的 SQL 觸發程式。

核心 GA
az cosmosdb sql trigger list

列出 Azure Cosmos DB SQL 容器下的 SQL 觸發程式。

核心 GA
az cosmosdb sql trigger show

在 Azure Cosmos DB SQL 容器下顯示 SQL 觸發程式的詳細數據。

核心 GA
az cosmosdb sql trigger update

更新 Azure Cosmos DB SQL 觸發程式。

核心 GA
az cosmosdb sql user-defined-function

管理 Azure Cosmos DB SQL 使用者定義函式。

核心 GA
az cosmosdb sql user-defined-function create

在 Azure Cosmos DB SQL 容器下建立 SQL 使用者定義函式。

核心 GA
az cosmosdb sql user-defined-function delete

刪除 Azure Cosmos DB SQL 容器底下的 SQL 使用者定義函式。

核心 GA
az cosmosdb sql user-defined-function list

列出 Azure Cosmos DB SQL 容器底下的 SQL 使用者定義函式。

核心 GA
az cosmosdb sql user-defined-function show

顯示 Azure Cosmos DB SQL 容器下 SQL 使用者定義函式的詳細數據。

核心 GA
az cosmosdb sql user-defined-function update

建立或 更新 Azure Cosmos DB SQL 用戶定義函式。

核心 GA
az cosmosdb table

管理 Azure Cosmos DB 帳戶的數據表資源。

核心和擴充功能 GA
az cosmosdb table create

在 Azure Cosmos DB 帳戶下建立數據表。

核心 GA
az cosmosdb table delete

刪除 Azure Cosmos DB 帳戶底下的數據表。

核心 GA
az cosmosdb table exists

檢查 Azure Cosmos DB 數據表是否存在。

核心 GA
az cosmosdb table list

列出 Azure Cosmos DB 帳戶底下的數據表。

核心 GA
az cosmosdb table restorable-resource

管理可在指定時間戳和區域之指定帳戶中還原的數據表。

核心和擴充功能 GA
az cosmosdb table restorable-resource list

列出可在指定時間戳和區域之指定帳戶中還原的所有數據表。

核心 GA
az cosmosdb table restorable-resource list (cosmosdb-preview 擴充功能)

列出可在指定時間戳和區域之指定帳戶中還原的所有數據表。

副檔名 預覽​​
az cosmosdb table restorable-table

管理可在 Azure Cosmos DB 帳戶中還原的不同數據表版本。

核心和擴充功能 GA
az cosmosdb table restorable-table list

列出在指定可還原帳戶中建立/修改/刪除的所有數據表版本。

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

列出在指定可還原帳戶中建立/修改/刪除的所有數據表版本。

副檔名 預覽​​
az cosmosdb table restore

還原相同帳戶內已刪除的數據表。

核心 GA
az cosmosdb table restore (cosmosdb-preview 擴充功能)

還原相同帳戶內已刪除的數據表。

副檔名 預覽​​
az cosmosdb table retrieve-latest-backup-time

擷取指定區域中指定數據表的最新可還原時間戳。

核心 GA
az cosmosdb table retrieve-latest-backup-time (cosmosdb-preview 擴充功能)

擷取指定區域中指定數據表的最新可還原時間戳。

副檔名 預覽​​
az cosmosdb table show

顯示 Azure Cosmos DB 帳戶下數據表的詳細數據。

核心 GA
az cosmosdb table throughput

管理 Azure Cosmos DB 帳戶下的數據表輸送量。

核心 GA
az cosmosdb table throughput migrate

在自動調整和手動布建之間移轉數據表的輸送量。

核心 GA
az cosmosdb table throughput show

取得 Azure Cosmos DB 帳戶下數據表的輸送量。

核心 GA
az cosmosdb table throughput update

更新 Azure Cosmos DB 帳戶下數據表的輸送量。

核心 GA
az cosmosdb update

更新 Azure Cosmos DB 資料庫帳戶。

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

更新 Azure Cosmos DB 資料庫帳戶。

副檔名 GA

az cosmosdb check-name-exists

檢查 Azure Cosmos DB 帳戶名稱是否存在。

az cosmosdb check-name-exists [--ids]
                              [--name]
                              [--subscription]

範例

檢查 Azure Cosmos DB 帳戶名稱是否存在。 ( 自動產生 )

az cosmosdb check-name-exists --name MyCosmosDBDatabaseAccount

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

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

建立新的 Azure Cosmos DB 資料庫帳戶。

az cosmosdb create --name
                   --resource-group
                   [--analytical-storage-schema-type {FullFidelity, WellDefined}]
                   [--assign-identity]
                   [--backup-interval]
                   [--backup-policy-type {Continuous, Periodic}]
                   [--backup-redundancy {Geo, Local, Zone}]
                   [--backup-retention]
                   [--capabilities]
                   [--continuous-tier {Continuous30Days, Continuous7Days}]
                   [--databases-to-restore]
                   [--default-consistency-level {BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}]
                   [--default-identity]
                   [--disable-key-based-metadata-write-access {false, true}]
                   [--enable-analytical-storage {false, true}]
                   [--enable-automatic-failover {false, true}]
                   [--enable-burst-capacity {false, true}]
                   [--enable-free-tier {false, true}]
                   [--enable-multiple-write-locations {false, true}]
                   [--enable-partition-merge {false, true}]
                   [--enable-virtual-network {false, true}]
                   [--gremlin-databases-to-restore]
                   [--ip-range-filter]
                   [--is-restore-request {false, true}]
                   [--key-uri]
                   [--kind {GlobalDocumentDB, MongoDB, Parse}]
                   [--locations]
                   [--max-interval]
                   [--max-staleness-prefix]
                   [--minimal-tls-version {Tls, Tls11, Tls12}]
                   [--network-acl-bypass {AzureServices, None}]
                   [--network-acl-bypass-resource-ids]
                   [--public-network-access {DISABLED, ENABLED, SECUREDBYPERIMETER}]
                   [--restore-source]
                   [--restore-timestamp]
                   [--server-version {3.2, 3.6, 4.0, 4.2}]
                   [--tables-to-restore]
                   [--tags]
                   [--virtual-network-rules]

範例

建立新的 Azure Cosmos DB 資料庫帳戶。 ( 自動產生 )

az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --subscription MySubscription

建立具有兩個區域的新 Azure Cosmos DB 資料庫帳戶。 英國南部是區域備援。

az cosmosdb create -n myaccount -g mygroup --locations regionName=eastus failoverPriority=0 isZoneRedundant=False --locations regionName=uksouth failoverPriority=1 isZoneRedundant=True --enable-multiple-write-locations --network-acl-bypass AzureServices --network-acl-bypass-resource-ids /subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName

從指定位置的現有帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶

az cosmosdb create -n restoredaccount -g mygroup --is-restore-request true --restore-source /subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d056a4f8-044a-436f-80c8-cd3edbc94c68 --restore-timestamp 2020-07-13T16:03:41+0000 --locations regionName=westus failoverPriority=0 isZoneRedundant=False

必要參數

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

選擇性參數

--analytical-storage-schema-type --as-schema

分析記憶體的架構類型。

接受的值: FullFidelity, WellDefined
--assign-identity

指派以空格分隔的系統或使用者指派身分識別。 使用 '[system]' 來參考系統指派的身分識別。

--backup-interval

使用備份的頻率(以分鐘為單位)(僅適用於定期模式備份的帳戶)。

--backup-policy-type

要建立之帳戶的備份原則類型。

接受的值: Continuous, Periodic
--backup-redundancy

備份 儲存體 帳戶的備援類型。

接受的值: Geo, Local, Zone
--backup-retention

保留每個備份的時間(以小時為單位)(僅適用於定期模式備份的帳戶)。

--capabilities

在 Cosmos DB 資料庫帳戶上設定自訂功能。

--continuous-tier

連續備份的層。

接受的值: Continuous30Days, Continuous7Days
--databases-to-restore

新增資料庫及其集合名稱以還原。

使用方式:--databases-to-restore name=DatabaseName collections=collection1 [collection2 ...]。

--default-consistency-level

Cosmos DB 資料庫帳戶的預設一致性層級。

接受的值: BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong
--default-identity

在 CMK 相關功能中存取金鑰保存庫的主要身分識別。 例如 'FirstPartyIdentity'、'SystemAssignedIdentity' 等等。 使用者指派的身分識別會以 'UserAssignedIdentity=' 格式指定。

--disable-key-based-metadata-write-access

透過帳戶金鑰停用元數據資源(資料庫、容器、輸送量)的寫入作業。

接受的值: false, true
--enable-analytical-storage

在帳戶上啟用記錄記憶體的旗標。

接受的值: false, true
--enable-automatic-failover

在罕見事件中啟用寫入區域的自動故障轉移,因為區域因中斷而無法使用。 自動故障轉移會導致帳戶的新寫入區域,並根據為帳戶設定的故障轉移優先順序來選擇。

接受的值: false, true
--enable-burst-capacity

標幟為 [啟用/停用高載容量] 功能。

使用方式:--enable-burst-capacity true 預設值:false enable-burst-capacity 的已接受值為 true 和 false。

接受的值: false, true
--enable-free-tier
預覽

如果啟用帳戶是免費層。

接受的值: false, true
--enable-multiple-write-locations

啟用多個寫入位置。

接受的值: false, true
--enable-partition-merge

在帳戶上啟用資料分割合併的旗標。

接受的值: false, true
--enable-virtual-network

在 Cosmos DB 資料庫帳戶上啟用虛擬網路。

接受的值: false, true
--gremlin-databases-to-restore

新增 gremlin 資料庫及其圖形名稱以還原。

使用方式:--gremlin-databases-to-restore name=DatabaseName graphs=graph1 [graph2 ...]。

--ip-range-filter

防火牆支援。 指定要包含在 CIDR 表單中的 IP 位址或 IP 位址範圍集合,作為指定資料庫帳戶的用戶端 IP 允許清單。 IP 位址/範圍必須以逗號分隔,且不得包含任何空格。

--is-restore-request -r

從現有/已刪除的帳戶還原。

接受的值: false, true
--key-uri

金鑰保存庫的 URI。

--kind

要建立的 Cosmos DB 資料庫帳戶類型。

接受的值: GlobalDocumentDB, MongoDB, Parse
預設值: GlobalDocumentDB
--locations

將位置新增至 Cosmos DB 資料庫帳戶。

使用方式:-locations KEY=VALUE [KEY=VALUE ...]必要密鑰:regionName、failoverPriority 選擇性密鑰:isZoneRedundant Default:指定資源群組位置中的單一區域帳戶。 寫入區域的故障轉移優先順序值為 0,讀取區域大於 0。 故障轉移優先順序值必須是唯一且小於區域總數。 您可以使用多個 --locations 自變數來指定多個位置。

--max-interval

搭配限定過期一致性使用時,這個值代表容許的過時時間量(以秒為單位)。 此值的接受範圍是 5 - 86400。

預設值: 5
--max-staleness-prefix

搭配限定過期一致性使用時,這個值代表容許的過時要求數目。 此值的接受範圍是 10 - 2,147,483,647。

預設值: 100
--minimal-tls-version

指出允許的 TLS 版本下限。

使用方式: --minimal-tls-version TLSVersion 預設值:Tls,Cassandra 和 Mongo API 除外,其僅適用於 Tls12 最低 TLS 版本的接受值為 'Tls'、'Tls11' 和 'Tls12',其對應至 TLS 1.0、1.1 和 1.2 版。

接受的值: Tls, Tls11, Tls12
--network-acl-bypass

啟用或停用網路 Acl 略過的旗標。

接受的值: AzureServices, None
--network-acl-bypass-resource-ids -i

允許網路 Acl 略過的資源識別碼清單。

--public-network-access -p

將伺服器中的公用網路存取設定為 Enabled、Disabled 或 SecuredByPerimeter。

接受的值: DISABLED, ENABLED, SECUREDBYPERIMETER
--restore-source

必須從中還原帳戶的來源帳戶的 restoreable-database-account 標識符。 如果 --is-restore-request 設定為 true,則為必要。

--restore-timestamp

帳戶必須還原至的時間戳。 如果 --is-restore-request 設定為 true,則為必要。

--server-version

僅適用於 MongoDB 帳戶。

接受的值: 3.2, 3.6, 4.0, 4.2
--tables-to-restore

新增要還原的數據表名稱。

使用方式:--tables-to-restore tables=table1 [table2 ...]。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--virtual-network-rules

適用於虛擬網路的 ACL。

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

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立新的 Azure Cosmos DB 資料庫帳戶。

az cosmosdb create --name
                   --resource-group
                   [--analytical-storage-schema-type {FullFidelity, WellDefined}]
                   [--assign-identity]
                   [--backup-interval]
                   [--backup-policy-type {Continuous, Periodic}]
                   [--backup-redundancy {Geo, Local, Zone}]
                   [--backup-retention]
                   [--capabilities]
                   [--continuous-tier {Continuous30Days, Continuous7Days}]
                   [--databases-to-restore]
                   [--default-consistency-level {BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}]
                   [--default-identity]
                   [--default-priority-level {High, Low}]
                   [--disable-key-based-metadata-write-access {false, true}]
                   [--enable-analytical-storage {false, true}]
                   [--enable-automatic-failover {false, true}]
                   [--enable-burst-capacity {false, true}]
                   [--enable-free-tier {false, true}]
                   [--enable-materialized-views {false, true}]
                   [--enable-multiple-write-locations {false, true}]
                   [--enable-partition-merge {false, true}]
                   [--enable-pbe {false, true}]
                   [--enable-prpp-autoscale {false, true}]
                   [--enable-virtual-network {false, true}]
                   [--gremlin-databases-to-restore]
                   [--ip-range-filter]
                   [--is-restore-request {false, true}]
                   [--key-uri]
                   [--kind {GlobalDocumentDB, MongoDB, Parse}]
                   [--locations]
                   [--max-interval]
                   [--max-staleness-prefix]
                   [--network-acl-bypass {AzureServices, None}]
                   [--network-acl-bypass-resource-ids]
                   [--public-network-access {DISABLED, ENABLED, SECUREDBYPERIMETER}]
                   [--restore-source]
                   [--restore-timestamp]
                   [--server-version {3.2, 3.6, 4.0, 4.2}]
                   [--tables-to-restore]
                   [--tags]
                   [--virtual-network-rules]

範例

資料庫資料庫帳戶。 ( 自動產生 )

az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --subscription MySubscription

建立具有兩個區域的新 Azure Cosmos DB 資料庫帳戶。 英國南部是區域備援。

az cosmosdb create -n myaccount -g mygroup --locations regionName=eastus failoverPriority=0 isZoneRedundant=False --locations regionName=uksouth failoverPriority=1 isZoneRedundant=True --enable-multiple-write-locations --network-acl-bypass AzureServices --network-acl-bypass-resource-ids /subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName

從指定位置的現有帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶

az cosmosdb create -n restoredaccount -g mygroup --is-restore-request true --restore-source /subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d056a4f8-044a-436f-80c8-cd3edbc94c68 --restore-timestamp 2020-07-13T16:03:41+0000 --locations regionName=westus failoverPriority=0 isZoneRedundant=False

建立已啟用具體化檢視和cassandra功能的新 Azure Cosmos DB 資料庫帳戶。

az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --enable-materialized-views true --capabilities EnableCassandra CassandraEnableMaterializedViews

必要參數

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

選擇性參數

--analytical-storage-schema-type --as-schema

分析記憶體的架構類型。

接受的值: FullFidelity, WellDefined
--assign-identity

指派以空格分隔的系統或使用者指派身分識別。 使用 '[system]' 來參考系統指派的身分識別。

--backup-interval

使用備份的頻率(以分鐘為單位)(僅適用於定期模式備份的帳戶)。

--backup-policy-type

要建立之帳戶的備份原則類型。

接受的值: Continuous, Periodic
--backup-redundancy

備份 儲存體 帳戶的備援類型。

接受的值: Geo, Local, Zone
--backup-retention

保留每個備份的時間(以小時為單位)(僅適用於定期模式備份的帳戶)。

--capabilities

在 Cosmos DB 資料庫帳戶上設定自訂功能。

--continuous-tier

連續備份的層。

接受的值: Continuous30Days, Continuous7Days
--databases-to-restore
預覽

新增資料庫及其集合名稱以還原。

使用方式:--databases-to-restore name=DatabaseName collections=collection1 [collection2 ...]。

--default-consistency-level

Cosmos DB 資料庫帳戶的預設一致性層級。

接受的值: BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong
--default-identity

在 CMK 相關功能中存取金鑰保存庫的主要身分識別。 例如 'FirstPartyIdentity'、'SystemAssignedIdentity' 等等。

--default-priority-level
預覽

如果未指定,則為 [要求] 的預設優先順序層級。

接受的值: High, Low
--disable-key-based-metadata-write-access

透過帳戶金鑰停用元數據資源(資料庫、容器、輸送量)的寫入作業。

接受的值: false, true
--enable-analytical-storage

在帳戶上啟用記錄記憶體的旗標。

接受的值: false, true
--enable-automatic-failover

在罕見事件中啟用寫入區域的自動故障轉移,因為區域因中斷而無法使用。 自動故障轉移會導致帳戶的新寫入區域,並根據為帳戶設定的故障轉移優先順序來選擇。

接受的值: false, true
--enable-burst-capacity
預覽

在帳戶上啟用高載容量的旗標。

接受的值: false, true
--enable-free-tier
預覽

如果啟用帳戶是免費層。

接受的值: false, true
--enable-materialized-views --enable-mv
預覽

在帳戶上啟用MaterializedViews的旗標。

接受的值: false, true
--enable-multiple-write-locations

啟用多個寫入位置。

接受的值: false, true
--enable-partition-merge

在帳戶上啟用資料分割合併的旗標。

接受的值: false, true
--enable-pbe --enable-priority-based-execution
預覽

旗標,以在帳戶上啟用優先順序執行。

接受的值: false, true
--enable-prpp-autoscale
預覽

啟用或停用 PerRegionPerPartitionAutoscale。

接受的值: false, true
--enable-virtual-network

在 Cosmos DB 資料庫帳戶上啟用虛擬網路。

接受的值: false, true
--gremlin-databases-to-restore
預覽

新增 gremlin 資料庫及其圖形名稱以還原。

使用方式:--gremlin-databases-to-restore name=DatabaseName graphs=graph1 [graph2 ...]。

--ip-range-filter

防火牆支援。 指定要包含在 CIDR 表單中的 IP 位址或 IP 位址範圍集合,作為指定資料庫帳戶的用戶端 IP 允許清單。 IP 位址/範圍必須以逗號分隔,且不得包含任何空格。

--is-restore-request -r
預覽

從現有/已刪除的帳戶還原。

接受的值: false, true
--key-uri

金鑰保存庫的 URI。

--kind

要建立的 Cosmos DB 資料庫帳戶類型。

接受的值: GlobalDocumentDB, MongoDB, Parse
預設值: GlobalDocumentDB
--locations

將位置新增至 Cosmos DB 資料庫帳戶。

使用方式:-locations KEY=VALUE [KEY=VALUE ...]必要密鑰:regionName、failoverPriority 選擇性密鑰:isZoneRedundant Default:指定資源群組位置中的單一區域帳戶。 寫入區域的故障轉移優先順序值為 0,讀取區域大於 0。 故障轉移優先順序值必須是唯一且小於區域總數。 您可以使用多個 --locations 自變數來指定多個位置。

--max-interval

搭配限定過期一致性使用時,這個值代表容許的過時時間量(以秒為單位)。 此值的接受範圍是 1 - 100。

預設值: 5
--max-staleness-prefix

搭配限定過期一致性使用時,這個值代表容許的過時要求數目。 此值的接受範圍是 1 - 2,147,483,647。

預設值: 100
--network-acl-bypass

啟用或停用網路 Acl 略過的旗標。

接受的值: AzureServices, None
--network-acl-bypass-resource-ids -i

允許網路 Acl 略過的資源識別碼清單。

--public-network-access -p

將伺服器中的公用網路存取設定為 Enabled、Disabled 或 SecuredByPerimeter。

接受的值: DISABLED, ENABLED, SECUREDBYPERIMETER
--restore-source
預覽

必須從中還原帳戶的來源帳戶的 restoreable-database-account 標識符。 如果 --is-restore-request 設定為 true,則為必要。

--restore-timestamp
預覽

帳戶必須還原至的時間戳。 如果 --is-restore-request 設定為 true,則為必要。

--server-version

僅適用於 MongoDB 帳戶。

接受的值: 3.2, 3.6, 4.0, 4.2
--tables-to-restore
預覽

新增要還原的數據表名稱。

使用方式:--tables-to-restore tables=table1 [table2 ...]。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--virtual-network-rules

適用於虛擬網路的 ACL。

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

刪除 Azure Cosmos DB 資料庫帳戶。

az cosmosdb delete [--ids]
                   [--name]
                   [--resource-group]
                   [--subscription]
                   [--yes]

範例

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

az cosmosdb delete --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--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 failover-priority-change

變更 Azure Cosmos DB 資料庫帳戶的故障轉移優先順序。

az cosmosdb failover-priority-change --failover-policies
                                     [--ids]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]

範例

變更 Azure Cosmos DB 資料庫帳戶的故障轉移優先順序。

az cosmosdb failover-priority-change --failover-policies southafricanorth=0 westus=8 northeurope=3 --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

必要參數

--failover-policies

'regionName=failoverPriority' 格式的空間分隔故障轉移原則。 原則數目必須符合帳戶目前復寫的區域數目。 所有 regionName 值都必須符合帳戶目前復寫的區域。 所有 failoverPriority 值都必須是唯一的。 必須指定一個 failoverPriority 值零 (0)。 所有剩餘的 failoverPriority 值都可以是任何正整數,而且不必是串連,也不是以任何特定順序寫入。 例如 eastus=0 westus=1。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

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

列出 Azure Cosmos DB 資料庫帳戶。

az cosmosdb list [--resource-group]

選擇性參數

--resource-group -g

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

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

列出 Azure Cosmos DB 資料庫帳戶。

az cosmosdb list [--resource-group]

選擇性參數

--resource-group -g

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

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

已被取代

此命令已被取代,並將在未來版本中移除。 請改用 『cosmosdb 金鑰清單 --type connection-strings'。

列出 Azure Cosmos DB 資料庫帳戶的 連接字串。

az cosmosdb list-connection-strings [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

範例

列出 Azure Cosmos DB 資料庫帳戶的 連接字串。 ( 自動產生 )

az cosmosdb list-connection-strings --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

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

已被取代

此命令已被取代,並將在未來版本中移除。 請改用 『cosmosdb 金鑰清單』。

列出 Azure Cosmos DB 資料庫帳戶的存取密鑰。

az cosmosdb list-keys [--ids]
                      [--name]
                      [--resource-group]
                      [--subscription]

範例

列出 Azure Cosmos DB 資料庫帳戶的存取密鑰。 ( 自動產生 )

az cosmosdb list-keys --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --subscription MySubscription

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--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 list-read-only-keys

已被取代

此命令已被取代,並將在未來版本中移除。 請改用 『cosmosdb 金鑰清單 --type read-only-keys'。

列出 Azure Cosmos DB 資料庫帳戶的唯讀取密鑰。

az cosmosdb list-read-only-keys [--ids]
                                [--name]
                                [--resource-group]
                                [--subscription]

範例

列出 Azure Cosmos DB 資料庫帳戶的唯讀取密鑰。 ( 自動產生 )

az cosmosdb list-read-only-keys --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--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 regenerate-key

已被取代

此命令已被取代,並將在未來版本中移除。 請改用 『cosmosdb 金鑰重新產生』。

重新產生 Azure Cosmos DB 資料庫帳戶的存取密鑰。

az cosmosdb regenerate-key --key-kind {primary, primaryReadonly, secondary, secondaryReadonly}
                           [--ids]
                           [--name]
                           [--resource-group]
                           [--subscription]

範例

重新產生 Azure Cosmos DB 資料庫帳戶的存取密鑰。 ( 自動產生 )

az cosmosdb regenerate-key --key-kind primary --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

必要參數

--key-kind

要重新產生的存取金鑰。

接受的值: primary, primaryReadonly, secondary, secondaryReadonly

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

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

從現有的資料庫帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶。

az cosmosdb restore --account-name
                    --location
                    --resource-group
                    --restore-timestamp
                    --target-database-account-name
                    [--assign-identity]
                    [--databases-to-restore]
                    [--default-identity]
                    [--gremlin-databases-to-restore]
                    [--public-network-access {DISABLED, ENABLED}]
                    [--tables-to-restore]

範例

從現有的資料庫帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶。

az cosmosdb restore --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 -g MyResourceGroup --location westus

只從現有的資料庫帳戶還原選取的資料庫和集合,以建立新的 Azure Cosmos DB Sql 或 MongoDB 資料庫帳戶。

az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --databases-to-restore name=MyDB1 collections=collection1 collection2 --databases-to-restore name=MyDB2 collections=collection3 collection4

僅從現有的資料庫帳戶還原選取的資料庫或圖形,以建立新的 Azure Cosmos DB Gremlin 資料庫帳戶。

az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --gremlin-databases-to-restore name=graphdb1 graphs=graph1 graph2

只從現有的資料庫帳戶還原選取的數據表,以建立新的 Azure Cosmos DB 數據表資料庫帳戶。

az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --tables-to-restore table1,table2

必要參數

--account-name -a

還原的來源 Cosmos DB 資料庫帳戶名稱。

--location -l

觸發還原的來源帳戶位置。 這也會是還原帳戶的寫入區域。

--resource-group -g

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

--restore-timestamp -t

帳戶必須還原至的時間戳。

--target-database-account-name -n

還原之後的新目標 Cosmos DB 資料庫帳戶名稱。

選擇性參數

--assign-identity

指派以空格分隔的系統或使用者指派身分識別。 使用 '[system]' 來參考系統指派的身分識別。

--databases-to-restore

新增資料庫及其集合名稱以還原。

使用方式:--databases-to-restore name=DatabaseName collections=collection1 [collection2 ...]您可以使用多個 --databases-to-restore 自變數來指定多個資料庫。

--default-identity

在 CMK 相關功能中存取金鑰保存庫的主要身分識別。 例如 'FirstPartyIdentity'、'SystemAssignedIdentity' 等等。

--gremlin-databases-to-restore

新增 gremlin 資料庫及其圖形名稱以還原。

使用方式:--gremlin-databases-to-restore name=DatabaseName graphs=graph1 [graph2 ...]。

--public-network-access -p

將伺服器中的公用網路存取設定為 [已啟用] 或 [已停用]。

接受的值: DISABLED, ENABLED
--tables-to-restore

新增要還原的數據表名稱。

使用方式:--tables-to-restore table1 [table2 ...]。

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

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

從現有的資料庫帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶。

az cosmosdb restore --account-name
                    --location
                    --resource-group
                    --restore-timestamp
                    --target-database-account-name
                    [--assign-identity]
                    [--databases-to-restore]
                    [--default-identity]
                    [--disable-ttl {false, true}]
                    [--gremlin-databases-to-restore]
                    [--public-network-access {DISABLED, ENABLED}]
                    [--source-backup-location]
                    [--tables-to-restore]

範例

從現有的資料庫帳戶還原,以建立新的 Azure Cosmos DB 資料庫帳戶。

az cosmosdb restore --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 -g MyResourceGroup --location westus

只從現有的資料庫帳戶還原選取的資料庫和集合,以建立新的 Azure Cosmos DB Sql 或 MongoDB 資料庫帳戶。

az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --databases-to-restore name=MyDB1 collections=collection1 collection2 --databases-to-restore name=MyDB2 collections=collection3 collection4

僅從現有的資料庫帳戶還原選取的資料庫或圖形,以建立新的 Azure Cosmos DB Gremlin 資料庫帳戶。

az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --gremlin-databases-to-restore name=graphdb1 graphs=graph1 graph2

只從現有的資料庫帳戶還原選取的數據表,以建立新的 Azure Cosmos DB 數據表資料庫帳戶。

az cosmosdb restore -g MyResourceGroup --target-database-account-name MyRestoredCosmosDBDatabaseAccount --account-name MySourceAccount --restore-timestamp 2020-07-13T16:03:41+0000 --location westus --tables-to-restore table1,table2

必要參數

--account-name -a

還原的來源 Cosmos DB 資料庫帳戶名稱。

--location -l

這是還原帳戶的寫入區域。 如果未提供source_backup_location,這也是其備份所在的來源帳戶位置。

--resource-group -g

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

--restore-timestamp -t

帳戶必須還原至的時間戳。

--target-database-account-name -n

還原之後的新目標 Cosmos DB 資料庫帳戶名稱。

選擇性參數

--assign-identity

指派以空格分隔的系統或使用者指派身分識別。 使用 '[system]' 來參考系統指派的身分識別。

--databases-to-restore

新增資料庫及其集合名稱以還原。

使用方式:--databases-to-restore name=DatabaseName collections=collection1 [collection2 ...]您可以使用多個 --databases-to-restore 自變數來指定多個資料庫。

--default-identity

在 CMK 相關功能中存取金鑰保存庫的主要身分識別。 例如 'FirstPartyIdentity'、'SystemAssignedIdentity' 等等。

--disable-ttl
預覽

啟用或停用已停用ttl還原。

接受的值: false, true
--gremlin-databases-to-restore
預覽

新增 gremlin 資料庫及其圖形名稱以還原。

使用方式:--gremlin-databases-to-restore name=DatabaseName graphs=graph1 [graph2 ...]。

--public-network-access -p

將伺服器中的公用網路存取設定為 [已啟用] 或 [已停用]。

接受的值: DISABLED, ENABLED
--source-backup-location
預覽

這是備份所在的來源帳戶位置。 如果來源和目標位於不同的位置,請提供此值。

--tables-to-restore
預覽

新增要還原的數據表名稱。

使用方式:--tables-to-restore table1 [table2 ...]。

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

取得 Azure Cosmos DB 資料庫帳戶的詳細數據。

az cosmosdb show [--ids]
                 [--name]
                 [--resource-group]
                 [--subscription]

範例

取得 Azure Cosmos DB 資料庫帳戶的詳細數據。 ( 自動產生 )

az cosmosdb show --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

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

取得 Azure Cosmos DB 資料庫帳戶的詳細數據。

az cosmosdb show [--ids]
                 [--name]
                 [--resource-group]
                 [--subscription]

範例

取得 Azure Cosmos DB 資料庫帳戶的詳細數據。 ( 自動產生 )

az cosmosdb show --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

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

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

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

更新 Azure Cosmos DB 資料庫帳戶。

az cosmosdb update [--analytical-storage-schema-type {FullFidelity, WellDefined}]
                   [--backup-interval]
                   [--backup-policy-type {Continuous, Periodic}]
                   [--backup-redundancy {Geo, Local, Zone}]
                   [--backup-retention]
                   [--capabilities]
                   [--continuous-tier {Continuous30Days, Continuous7Days}]
                   [--default-consistency-level {BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}]
                   [--default-identity]
                   [--disable-key-based-metadata-write-access {false, true}]
                   [--enable-analytical-storage {false, true}]
                   [--enable-automatic-failover {false, true}]
                   [--enable-burst-capacity {false, true}]
                   [--enable-multiple-write-locations {false, true}]
                   [--enable-partition-merge {false, true}]
                   [--enable-virtual-network {false, true}]
                   [--ids]
                   [--ip-range-filter]
                   [--key-uri]
                   [--locations]
                   [--max-interval]
                   [--max-staleness-prefix]
                   [--minimal-tls-version {Tls, Tls11, Tls12}]
                   [--name]
                   [--network-acl-bypass {AzureServices, None}]
                   [--network-acl-bypass-resource-ids]
                   [--public-network-access {DISABLED, ENABLED, SECUREDBYPERIMETER}]
                   [--resource-group]
                   [--server-version {3.2, 3.6, 4.0, 4.2}]
                   [--subscription]
                   [--tags]
                   [--virtual-network-rules]

範例

更新 Azure Cosmos DB 資料庫帳戶。 ( 自動產生 )

az cosmosdb update --capabilities EnableGremlin --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

建立具有兩個區域的新 Azure Cosmos DB 資料庫帳戶。 英國南部是區域備援。

az cosmosdb update -n myaccount -g mygroup --locations regionName=eastus failoverPriority=0 isZoneRedundant=False --locations regionName=uksouth failoverPriority=1 isZoneRedundant=True --enable-multiple-write-locations --network-acl-bypass AzureServices --network-acl-bypass-resource-ids /subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName

選擇性參數

--analytical-storage-schema-type --as-schema

分析記憶體的架構類型。

接受的值: FullFidelity, WellDefined
--backup-interval

使用備份的頻率(以分鐘為單位)(僅適用於定期模式備份的帳戶)。

--backup-policy-type

要建立之帳戶的備份原則類型。

接受的值: Continuous, Periodic
--backup-redundancy

備份 儲存體 帳戶的備援類型。

接受的值: Geo, Local, Zone
--backup-retention

保留每個備份的時間(以小時為單位)(僅適用於定期模式備份的帳戶)。

--capabilities

在 Cosmos DB 資料庫帳戶上設定自訂功能。

--continuous-tier

連續備份的層。

接受的值: Continuous30Days, Continuous7Days
--default-consistency-level

Cosmos DB 資料庫帳戶的預設一致性層級。

接受的值: BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong
--default-identity

在 CMK 相關功能中存取金鑰保存庫的主要身分識別。 例如 'FirstPartyIdentity'、'SystemAssignedIdentity' 等等。 使用者指派的身分識別會以 'UserAssignedIdentity=' 格式指定。

--disable-key-based-metadata-write-access

透過帳戶金鑰停用元數據資源(資料庫、容器、輸送量)的寫入作業。

接受的值: false, true
--enable-analytical-storage

在帳戶上啟用記錄記憶體的旗標。

接受的值: false, true
--enable-automatic-failover

在罕見事件中啟用寫入區域的自動故障轉移,因為區域因中斷而無法使用。 自動故障轉移會導致帳戶的新寫入區域,並根據為帳戶設定的故障轉移優先順序來選擇。

接受的值: false, true
--enable-burst-capacity

標幟為 [啟用/停用高載容量] 功能。

使用方式:--enable-burst-capacity true 預設值:false enable-burst-capacity 的已接受值為 true 和 false。

接受的值: false, true
--enable-multiple-write-locations

啟用多個寫入位置。

接受的值: false, true
--enable-partition-merge

在帳戶上啟用資料分割合併的旗標。

接受的值: false, true
--enable-virtual-network

在 Cosmos DB 資料庫帳戶上啟用虛擬網路。

接受的值: false, true
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--ip-range-filter

防火牆支援。 指定要包含在 CIDR 表單中的 IP 位址或 IP 位址範圍集合,作為指定資料庫帳戶的用戶端 IP 允許清單。 IP 位址/範圍必須以逗號分隔,且不得包含任何空格。

--key-uri
預覽

金鑰保存庫的 URI。

--locations

將位置新增至 Cosmos DB 資料庫帳戶。

使用方式:-locations KEY=VALUE [KEY=VALUE ...]必要密鑰:regionName、failoverPriority 選擇性密鑰:isZoneRedundant Default:指定資源群組位置中的單一區域帳戶。 寫入區域的故障轉移優先順序值為 0,讀取區域大於 0。 故障轉移優先順序值必須是唯一且小於區域總數。 您可以使用多個 --locations 自變數來指定多個位置。

--max-interval

搭配限定過期一致性使用時,這個值代表容許的過時時間量(以秒為單位)。 此值的接受範圍是 5 - 86400。

--max-staleness-prefix

搭配限定過期一致性使用時,這個值代表容許的過時要求數目。 此值的接受範圍是 10 - 2,147,483,647。

--minimal-tls-version

指出允許的 TLS 版本下限。

使用方式: --minimal-tls-version TLSVersion 預設值:Tls,Cassandra 和 Mongo API 除外,其僅適用於 Tls12 最低 TLS 版本的接受值為 'Tls'、'Tls11' 和 'Tls12',其對應至 TLS 1.0、1.1 和 1.2 版。

接受的值: Tls, Tls11, Tls12
--name -n

Cosmos DB 資料庫帳戶的名稱。

--network-acl-bypass

啟用或停用網路 Acl 略過的旗標。

接受的值: AzureServices, None
--network-acl-bypass-resource-ids -i

允許網路 Acl 略過的資源識別碼清單。

--public-network-access -p

將伺服器中的公用網路存取設定為 Enabled、Disabled 或 SecuredByPerimeter。

接受的值: DISABLED, ENABLED, SECUREDBYPERIMETER
--resource-group -g

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

--server-version

僅適用於 MongoDB 帳戶。

接受的值: 3.2, 3.6, 4.0, 4.2
--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--virtual-network-rules

適用於虛擬網路的 ACL。

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

更新 Azure Cosmos DB 資料庫帳戶。

az cosmosdb update [--analytical-storage-schema-type {FullFidelity, WellDefined}]
                   [--backup-interval]
                   [--backup-policy-type {Continuous, Periodic}]
                   [--backup-redundancy {Geo, Local, Zone}]
                   [--backup-retention]
                   [--capabilities]
                   [--continuous-tier {Continuous30Days, Continuous7Days}]
                   [--default-consistency-level {BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong}]
                   [--default-identity]
                   [--default-priority-level {High, Low}]
                   [--disable-key-based-metadata-write-access {false, true}]
                   [--enable-analytical-storage {false, true}]
                   [--enable-automatic-failover {false, true}]
                   [--enable-burst-capacity {false, true}]
                   [--enable-materialized-views {false, true}]
                   [--enable-multiple-write-locations {false, true}]
                   [--enable-partition-merge {false, true}]
                   [--enable-pbe {false, true}]
                   [--enable-prpp-autoscale {false, true}]
                   [--enable-virtual-network {false, true}]
                   [--ids]
                   [--ip-range-filter]
                   [--locations]
                   [--max-interval]
                   [--max-staleness-prefix]
                   [--name]
                   [--network-acl-bypass {AzureServices, None}]
                   [--network-acl-bypass-resource-ids]
                   [--public-network-access {DISABLED, ENABLED, SECUREDBYPERIMETER}]
                   [--resource-group]
                   [--server-version {3.2, 3.6, 4.0, 4.2}]
                   [--subscription]
                   [--tags]
                   [--virtual-network-rules]

範例

更新 Azure Cosmos DB 資料庫帳戶。 ( 自動產生 )

az cosmosdb update --capabilities EnableGremlin --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup

更新 Azure Cosmos DB 資料庫帳戶,以啟用具體化檢視。

az cosmosdb update --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --enable-materialized-views true

選擇性參數

--analytical-storage-schema-type --as-schema

分析記憶體的架構類型。

接受的值: FullFidelity, WellDefined
--backup-interval

使用備份的頻率(以分鐘為單位)(僅適用於定期模式備份的帳戶)。

--backup-policy-type

要建立之帳戶的備份原則類型。

接受的值: Continuous, Periodic
--backup-redundancy

備份 儲存體 帳戶的備援類型。

接受的值: Geo, Local, Zone
--backup-retention

保留每個備份的時間(以小時為單位)(僅適用於定期模式備份的帳戶)。

--capabilities

在 Cosmos DB 資料庫帳戶上設定自訂功能。

--continuous-tier

連續備份的層。

接受的值: Continuous30Days, Continuous7Days
--default-consistency-level

Cosmos DB 資料庫帳戶的預設一致性層級。

接受的值: BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong
--default-identity

在 CMK 相關功能中存取金鑰保存庫的主要身分識別。 例如 'FirstPartyIdentity'、'SystemAssignedIdentity' 等等。

--default-priority-level
預覽

如果未指定,則為 [要求] 的預設優先順序層級。

接受的值: High, Low
--disable-key-based-metadata-write-access

透過帳戶金鑰停用元數據資源(資料庫、容器、輸送量)的寫入作業。

接受的值: false, true
--enable-analytical-storage

在帳戶上啟用記錄記憶體的旗標。

接受的值: false, true
--enable-automatic-failover

在罕見事件中啟用寫入區域的自動故障轉移,因為區域因中斷而無法使用。 自動故障轉移會導致帳戶的新寫入區域,並根據為帳戶設定的故障轉移優先順序來選擇。

接受的值: false, true
--enable-burst-capacity
預覽

在帳戶上啟用高載容量的旗標。

接受的值: false, true
--enable-materialized-views --enable-mv
預覽

在帳戶上啟用MaterializedViews的旗標。

接受的值: false, true
--enable-multiple-write-locations

啟用多個寫入位置。

接受的值: false, true
--enable-partition-merge

在帳戶上啟用資料分割合併的旗標。

接受的值: false, true
--enable-pbe --enable-priority-based-execution
預覽

旗標,以在帳戶上啟用優先順序執行。

接受的值: false, true
--enable-prpp-autoscale
預覽

啟用或停用 PerRegionPerPartitionAutoscale。

接受的值: false, true
--enable-virtual-network

在 Cosmos DB 資料庫帳戶上啟用虛擬網路。

接受的值: false, true
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--ip-range-filter

防火牆支援。 指定要包含在 CIDR 表單中的 IP 位址或 IP 位址範圍集合,作為指定資料庫帳戶的用戶端 IP 允許清單。 IP 位址/範圍必須以逗號分隔,且不得包含任何空格。

--locations

將位置新增至 Cosmos DB 資料庫帳戶。

使用方式:-locations KEY=VALUE [KEY=VALUE ...]必要密鑰:regionName、failoverPriority 選擇性密鑰:isZoneRedundant Default:指定資源群組位置中的單一區域帳戶。 寫入區域的故障轉移優先順序值為 0,讀取區域大於 0。 故障轉移優先順序值必須是唯一且小於區域總數。 您可以使用多個 --locations 自變數來指定多個位置。

--max-interval

搭配限定過期一致性使用時,這個值代表容許的過時時間量(以秒為單位)。 此值的接受範圍是 1 - 100。

--max-staleness-prefix

搭配限定過期一致性使用時,這個值代表容許的過時要求數目。 此值的接受範圍是 1 - 2,147,483,647。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--network-acl-bypass

啟用或停用網路 Acl 略過的旗標。

接受的值: AzureServices, None
--network-acl-bypass-resource-ids -i

允許網路 Acl 略過的資源識別碼清單。

--public-network-access -p

將伺服器中的公用網路存取設定為 Enabled、Disabled 或 SecuredByPerimeter。

接受的值: DISABLED, ENABLED, SECUREDBYPERIMETER
--resource-group -g

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

--server-version

僅適用於 MongoDB 帳戶。

接受的值: 3.2, 3.6, 4.0, 4.2
--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--virtual-network-rules

適用於虛擬網路的 ACL。

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