azure-logic-apps - 如何在管道中获取 Azure Logic App 出站 IP 地址
问题描述
我正在尝试通过 Azure SQL 服务器防火墙将逻辑应用程序列入白名单,为此在Azure DevOps Pipeline中,我需要获取其或其连接器的出站 IP 地址,对于 webapps,我通常使用此powershell命令:
(Get-AzWebApp -ResourceGroup <group_name> -name <app_name>).OutboundIpAddresses
我如何为逻辑应用程序/ api 连接器实现相同的功能。我还读到每个区域的逻辑应用程序的 ips 是相同的,是否有powershell命令来获取这些 ips 并避免硬编码?
解决方案
请尝试这种方式:
$myLogicApp = Get-AzureRmResource -ResourceGroupName "<your-resourcegroup-name>" -ResourceType Microsoft.Logic/workflows -ResourceName "<your-logic-app-name>"
$myLogicApp.Properties.endpointsConfiguration.workflow.outgoingIpAddresses
$myLogicApp.Properties.endpointsConfiguration.connector.outgoingIpAddresses
推荐阅读
- javascript - 有没有办法为从服务器提取的动态表单字段使用状态?
- python - 使用 2 个数字作为字典中的键(Python)
- flutter - Flutter FAILURE:构建失败并出现异常。无法编译设置文件 settings.gradle
- file - 如何或如何设置 cronjob 或 crontab 以运行 curl 命令以将文件下载到目录中的特定路径?php脚本?
- angular - 无法运行 ng build
- size - lottie 视频动画尺寸看起来很小
- typescript - 打字稿不验证正在传播的对象的内容以完成类型
- c# - dotnet core docker 容器在 ubuntu 服务器启动时关闭
- http - 为什么这会返回 403
- sql - 即使条件正确,过滤器也会导致所有内容都被过滤掉