将VM添加到Azure App Gateway python [英] Add VM to Azure App Gateway python

查看:124
本文介绍了将VM添加到Azure App Gateway python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过适用于Azure的Python SDK将现有VM添加到现有App网关?

How do I add an existing VM to an existing App gateway via the Python SDK for Azure?

我查看了,并使用了也可以通过编程方式创建应用网关,但是如何将新创建的VM添加到现有网关中呢?

I've looked at this, and used it too, to create an app gateway programatically, but how do I go about adding newly created VMs to the existing gateway?

推荐答案

您可以检查注意:首先,您现有的VM应该位于应用程序网关的VNet中.

Note: Firstly, your existing VM should be in your application gateway's VNet.

如果将VM的公共IP添加到应用程序,则可以使用以下方式:

If you add your VM's public IP to application, you could use like below:

"backend_address_pools": [{
    "name": appgateway_backend_pool_name,
    "backend_addresses": [{
        "ip_address": "10.1.0.4"
    }, {
        "ip_address": "10.1.0.5"
    }]
}],

选中此

Check this example.

如果要将VM的nic添加到应用程序网关,则需要如下所示使用:

If you want to add VM's nic to application gateway, you need use like below:

"backend_address_pools": [{
    "name": appgateway_backend_pool_name,
    "backend_ip_configurations": [{
        "id": "/subscriptions/**********/resourceGroups/shuiapplication/providers/Microsoft.Network/networkInterfaces/shui361/ipConfigurations"
    }]
}],

在此链接.

这篇关于将VM添加到Azure App Gateway python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆