az network p2s-vpn-gateway
Note
This reference is part of the virtual-wan extension for the Azure CLI (version 2.55.0 or higher). 该扩展会在首次运行 az network p2s-vpn-gateway 命令时自动安装。 Learn more about extensions.
管理点到站点 VPN 网关。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az network p2s-vpn-gateway connection |
管理点到站点 VPN 网关连接。 |
Extension | Preview |
az network p2s-vpn-gateway connection list |
列出给定点到站点 VPN 网关的所有连接。 |
Extension | Preview |
az network p2s-vpn-gateway connection show |
显示点到站点 VPN 网关连接的详细信息。 |
Extension | Preview |
az network p2s-vpn-gateway create |
创建点到站点 VPN 网关。 |
Extension | GA |
az network p2s-vpn-gateway delete |
删除点到站点 VPN 网关。 |
Extension | GA |
az network p2s-vpn-gateway disconnect |
断开指定资源组中虚拟 wan P2SVpnGateway 的 P2S vpn 连接。 |
Extension | GA |
az network p2s-vpn-gateway list |
列出所有点到站点 VPN 网关。 |
Extension | GA |
az network p2s-vpn-gateway reset |
重置指定资源组中 p2s vpn 网关的主网关。 |
Extension | GA |
az network p2s-vpn-gateway show |
显示点到站点 VPN 网关的详细信息。 |
Extension | GA |
az network p2s-vpn-gateway update |
更新点到站点 VPN 网关的设置。 |
Extension | GA |
az network p2s-vpn-gateway vpn-client |
下载通过点到站点连接到 Azure 所需的 VPN 客户端配置。 |
Extension | GA |
az network p2s-vpn-gateway vpn-client generate |
为指定资源组中 P2SVpnGateway 的 P2S 客户端生成 VPN 配置文件。 |
Extension | GA |
az network p2s-vpn-gateway wait |
将 CLI 置于等待状态,直到满足点到站点 VPN 网关的条件。 |
Extension | GA |
az network p2s-vpn-gateway create
创建点到站点 VPN 网关。
az network p2s-vpn-gateway create --name
--resource-group
--scale-unit
--vhub
[--address-space]
[--associated --associated-route-table]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--config-name]
[--labels]
[--location]
[--no-wait]
[--propagated --propagated-route-tables]
[--tags]
[--vpn-server-config]
示例
创建点到站点 VPN 网关。
az network p2s-vpn-gateway create -g MyRG -n MyP2SVPNGateway --scale-unit 2 --vhub MyVhub --vpn-server-config MyVPNServerConfig --address-space 10.0.0.0/24 11.0.0.0/24
使用路由配置创建点到站点 VPN 网关。
az network p2s-vpn-gateway create -g MyRG -n MyP2SVPNGateway --scale-unit 2 --vhub MyVhub --vpn-server-config MyVPNServerConfig --address-space 10.0.0.0/24 11.0.0.0/24 --associated-route-table /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable1 --propagated-route-tables /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable1 /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable2 --labels label1 label2
必需参数
P2S Vpn 网关的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
此 VPN 网关的缩放单元。
虚拟中心的名称或 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
P2S VpnClient 的地址空间。 IP 地址范围的空格分隔列表。
与此路由配置关联的路由表的资源 ID。
属性 | 值 |
---|---|
Parameter group: | Routing Configuration Arguments |
此连接的路由配置的入站路由映射的资源 URI。
此连接的路由配置的出站路由映射的资源 URI。
名称或 p2s 连接配置。
属性 | 值 |
---|---|
默认值: | P2SConnectionConfigDefault |
传播的路由表的标签空间分隔列表。
属性 | 值 |
---|---|
Parameter group: | Routing Configuration Arguments |
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
传播的路由表的资源 ID 的空间分隔列表。
属性 | 值 |
---|---|
Parameter group: | Routing Configuration Arguments |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
VPN 服务器配置的名称或 ID。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway delete
删除点到站点 VPN 网关。
az network p2s-vpn-gateway delete --name
--resource-group
[--yes]
必需参数
P2S Vpn 网关的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway disconnect
断开指定资源组中虚拟 wan P2SVpnGateway 的 P2S vpn 连接。
az network p2s-vpn-gateway disconnect [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--vpn-connection-ids]
示例
断开 P2S vpn 连接。
az network p2s-vpn-gateway disconnect -g MyResourceGroup -n MyP2sGateway --vpn-connection-ids "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/p2sVpnGateways/MyP2sGateway/p2sConnectionConfigurations/P2SConnectionConfigDefault"
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
P2S Vpn 网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
p2s vpn 连接 ID 的列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | Request Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway list
列出所有点到站点 VPN 网关。
az network p2s-vpn-gateway list [--resource-group]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway reset
重置指定资源组中 p2s vpn 网关的主网关。
az network p2s-vpn-gateway reset [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
重置 p2s vpn 网关的主网关。
az network p2s-vpn-gateway reset -g MyResourceGroup -n MyP2sGateway
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway show
显示点到站点 VPN 网关的详细信息。
az network p2s-vpn-gateway show --name
--resource-group
必需参数
P2S Vpn 网关的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway update
更新点到站点 VPN 网关的设置。
az network p2s-vpn-gateway update --name
--resource-group
[--add]
[--address-space]
[--associated --associated-route-table]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--config-name]
[--force-string]
[--labels]
[--no-wait]
[--propagated --propagated-route-tables]
[--remove]
[--scale-unit]
[--set]
[--tags]
[--vpn-server-config]
示例
在路由配置下为传播的路由表添加标签。
az network p2s-vpn-gateway update -g MyRG -n MyP2SVPNGateway --labels Newlabel1 Newlabel2 Newlabel3
必需参数
P2S Vpn 网关的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
P2S VpnClient 的地址空间。 IP 地址范围的空格分隔列表。
与此路由配置关联的路由表的资源 ID。
属性 | 值 |
---|---|
Parameter group: | Routing Configuration Arguments |
此连接的路由配置的入站路由映射的资源 URI。
此连接的路由配置的出站路由映射的资源 URI。
名称或 p2s 连接配置。
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
传播的路由表的标签空间分隔列表。
属性 | 值 |
---|---|
Parameter group: | Routing Configuration Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
传播的路由表的资源 ID 的空间分隔列表。
属性 | 值 |
---|---|
Parameter group: | Routing Configuration Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
此 VPN 网关的缩放单元。
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
VPN 服务器配置的名称或 ID。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network p2s-vpn-gateway wait
将 CLI 置于等待状态,直到满足点到站点 VPN 网关的条件。
az network p2s-vpn-gateway wait --name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
必需参数
P2S Vpn 网关的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待在“Succeeded”中使用“provisioningState”创建。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
等到删除为止。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
等待资源存在。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
轮询间隔(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 30 |
最大等待(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |