az site-recovery protection-container
注意
此參考是 Azure CLI 的月臺復原 延伸模組的一部分 (2.51.0 版或更高版本)。 擴充功能會在您第一次執行 az site-recovery protection-container 命令時自動安裝。 深入了解擴充功能。
管理保護容器。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az site-recovery protection-container create |
建立 以建立保護容器。 |
擴充 | GA |
az site-recovery protection-container list |
列出指定網狀架構中的保護容器。 |
擴充 | GA |
az site-recovery protection-container mapping |
管理保護容器的保護容器對應。 |
擴充 | GA |
az site-recovery protection-container mapping create |
建立作業以建立保護容器對應。 |
擴充 | GA |
az site-recovery protection-container mapping delete |
刪除作業以清除保護容器對應(強制刪除)。 |
擴充 | GA |
az site-recovery protection-container mapping list |
列出保護容器的保護容器對應。 |
擴充 | GA |
az site-recovery protection-container mapping remove |
要刪除或移除保護容器對應的作業。 |
擴充 | GA |
az site-recovery protection-container mapping show |
取得保護容器對應的詳細資料。 |
擴充 | GA |
az site-recovery protection-container mapping update |
更新作業以建立保護容器對應。 |
擴充 | GA |
az site-recovery protection-container remove |
移除保護容器的作業。 |
擴充 | GA |
az site-recovery protection-container show |
取得保護容器的詳細資料。 |
擴充 | GA |
az site-recovery protection-container switch-protection |
將保護從一個容器切換到另一個容器或另一個複寫提供者的作業。 |
擴充 | GA |
az site-recovery protection-container update |
更新以建立保護容器。 |
擴充 | GA |
az site-recovery protection-container create
建立 以建立保護容器。
az site-recovery protection-container create --fabric-name
--name
--resource-group
--vault-name
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--provider-input]
範例
A2A 的保護容器建立
az site-recovery protection-container create -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name --provider-input '[{instance-type:A2A}]'
hyper-v-replica-azure 的 protection-container create
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container "Microsoft Azure" --provider-input '{hyper-v-replica-azure:""}'
必要參數
唯一網狀架構 ARM 名稱。
唯一保護容器 ARM 名稱。
資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
復原服務保存庫的名稱。
選擇性參數
請勿等候長時間執行的作業完成。
用於建立容器的提供者特定輸入。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az site-recovery protection-container list
列出指定網狀架構中的保護容器。
az site-recovery protection-container list --fabric-name
--resource-group
--vault-name
[--max-items]
[--next-token]
範例
protection-container list
az site-recovery protection-container list -g rg --fabric-name fabric_source_name --vault-name vault_name
必要參數
網狀架構名稱。
資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
復原服務保存庫的名稱。
選擇性參數
命令輸出中要傳回的專案總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供權杖。 若要繼續分頁,請在後續命令的引數中 --next-token
提供權杖值。
標記,指定要開始分頁的位置。 這是先前截斷回應中的權杖值。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az site-recovery protection-container remove
移除保護容器的作業。
az site-recovery protection-container remove [--fabric-name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--protection-container-name]
[--resource-group]
[--subscription]
[--vault-name]
範例
protection-container remove
az site-recovery protection-container remove -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name
選擇性參數
唯一網狀架構 ARM 名稱。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。
請勿等候長時間執行的作業完成。
保護容器的名稱。
資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
復原服務保存庫的名稱。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az site-recovery protection-container show
取得保護容器的詳細資料。
az site-recovery protection-container show [--fabric-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
[--vault-name]
範例
protection-container show
az site-recovery protection-container show -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name
選擇性參數
網狀架構名稱。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。
保護容器名稱。
資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
復原服務保存庫的名稱。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az site-recovery protection-container switch-protection
將保護從一個容器切換到另一個容器或另一個複寫提供者的作業。
az site-recovery protection-container switch-protection [--fabric-name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--protected-item]
[--protection-container-name]
[--provider-details]
[--resource-group]
[--subscription]
[--vault-name]
範例
A2A 的保護容器交換器保護
az site-recovery protection-container switch-protection --fabric-name fabric1_name -n container1_name --protected-item protected_item_name -g rg --vault-name vault_name --provider-details '{a2a:{policy-id:policy_id,recovery-container-id:container1_id,recovery-resource-group-id:vm_rg_id,vm-managed-disks:[{disk-id:recovery_os_disk,primary-staging-azure-storage-account-id:storage2_id,recovery-resource-group-id:vm_rg_id}]}}'
選擇性參數
唯一的網狀架構名稱。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。
請勿等候長時間執行的作業完成。
唯一的複寫保護專案名稱。
保護容器的名稱。
提供者特定的交換器保護輸入。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。
資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
復原服務保存庫的名稱。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az site-recovery protection-container update
更新以建立保護容器。
az site-recovery protection-container update [--add]
[--fabric-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--provider-input]
[--remove]
[--resource-group]
[--set]
[--subscription]
[--vault-name]
範例
protection-container update
az site-recovery protection-container update -g rg --fabric-name fabric_source_name -n container_source_name --vault-name vault_name --provider-input '[{instance-type:A2ACrossClusterMigration}]'
選擇性參數
藉由指定路徑和索引鍵值組,將 物件加入物件清單。 範例:--add property.listProperty < key=value、string 或 JSON 字串 > 。
網狀架構名稱。
使用 'set' 或 'add' 時,請保留字元串常值,而不是嘗試轉換成 JSON。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。
保護容器名稱。
請勿等候長時間執行的作業完成。
用於建立容器的提供者特定輸入。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。
從清單中移除屬性或專案。 範例:--remove property.list OR --remove 屬性ToRemove。
資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
復原服務保存庫的名稱。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應