az network vnet-gateway
使用 Azure 虚拟网络网关建立安全的跨界连接。
若要详细了解 Azure 虚拟网络 网关,请访问https://learn.microsoft.com/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli。
命令
az network vnet-gateway create
创建虚拟网络网关。
az network vnet-gateway create --name
--resource-group
--vnet
[--aad-audience]
[--aad-issuer]
[--aad-tenant]
[--address-prefix --address-prefixes]
[--allow-remote-vnet-traffic {0, 1, f, false, n, no, t, true, y, yes}]
[--allow-vwan-traffic {0, 1, f, false, n, no, t, true, y, yes}]
[--asn]
[--bgp-peering-address]
[--client-protocol]
[--custom-routes]
[--edge-zone]
[--edge-zone-vnet-id]
[--enable-high-bandwidth --enable-high-bandwidth-vpn-gateway {0, 1, f, false, n, no, t, true, y, yes}]
[--enable-private-ip {0, 1, f, false, n, no, t, true, y, yes}]
[--gateway-default-site]
[--gateway-type {ExpressRoute, LocalGateway, Vpn}]
[--location]
[--max-scale-unit]
[--min-scale-unit]
[--nat-rule --nat-rules]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--peer-weight]
[--public-ip-address --public-ip-addresses]
[--radius-secret]
[--radius-server]
[--resiliency-model {MultiHomed, SingleHomed}]
[--root-cert-data]
[--root-cert-name]
[--sku {Basic, ErGw1AZ, ErGw2AZ, ErGw3AZ, ErGwScale, HighPerformance, Standard, UltraPerformance, VpnGw1, VpnGw1AZ, VpnGw2, VpnGw2AZ, VpnGw3, VpnGw3AZ, VpnGw4, VpnGw4AZ, VpnGw5, VpnGw5AZ}]
[--tags]
[--vpn-auth-type]
[--vpn-gateway-generation {Generation1, Generation2, None}]
[--vpn-type {PolicyBased, RouteBased}]
示例
创建用于站点到站点连接的基本虚拟网络网关。
az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --no-wait
创建一个基本虚拟网络网关,该网关提供与 RADIUS 服务器上配置的内容匹配的 RADIUS 机密的点到站点连接。
az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --address-prefixes 40.1.0.0/24 --client-protocol IkeV2 SSTP --radius-secret 111_aaa --radius-server 30.1.1.15 --vpn-gateway-generation Generation1
创建具有多身份验证的基本虚拟网络网关
az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --address-prefixes 40.1.0.0/24 --client-protocol OpenVPN --radius-secret 111_aaa --radius-server 30.1.1.15 --aad-issuer https://sts.windows.net/00000-000000-00000-0000-000/ --aad-tenant https://login.microsoftonline.com/000 --aad-audience 0000-000 --root-cert-name root-cert --root-cert-data "root-cert.cer" --vpn-auth-type AAD Certificate Radius
创建虚拟网络网关。
az network vnet-gateway create --gateway-type Vpn --location westus2 --name MyVnetGateway --no-wait --public-ip-addresses myVGPublicIPAddress --resource-group MyResourceGroup --sku Basic --vnet MyVnet --vpn-type PolicyBased
必需参数
VNet 网关的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
具有名为“GatewaySubnet”的子网的现有虚拟网络的名称或 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
VirtualNetworkGateway 的 AADAudience ID。
属性 | 值 |
---|---|
Parameter group: | AAD Authentication Arguments |
VirtualNetworkGateway 的 AAD 颁发者 URI。
属性 | 值 |
---|---|
Parameter group: | AAD Authentication Arguments |
VirtualNetworkGateway 的 AAD 租户 URI。
属性 | 值 |
---|---|
Parameter group: | AAD Authentication Arguments |
CIDR 前缀的空格分隔列表,表示 P2S Vpnclient 的地址空间。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。 单一标志: --address-prefix
。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
将此网关配置为接受来自其他 Azure 虚拟网络的流量。 此配置不支持连接到 Azure 虚拟 WAN。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
将此网关配置为接受来自远程虚拟网络的流量。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
用于 BGP 设置的自治系统编号。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
用于 BGP 对等互连的 IP 地址。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
用于连接的协议。 允许的值:IkeV2、OpenVPN、SSTP。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
CIDR 前缀的空间分隔列表,这些前缀表示客户为 VpnClient 指定的自定义路由地址空间。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
边缘区域的名称。
本地网关的扩展 vnet 资源 ID。
为 VPN 网关启用高级连接功能。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
是否需要在此网关上为连接启用专用 IP。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
表示具有默认路由的本地网络站点的本地网络网关的名称或 ID。
网关类型。
属性 | 值 |
---|---|
默认值: | Vpn |
接受的值: | ExpressRoute, LocalGateway, Vpn |
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。
自动缩放配置的最大缩放单位。
自动缩放配置的最小缩放单位。
VirtualNetworkGatewayNatRule Resource. 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。 单一标志: --nat-rule
。
属性 | 值 |
---|---|
Parameter group: | Nat Rule Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
添加到通过 BGP 对等互连学习的路由的权重(0-100)。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
为主动-备用网关指定单个公共 IP(名称或 ID)。 为主动-主动网关指定两个空间分隔的公共 IP。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
用于身份验证的 Radius 机密。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
要连接到的 Radius 服务器地址。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
指示 Express Route Gateway 是否具有 MultiHomed 或 SingleHomed 的复原模型。
属性 | 值 |
---|---|
接受的值: | MultiHomed, SingleHomed |
根证书文件或文件路径的 Base64 内容。
属性 | 值 |
---|---|
Parameter group: | Root Cert Authentication Arguments |
根证书名称。
属性 | 值 |
---|---|
Parameter group: | Root Cert Authentication Arguments |
VNet 网关 SKU。
属性 | 值 |
---|---|
默认值: | Basic |
接受的值: | Basic, ErGw1AZ, ErGw2AZ, ErGw3AZ, ErGwScale, HighPerformance, Standard, UltraPerformance, VpnGw1, VpnGw1AZ, VpnGw2, VpnGw2AZ, VpnGw3, VpnGw3AZ, VpnGw4, VpnGw4AZ, VpnGw5, VpnGw5AZ |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
为虚拟网络网关启用 VPN 身份验证类型。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
虚拟网络网关的生成。 如果gateway_type不是 Vpn,则不应提供vpn_gateway_generation。
属性 | 值 |
---|---|
接受的值: | Generation1, Generation2, None |
VPN 路由类型。
属性 | 值 |
---|---|
默认值: | RouteBased |
接受的值: | PolicyBased, RouteBased |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 vnet-gateway delete
删除虚拟网络网关。
若要删除虚拟网络网关,必须先删除连接到网关的 Azure 中的所有连接对象。 删除网关后,继续删除当前未使用的其他资源。 有关详细信息,请按照此页上的说明顺序操作: https://learn.microsoft.com/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal
az network vnet-gateway delete [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
删除虚拟网络网关。
az network vnet-gateway delete -g MyResourceGroup -n MyVnetGateway
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
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 vnet-gateway disconnect-vpn-connections
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
断开虚拟网络网关的 VPN 连接。
az network vnet-gateway disconnect-vpn-connections [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--vpn-connections]
示例
断开虚拟网络网关的 VPN 连接。
az network vnet-gateway disconnect-vpn-connections -g MyResourceGroup -n MyVnetGateway --vpn-connections MyConnetion1ByName MyConnection2ByID
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
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 |
VPN 连接的名称或 ID 列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network vnet-gateway list
列出虚拟网络网关。
az network vnet-gateway list --resource-group
[--max-items]
[--next-token]
示例
列出资源组中的虚拟网络网关。
az network vnet-gateway list -g MyResourceGroup
必需参数
资源组的名称。 可以使用 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.
命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token
参数中提供令牌值。
属性 | 值 |
---|---|
Parameter group: | Pagination Arguments |
用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。
属性 | 值 |
---|---|
Parameter group: | Pagination Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 vnet-gateway list-advertised-routes
列出播发到指定对等方的虚拟网络网关的路由。
az network vnet-gateway list-advertised-routes --peer
[--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
列出播发到指定对等方的虚拟网络网关的路由。
az network vnet-gateway list-advertised-routes -g MyResourceGroup -n MyVnetGateway --peer 23.10.10.9
必需参数
对等方的 IP 地址。
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
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 vnet-gateway list-bgp-peer-status
检索 BGP 对等方的状态。
az network vnet-gateway list-bgp-peer-status [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--peer]
[--resource-group]
[--subscription]
示例
检索 BGP 对等方的状态。
az network vnet-gateway list-bgp-peer-status -g MyResourceGroup -n MyVnetGateway --peer 23.10.10.9
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
要检索其状态的对等方的 IP 地址。 默认值为无。
资源组的名称。 可以使用 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 vnet-gateway list-learned-routes
此操作检索虚拟网络网关已学习的路由列表,包括从 BGP 对等方学习的路由。
az network vnet-gateway list-learned-routes [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
检索已学习路由的列表。
az network vnet-gateway list-learned-routes -g MyResourceGroup -n MyVnetGateway
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
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 vnet-gateway reset
重置虚拟网络网关。
az network vnet-gateway reset [--gateway-vip]
[--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
重置虚拟网络网关。
az network vnet-gateway reset -g MyResourceGroup -n MyVnetGateway
重置启用了 Active-Active 功能的虚拟网络网关。
az network vnet-gateway reset -g MyResourceGroup -n MyVnetGateway --gateway-vip MyGatewayIP
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
为启用主动-主动功能网关的开始重置提供的虚拟网络网关 vip 地址。
属性 | 值 |
---|---|
默认值: | None |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
VNet 网关的名称。
属性 | 值 |
---|---|
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 vnet-gateway show
获取虚拟网络网关的详细信息。
az network vnet-gateway show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
获取虚拟网络网关的详细信息。
az network vnet-gateway show -g MyResourceGroup -n MyVnetGateway
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 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 vnet-gateway show-supported-devices
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
获取支持的 VPN 设备的 xml 格式表示形式。
az network vnet-gateway show-supported-devices [--ids]
[--name]
[--resource-group]
[--subscription]
示例
获取支持的 VPN 设备的 xml 格式表示形式。
az network vnet-gateway show-supported-devices -g MyResourceGroup -n MyVnetGateway
可选参数
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 |
VNet 网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 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 vnet-gateway update
更新虚拟网络网关。
az network vnet-gateway update [--aad-audience]
[--aad-issuer]
[--aad-tenant]
[--add]
[--address-prefix --address-prefixes]
[--allow-remote-vnet-traffic {0, 1, f, false, n, no, t, true, y, yes}]
[--allow-vwan-traffic {0, 1, f, false, n, no, t, true, y, yes}]
[--asn]
[--bgp-peering-address]
[--client-protocol]
[--custom-routes]
[--enable-bgp {0, 1, f, false, n, no, t, true, y, yes}]
[--enable-private-ip {0, 1, f, false, n, no, t, true, y, yes}]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--gateway-default-site]
[--gateway-type {ExpressRoute, LocalGateway, Vpn}]
[--ids]
[--max-scale-unit]
[--min-scale-unit]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--peer-weight]
[--public-ip-address --public-ip-addresses]
[--radius-secret]
[--radius-server]
[--remove]
[--resiliency-model {MultiHomed, SingleHomed}]
[--resource-group]
[--root-cert-data]
[--root-cert-name]
[--set]
[--sku {Basic, ErGw1AZ, ErGw2AZ, ErGw3AZ, ErGwScale, HighPerformance, Standard, UltraPerformance, VpnGw1, VpnGw1AZ, VpnGw2, VpnGw2AZ, VpnGw3, VpnGw3AZ, VpnGw4, VpnGw4AZ, VpnGw5, VpnGw5AZ}]
[--subscription]
[--tags]
[--vnet]
[--vpn-auth-type]
[--vpn-type {PolicyBased, RouteBased}]
示例
更改虚拟网络网关的 SKU。
az network vnet-gateway update -g MyResourceGroup -n MyVnetGateway --sku VpnGw2
更新虚拟网络网关。
az network vnet-gateway update --address-prefixes 40.1.0.0/24 --client-protocol IkeV2 --name MyVnetGateway --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
VirtualNetworkGateway 的 AADAudience ID。
属性 | 值 |
---|---|
Parameter group: | AAD Authentication Arguments |
VirtualNetworkGateway 的 AAD 颁发者 URI。
属性 | 值 |
---|---|
Parameter group: | AAD Authentication Arguments |
VirtualNetworkGateway 的 AAD 租户 URI。
属性 | 值 |
---|---|
Parameter group: | AAD Authentication Arguments |
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
CIDR 前缀的空格分隔列表,表示 P2S Vpnclient 的地址空间。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。 单一标志: --address-prefix
。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
将此网关配置为接受来自其他 Azure 虚拟网络的流量。 此配置不支持连接到 Azure 虚拟 WAN。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
将此网关配置为接受来自远程虚拟网络的流量。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
用于 BGP 设置的自治系统编号。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
用于 BGP 对等互连的 IP 地址。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
用于连接的协议。 允许的值:IkeV2、OpenVPN、SSTP。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
CIDR 前缀的空间分隔列表,这些前缀表示客户为 VpnClient 指定的自定义路由地址空间。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
启用 BGP(边界网关协议)。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
是否需要在此网关上为连接启用专用 IP。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
表示具有默认路由的本地网络站点的本地网络网关的名称或 ID。
网关类型。
属性 | 值 |
---|---|
接受的值: | ExpressRoute, LocalGateway, Vpn |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
自动缩放配置的最大缩放单位。
自动缩放配置的最小缩放单位。
VNet 网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
添加到通过 BGP 对等互连学习的路由的权重(0-100)。
属性 | 值 |
---|---|
Parameter group: | BGP Peering Arguments |
为主动-备用网关指定单个公共 IP(名称或 ID)。 为主动-主动网关指定两个空间分隔的公共 IP。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
用于身份验证的 Radius 机密。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
要连接到的 Radius 服务器地址。
属性 | 值 |
---|---|
Parameter group: | VPN Client Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
指示 Express Route Gateway 是否具有 MultiHomed 或 SingleHomed 的复原模型。
属性 | 值 |
---|---|
接受的值: | MultiHomed, SingleHomed |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
根证书文件或文件路径的 Base64 内容。
属性 | 值 |
---|---|
Parameter group: | Root Cert Authentication Arguments |
根证书名称。
属性 | 值 |
---|---|
Parameter group: | Root Cert Authentication Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
VNet 网关 SKU。
属性 | 值 |
---|---|
接受的值: | Basic, ErGw1AZ, ErGw2AZ, ErGw3AZ, ErGwScale, HighPerformance, Standard, UltraPerformance, VpnGw1, VpnGw1AZ, VpnGw2, VpnGw2AZ, VpnGw3, VpnGw3AZ, VpnGw4, VpnGw4AZ, VpnGw5, VpnGw5AZ |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
具有名为“GatewaySubnet”的子网的现有虚拟网络的名称或 ID。
为虚拟网络网关启用 VPN 身份验证类型。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
VPN 路由类型。
属性 | 值 |
---|---|
接受的值: | PolicyBased, RouteBased |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az network vnet-gateway wait
将 CLI 置于等待状态,直到满足条件。
az network vnet-gateway wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
可选参数
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 |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
轮询间隔(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 30 |
VNet 网关的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
最大等待(以秒为单位)。
属性 | 值 |
---|---|
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/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |