az documentdb mongocluster
Note
此參考文獻是 Azure CLI(版本 2.75.0 或更高版本)的 documentdb 擴充功能的一部分。 這個擴充功能會在你第一次執行 az documentdb mongocluster 指令時自動安裝。 深入了解擴充功能。
指令群組 'az documentdb' 目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
Manage Azure DocumentDB mongo clusters.
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az documentdb mongocluster check-name-availability |
檢查 mongo 叢集名稱是否可供使用。 |
Extension | Preview |
| az documentdb mongocluster create |
建立一個 Mongo 叢集。 更新會覆寫資源的所有屬性。 若要只修改某些屬性,請使用 PATCH。 |
Extension | Preview |
| az documentdb mongocluster delete |
刪除一個 mongo 叢集。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule |
管理防火牆規則。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule create |
建立新的防火牆規則,或更新 Mongo 叢集上的現有防火牆規則。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule delete |
刪除 Mongo 叢集防火牆規則。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule list |
列出指定 Mongo 叢集中的所有防火牆規則。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule show |
取得有關 Mongo 叢集防火牆規則的資訊。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule update |
更新新的防火牆規則,或更新 Mongo 叢集上的現有防火牆規則。 |
Extension | Preview |
| az documentdb mongocluster firewall-rule wait |
將 CLI 置於等候狀態,直到符合條件為止。 |
Extension | Preview |
| az documentdb mongocluster identity |
管理身分識別。 |
Extension | Preview |
| az documentdb mongocluster identity assign |
指派用戶或系統受控識別。 |
Extension | Preview |
| az documentdb mongocluster identity list |
列出分配給 Mongo 叢集的管理身份。 |
Extension | Preview |
| az documentdb mongocluster identity remove |
拿掉使用者或系統受控識別。 |
Extension | Preview |
| az documentdb mongocluster identity show |
顯示受控識別的詳細數據。 |
Extension | Preview |
| az documentdb mongocluster identity wait |
將 CLI 置於等候狀態,直到符合條件為止。 |
Extension | Preview |
| az documentdb mongocluster list |
列出指定訂用帳戶中的所有 Mongo 叢集。 |
Extension | Preview |
| az documentdb mongocluster list-connection-strings |
列出 mongo 叢集連接字串。 這包括使用 SCRAM-SHA-256 的預設連接字串,以及叢集支援的其他連接字串。 |
Extension | Preview |
| az documentdb mongocluster microsoft-entra-user |
管理 Mongo 叢集上的 Microsoft Entra ID 使用者。 |
Extension | Preview |
| az documentdb mongocluster microsoft-entra-user assign |
透過指派 Mongo 叢集的資料庫角色,授予 Microsoft Entra ID 主體存取權。 |
Extension | Preview |
| az documentdb mongocluster microsoft-entra-user list |
在 Mongo 叢集中列出 Microsoft Entra ID 的使用者。 |
Extension | Preview |
| az documentdb mongocluster microsoft-entra-user remove |
移除 Microsoft Entra ID 主體從 mongo 叢集中的存取權限。 |
Extension | Preview |
| az documentdb mongocluster microsoft-entra-user show |
取得 Mongo 叢集上 Microsoft Entra ID 使用者的定義。 |
Extension | Preview |
| az documentdb mongocluster microsoft-entra-user wait |
將 CLI 置於等候狀態,直到符合條件為止。 |
Extension | Preview |
| az documentdb mongocluster replica |
管理複製品。 |
Extension | Preview |
| az documentdb mongocluster replica create |
建立一個現有 Mongo 叢集的讀取副本。 |
Extension | Preview |
| az documentdb mongocluster replica list |
列出所有 Mongo 叢集的複製品。 |
Extension | Preview |
| az documentdb mongocluster replica promote |
將復本 Mongo 叢集升階為主要角色。 |
Extension | Preview |
| az documentdb mongocluster reset-password |
重設 Mongo 叢集的管理員密碼。 |
Extension | Preview |
| az documentdb mongocluster restore |
從某個時間點還原一個 mongo 叢集到新的叢集。 |
Extension | Preview |
| az documentdb mongocluster show |
獲取有關 mongo 星團的資訊。 |
Extension | Preview |
| az documentdb mongocluster update |
更新 Mongo 叢集。 只有請求中指定的屬性會被修改;其他屬性保持不變(HTTP PATCH)。 支援通用更新參數(--set、--add、--remove)。 |
Extension | Preview |
| az documentdb mongocluster wait |
將 CLI 置於等候狀態,直到符合條件為止。 |
Extension | Preview |
az documentdb mongocluster check-name-availability
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
檢查 mongo 叢集名稱是否可供使用。
az documentdb mongocluster check-name-availability [--acquire-policy-token]
[--change-reference]
[--ids]
[--location]
[--name]
[--subscription]
[--type]
範例
看看是否有 mongo 叢集名稱可用。
az documentdb mongocluster check-name-availability --location eastus --name MyCluster
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Location. 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
需要檢查可用性的資源名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Body Arguments |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源類型。
| 屬性 | 值 |
|---|---|
| 參數群組: | Body Arguments |
| 預設值: | Microsoft.DocumentDB/mongoClusters |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster create
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
建立一個 Mongo 叢集。 更新會覆寫資源的所有屬性。 若要只修改某些屬性,請使用 PATCH。
az documentdb mongocluster create --admin-password --password
--admin-user
--cluster-name --name
--high-availability {Disabled, SameZone, ZoneRedundantPreferred}
--resource-group
--shard-count
--storage-size
--tier
[--acquire-policy-token]
[--auth-allowed-modes]
[--change-reference]
[--data-api-mode {Disabled, Enabled}]
[--encryption]
[--location]
[--mi-user-assigned --user-assigned]
[--network-bypass-mode {AzureCosmosDB, None}]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--preview-features]
[--public-network-access {Disabled, Enabled}]
[--server-version]
[--storage-type {PremiumSSD, PremiumSSDv2}]
[--tags]
範例
建立一個配備高級 SSD v2 儲存的 Mongo 叢集。
az documentdb mongocluster create -n MyCluster -g MyResourceGroup --location eastus --admin-user dbadmin --admin-password MyP@ssw0rd123! --tier M30 --storage-size 128 --storage-type PremiumSSDv2 --shard-count 1 --high-availability Disabled
必要參數
系統管理員密碼。 如果值為空白,則會從tty要求此值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
系統管理員用戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
蒙古星團的名稱。
為叢集要求的目標高可用性模式。
| 屬性 | 值 |
|---|---|
| 參數群組: | HighAvailability Arguments |
| 接受的值: | Disabled, SameZone, ZoneRedundantPreferred |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
要布建在叢集上的分區數目。
| 屬性 | 值 |
|---|---|
| 參數群組: | Sharding Arguments |
指派給每部伺服器的數據磁碟大小。
| 屬性 | 值 |
|---|---|
| 參數群組: | Storage Arguments |
要指派給叢集的計算層,其中每一層都會對應至虛擬核心和記憶體大小。 範例值:『M30』、『M40』。
| 屬性 | 值 |
|---|---|
| 參數群組: | Compute Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
允許資料存取認證模式的空格分離清單。 允許的值:NativeAuth、MicrosoftEntraID。 範例:--auth-allowed-modes NativeAuth MicrosoftEntraID 支援簡寫語法、json-file 與 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | AuthConfig Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
啟用或停用叢集上的 Mongo Data API。 允許的值:Enabled、Disabled。 範例:--data-api-mode 啟用。
| 屬性 | 值 |
|---|---|
| 參數群組: | DataApi Arguments |
| 接受的值: | Disabled, Enabled |
集群的加密配置。 取決於正在配置的標識。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
未指定資源所在的地理位置,將會使用資源群組的位置。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Arguments |
設定使用者受控識別。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Identity Arguments |
叢集的網路繞過模式。 設定為「AzureCosmosDB」可讓 Azure Cosmos DB 服務繞過網路限制。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | AzureCosmosDB, None |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
叢集上啟用的預覽功能清單,空間分離。 預覽功能名稱為自由形式字串;請參閱 Mongo Cluster 功能文件以獲取目前可用的數值。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
此 Mongo 叢集是否允許公用端點存取。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | Disabled, Enabled |
Mongo DB 伺服器版本。 如果未指定,則預設為最新的可用版本。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
用於預置集群伺服器的存儲類型。
| 屬性 | 值 |
|---|---|
| 參數群組: | Storage Arguments |
| 接受的值: | PremiumSSD, PremiumSSDv2 |
資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster delete
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
刪除一個 mongo 叢集。
az documentdb mongocluster delete [--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
範例
刪除一個 mongo 叢集。
az documentdb mongocluster delete -n MyCluster -g MyResourceGroup
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
蒙古星團的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
不提示確認。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster list
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
列出指定訂用帳戶中的所有 Mongo 叢集。
az documentdb mongocluster list [--max-items]
[--next-token]
[--resource-group]
範例
將所有 Mongo 叢集列入資源群組。
az documentdb mongocluster list -g MyResourceGroup
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token 自變數中提供令牌值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Pagination Arguments |
標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Pagination Arguments |
資源群組的名稱。 您可以使用 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 documentdb mongocluster list-connection-strings
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
列出 mongo 叢集連接字串。 這包括使用 SCRAM-SHA-256 的預設連接字串,以及叢集支援的其他連接字串。
az documentdb mongocluster list-connection-strings [--acquire-policy-token]
[--change-reference]
[--cluster-name]
[--ids]
[--resource-group]
[--subscription]
範例
列出 Mongo 叢集的連接字串。
az documentdb mongocluster list-connection-strings --cluster-name MyCluster -g MyResourceGroup
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
蒙古星團的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster reset-password
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
重設 Mongo 叢集的管理員密碼。
az documentdb mongocluster reset-password --admin-password --password
[--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
範例
重設管理員密碼。
az documentdb mongocluster reset-password -n MyCluster -g MyResourceGroup --admin-password NewP@ssw0rd123!
必要參數
新的管理員密碼。 如果值為空白,則會從tty要求此值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
蒙古星團的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster restore
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
從某個時間點還原一個 mongo 叢集到新的叢集。
從已備份(或已刪除)來源叢集的備份中建立新的 mongo 叢集,地點在請求的時間點。
az documentdb mongocluster restore --admin-password --password
--admin-user
--cluster-name --name
--resource-group
--restore-time
--source-cluster
[--acquire-policy-token]
[--change-reference]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
範例
將叢集還原到某個時間點。
az documentdb mongocluster restore -n RestoredCluster -g MyResourceGroup --location eastus2 --source-cluster MySourceCluster --restore-time "2026-06-30T10:00:00Z" --admin-user dbadmin --admin-password MyP@ssw0rd123!
必要參數
系統管理員密碼。 如果值為空白,則會從tty要求此值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
系統管理員用戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
蒙古星團的名稱。
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
以 ISO-8601 格式還原的 UTC 時間點(例如:2026-06-30T10:00:00Z)。
| 屬性 | 值 |
|---|---|
| 參數群組: | Restore Arguments |
來源 Mongo 叢集的名稱或資源 ID。 若給出名稱,則假設為目前訂閱及資源群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Restore Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
未指定資源所在的地理位置,將會使用資源群組的位置。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster show
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
獲取有關 mongo 星團的資訊。
az documentdb mongocluster show [--cluster-name --name]
[--ids]
[--resource-group]
[--subscription]
範例
獲取有關 mongo 星團的資訊。
az documentdb mongocluster show -n MyCluster -g MyResourceGroup
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
蒙古星團的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster update
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
更新 Mongo 叢集。 只有請求中指定的屬性會被修改;其他屬性保持不變(HTTP PATCH)。 支援通用更新參數(--set、--add、--remove)。
az documentdb mongocluster update [--acquire-policy-token]
[--add]
[--admin-password --password]
[--admin-user]
[--auth-allowed-modes]
[--change-reference]
[--cluster-name --name]
[--data-api-mode {Disabled, Enabled}]
[--encryption]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--high-availability {Disabled, SameZone, ZoneRedundantPreferred}]
[--ids]
[--network-bypass-mode {AzureCosmosDB, None}]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--preview-features]
[--public-network-access {Disabled, Enabled}]
[--remove]
[--resource-group]
[--server-version]
[--set]
[--shard-count]
[--storage-size]
[--storage-type {PremiumSSD, PremiumSSDv2}]
[--subscription]
[--tags]
[--tier]
範例
更新 Mongo 叢集的運算層級。
az documentdb mongocluster update -n MyCluster -g MyResourceGroup --tier M40
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
系統管理員密碼。 如果值為空白,則會從tty要求此值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
系統管理員用戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Administrator Arguments |
允許資料存取認證模式的空格分離清單。 允許的值:NativeAuth、MicrosoftEntraID。 範例:--auth-allowed-modes NativeAuth MicrosoftEntraID 支援簡寫語法、json-file 與 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | AuthConfig Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
蒙古星團的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
啟用或停用叢集上的 Mongo Data API。 允許的值:Enabled、Disabled。 範例:--data-api-mode 啟用。
| 屬性 | 值 |
|---|---|
| 參數群組: | DataApi Arguments |
| 接受的值: | Disabled, Enabled |
集群的加密配置。 取決於正在配置的標識。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
為叢集要求的目標高可用性模式。
| 屬性 | 值 |
|---|---|
| 參數群組: | HighAvailability Arguments |
| 接受的值: | Disabled, SameZone, ZoneRedundantPreferred |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
叢集的網路繞過模式。 設定為「AzureCosmosDB」可讓 Azure Cosmos DB 服務繞過網路限制。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | AzureCosmosDB, None |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
叢集上啟用的預覽功能清單,空間分離。 預覽功能名稱為自由形式字串;請參閱 Mongo Cluster 功能文件以獲取目前可用的數值。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
此 Mongo 叢集是否允許公用端點存取。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | Disabled, Enabled |
從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove> 或 --remove propertyToRemove。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Mongo DB 伺服器版本。 如果未指定,則預設為最新的可用版本。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
要布建在叢集上的分區數目。
| 屬性 | 值 |
|---|---|
| 參數群組: | Sharding Arguments |
指派給每部伺服器的數據磁碟大小。
| 屬性 | 值 |
|---|---|
| 參數群組: | Storage Arguments |
用於預置集群伺服器的存儲類型。
| 屬性 | 值 |
|---|---|
| 參數群組: | Storage Arguments |
| 接受的值: | PremiumSSD, PremiumSSDv2 |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Arguments |
要指派給叢集的計算層,其中每一層都會對應至虛擬核心和記憶體大小。 範例值:『M30』、『M40』。
| 屬性 | 值 |
|---|---|
| 參數群組: | Compute Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az documentdb mongocluster wait
指令群組「az documentdb mongocluster」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
將 CLI 置於等候狀態,直到符合條件為止。
az documentdb mongocluster wait [--acquire-policy-token]
[--change-reference]
[--cluster-name --name]
[--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
蒙古星團的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請等候在 'Succeeded' 使用 'provisioningState' 建立。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
等到刪除為止。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等候資源存在。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
輪詢間隔以秒為單位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 30 |
資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
以秒為單位的等候上限。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 3600 |
等到 provisioningState 更新為 'Succeeded'。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |