共用方式為


az network vpn-gateway

注意

此參考是 Azure CLI 的虛擬 wan 擴充功能的一部分(2.55.0 版或更高版本)。 擴充功能會在您第一次執行 az network vpn-gateway 命令時自動安裝。 深入了解擴充功能。

管理站對站 VPN 閘道。

命令

名稱 Description 類型 狀態
az network vpn-gateway connection

管理站對站 VPN 網關聯機。

副檔名 GA
az network vpn-gateway connection create

建立站對站 VPN 網關聯機。

副檔名 GA
az network vpn-gateway connection delete

刪除站對站 VPN 網關聯機。

副檔名 GA
az network vpn-gateway connection ipsec-policy

管理站對站 VPN 網關聯機 IPSec 原則。

副檔名 GA
az network vpn-gateway connection ipsec-policy add

將IPSec原則新增至站對站 VPN 網關聯機。

副檔名 GA
az network vpn-gateway connection ipsec-policy list

列出站對站 VPN 網關聯機 IPSec 原則。

副檔名 GA
az network vpn-gateway connection ipsec-policy remove

從站對站 VPN 網關聯機移除 IPSec 原則。

副檔名 GA
az network vpn-gateway connection list

列出站對站 VPN 網關聯機。

副檔名 GA
az network vpn-gateway connection packet-capture

管理站對站 VPN 網關聯機封包擷取。

副檔名 GA
az network vpn-gateway connection packet-capture start

在指定的資源群組中的 Vpn 連線上啟動封包擷取。

副檔名 GA
az network vpn-gateway connection show

取得站對站 VPN 網關聯機的詳細數據。

副檔名 GA
az network vpn-gateway connection update

更新 VPN 網關聯機的設定。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn

管理站對站 VPN 網關聯機 VPN 月臺連結連線。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn add

將 VPN 月台連結連線新增至站對站 VPN 網關聯機。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn ipsec-policy

管理站對站 VPN 網關聯機 VPN 月臺連結 IPSec 原則。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn ipsec-policy add

將IPSec原則新增至站對站 VPN 網關聯機 VPN 網站連結。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn ipsec-policy list

列出站對站 VPN 網關聯機 VPN 月臺連結 IPSec 原則。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn ipsec-policy remove

從站對站 VPN 網關聯機 VPN 網站連結移除 IPSec 原則。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn list

列出站對站 VPN 網關聯機 VPN 月臺連結連線。

副檔名 GA
az network vpn-gateway connection vpn-site-link-conn remove

從站對站 VPN 網關聯機移除 VPN 月台連結連線。

副檔名 GA
az network vpn-gateway connection wait

將 CLI 置於等候狀態,直到符合站對站 VPN 網關聯機的條件為止。

副檔名 GA
az network vpn-gateway create

建立站對站 VPN 閘道。

副檔名 GA
az network vpn-gateway delete

刪除站對站 VPN 閘道。

副檔名 GA
az network vpn-gateway list

列出站對站 VPN 閘道。

副檔名 GA
az network vpn-gateway nat-rule

管理站對站 VPN 閘道 nat 規則。

副檔名 GA
az network vpn-gateway nat-rule create

如果 NAT 規則不存在,請建立可調整 VPN 閘道的 nat 規則,否則會更新現有的 nat 規則。

副檔名 GA
az network vpn-gateway nat-rule delete

刪除 nat 規則。

副檔名 GA
az network vpn-gateway nat-rule list

列出特定虛擬 wan vpn 閘道的所有 NAT 規則。

副檔名 GA
az network vpn-gateway nat-rule show

取得 nat ruleGet 的詳細數據。

副檔名 GA
az network vpn-gateway nat-rule update

如果 nat 規則不存在,請將 nat 規則更新為可調整的 VPN 閘道,否則會更新現有的 nat 規則。

副檔名 GA
az network vpn-gateway nat-rule wait

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

副檔名 GA
az network vpn-gateway show

取得站對站 VPN 閘道的詳細數據。

副檔名 GA
az network vpn-gateway update

更新站對站 VPN 閘道的設定。

副檔名 GA
az network vpn-gateway wait

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

副檔名 GA

az network vpn-gateway create

建立站對站 VPN 閘道。

az network vpn-gateway create --name
                              --resource-group
                              [--asn]
                              [--bgp-peering-address]
                              [--location]
                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                              [--peer-weight]
                              [--scale-unit]
                              [--tags]
                              [--vhub]

範例

建立站對站 VPN 閘道。

az network vpn-gateway create -n MyVPNGateway -g MyRG --vhub MyVHub -l westus

必要參數

--name -n

VPN 閘道名稱。

--resource-group -g

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

選擇性參數

--asn

BGP 喇叭的 ASN。

--bgp-peering-address

這個 BGP 說話者的對等互連位址和 BGP 識別碼。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。 未指定時,將會使用資源群組的位置。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--peer-weight

新增至從此 BGP 喇叭學習的路由的權數。

--scale-unit

此 VPN 閘道的縮放單位。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--vhub

虛擬中樞的名稱或標識碼。

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

刪除站對站 VPN 閘道。

az network vpn-gateway delete [--ids]
                              [--name]
                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                              [--resource-group]
                              [--subscription]

範例

刪除站對站 VPN 閘道。

az network vpn-gateway delete -n MyVPNGateway -g MyRG

選擇性參數

--ids

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

--name -n

VPN 閘道名稱。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--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 network vpn-gateway list

列出站對站 VPN 閘道。

az network vpn-gateway list [--resource-group]

範例

列出站對站 VPN 閘道。

az network vpn-gateway list -g MyRG

選擇性參數

--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 network vpn-gateway show

取得站對站 VPN 閘道的詳細數據。

az network vpn-gateway show [--ids]
                            [--name]
                            [--resource-group]
                            [--subscription]

範例

取得站對站 VPN 閘道的詳細數據。

az network vpn-gateway show -n MyVPNGateway -g MyRG

選擇性參數

--ids

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

--name -n

VPN 閘道名稱。

--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 network vpn-gateway update

更新站對站 VPN 閘道的設定。

az network vpn-gateway update [--add]
                              [--asn]
                              [--bgp-peering-address]
                              [--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}]
                              [--peer-weight]
                              [--remove]
                              [--resource-group]
                              [--scale-unit]
                              [--set]
                              [--subscription]
                              [--tags]
                              [--vhub]

範例

更新站對站 VPN 閘道的設定。

az network vpn-gateway create -g MyRG --vhub MyVHub --name MyVPNGateway --tags foo=bar

選擇性參數

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value、string 或 JSON 字串>。

--asn

BGP 喇叭的 ASN。

--bgp-peering-address

這個 BGP 說話者的對等互連位址和 BGP 識別碼。

--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--ids

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

--name -n

VPN 閘道名稱。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--peer-weight

新增至從此 BGP 喇叭學習的路由的權數。

--remove

從清單中移除屬性或專案。 範例:--remove property.list OR --remove 屬性ToRemove。

--resource-group -g

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

--scale-unit

此 VPN 閘道的縮放單位。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=。

--subscription

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

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--vhub

虛擬中樞的名稱或標識碼。

全域參數
--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 network vpn-gateway wait

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

az network vpn-gateway wait [--created]
                            [--custom]
                            [--deleted]
                            [--exists]
                            [--ids]
                            [--interval]
                            [--name]
                            [--resource-group]
                            [--subscription]
                            [--timeout]
                            [--updated]

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--ids

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

--interval

輪詢間隔以秒為單位。

預設值: 30
--name -n

VPN 閘道名稱。

--resource-group -g

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

--subscription

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

--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

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