如何在 Azure Spring Cloud 中标识出站公共 IP 地址How to identify outbound public IP addresses in Azure Spring Cloud
本页说明如何查看 Azure Spring Cloud 应用程序的静态出站公共 IP 地址。This page explains how to view static outbound public IP addresses of Azure Spring Cloud applications. 公共 IP 用于与外部资源（例如，数据库、存储和密钥保管库）通信。Public IPs are used to communicate with external resources, such as databases, storage, and key vaults.
IP 地址在 Azure Spring Cloud 中的工作原理How IP addresses work in Azure Spring Cloud
Azure Spring Cloud 服务有一个或多个出站公共 IP 地址。An Azure Spring Cloud service has one or more outbound public IP addresses. 出站公共 IP 地址数可能因层级和其他因素而异。The number of outbound public IP addresses may vary according to the tiers and other factors.
出站公共 IP 地址通常是固定不变的，但有例外。The outbound public IP addresses are usually constant and remain the same, but there are exceptions.
出站 IP 更改时When outbound IPs change
每个 Azure Spring Cloud 实例在任何给定时间都有一定数量的出站公共 IP 地址。Each Azure Spring Cloud instance has a set number of outbound public IP addresses at any given time. 从应用程序发起的任何出站连接（例如，与后端数据库的连接）都使用出站公共 IP 地址之一作为源 IP 地址。Any outbound connection from the applications, such as to a back-end database, uses one of the outbound public IP addresses as the origin IP address. 该 IP 地址是在运行时随机选择的，因此后端服务必须对所有出站 IP 地址打开其防火墙。The IP address is selected randomly at runtime, so your back-end service must open its firewall to all the outbound IP addresses.
执行以下操作之一时，出站公共 IP 数会更改：The number of outbound public IPs changes when you perform one of the following actions:
- 升级层间的 Azure Spring Cloud 实例。Upgrade your Azure Spring Cloud instance between tiers.
- 提交支持票证以根据业务需求获取更多出站公共 IP。Raise a support ticket for more outbound public IPs for business needs.
查找出站 IPFind outbound IPs
若要在 Azure 门户中查找服务实例当前使用的出站公共 IP 地址，请在实例的左侧导航窗格中单击“网络”。To find the outbound public IP addresses currently used by your service instance in the Azure portal, click Networking in your instance's left-hand navigation pane. 这些 IP 地址会列在“出站 IP 地址”字段中。They are listed in the Outbound IP addresses field.
az spring-cloud show --resource-group <group_name> --name <service_name> --query properties.networkProfile.outboundIPs.publicIPs --output tsv