[英]Azure How can I call internal API Management service by private IP inside VNET
I created VNET in Azure.我在 Azure 中创建了 VNET。 I put in one subset internal API Management which call Azure Function outside of the VNET and in another one Virtual machine.
我将一个子集放在内部 API 管理中,它调用 Azure Function 在 VNET 外部和另一台虚拟机中。 When I tried to call API Management I got a 503 exception.
当我尝试调用 API 管理时,我收到了 503 异常。 And if I try to ping private IP from the VM it doest work.
而且,如果我尝试从 VM ping 私有 IP 它将不起作用。
The other solution was to create Azure private link but in this case, I got the info by the link but did not be able to ping or call by private IP(got 400)另一个解决方案是创建 Azure 私有链接,但在这种情况下,我通过链接获取信息但无法通过私有 IP ping 或调用(得到 400)
My solution was to run the web app instead of the AF in the VM because VM can be easily called by private IP in VNET.我的解决方案是在 VM 中运行 web 应用程序而不是 AF,因为 VNET 中的私有 IP 可以轻松调用 VM。
How can I call API Management and other azure services(Azure private link) by private API?如何通过私有 API 调用 API 管理和其他 azure 服务(Azure 私有链接)?
From the official document ,从官方文档来看,
API Management service does not listen to requests coming from IP addresses .
API 管理服务不监听来自 IP 地址的请求。 It only responds to requests to the hostname configured on its service endpoints.
它仅响应对其服务端点上配置的主机名的请求。 These endpoints include gateway, the Azure portal and the Developer portal, direct management endpoint, and Git.
这些端点包括网关、Azure 门户和开发人员门户、直接管理端点和 Git。
You only could access API management service via hostname instead of private IP in an internal mode API Management.您只能在内部模式 API 管理中通过主机名而不是私有 IP 访问 API 管理服务。 For this mode, you have to manage your own routing.
对于这种模式,您必须管理自己的路由。 If you use a custom DNS server in a virtual network, you can also create A DNS records and access these endpoints from anywhere in your virtual network.
如果您在虚拟网络中使用自定义 DNS 服务器,您还可以创建 DNS 记录并从虚拟网络中的任何位置访问这些端点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.