简体   繁体   English

如何从Azure负载平衡器中删除入站规则

[英]How to remove Inbound rule from Azure loadbalancer

I have an Azure loadbalancer v2 created and wish to remove a rule from it. 我创建了一个Azure负载平衡器v2,并希望从中删除规则。 So, I will get a load balancer object: 因此,我将获得一个负载均衡器对象:

$loadBalancer = Get-AzureLoadBalancer -Name myLoadbalancer -ResourceGroupName myResourceGroup

Then, I will try to remove a rule: 然后,我将尝试删除一条规则:

Remove-AzureLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -Name RuleName

But, the rule stays there... Maybe I am missing something obvious? 但是,规则仍然存在...也许我遗漏了一些明显的东西? There is no examples which i can base on :( 没有可以基于的示例:(

Cmdlets with “Config” suffix only change in-memory data ($loadBalancer object in this case). 带“ Config”后缀的Cmdlet仅更改内存数据(在这种情况下为$ loadBalancer对象)。

After Remove-AzureLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -Name RuleName 在Remove-AzureLoadBalancerInboundNatRuleConfig -LoadBalancer $ loadBalancer -Name之后

Do Set-AzureLoadBalancer -LoadBalancer $loadBalancer 做Set-AzureLoadBalancer -LoadBalancer $ loadBalancer

Let me know 让我知道

As far as I understood - it is not working like this. 据我了解-它不是这样工作的。 I was able to reach this goal by using same resource manager template, which is used to provision this resource and modifying it to remove/update required rules 通过使用相同的资源管理器模板,我能够实现此目标,该模板用于配置此资源并对其进行修改以删除/更新所需的规则

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Ansible-azure 为 Azure 负载均衡器入站 NAT 规则设置目标 VM? - How to set target VM for an Azure loadbalancer inbound NAT rule with Ansible-azure? 从基础的Azure API管理入站规则继承 - Azure API Management inbound rule inheritance from base azure cli 2.0如何添加inbound-nat-rule? - azure cli 2.0 how to add inbound-nat-rule? 解决Azure入站安全规则不起作用的问题 - Troubleshoot Azure Inbound Security Rule Not Working Linux Azure VM 入站端口规则不起作用 - Linux Azure VM inbound port rule not working 在 Azure 中创建 kubernetes LoadBalancer 服务时,如何避免/控制默认安全组规则的创建? - How to avoid/control creation of default security group rule when creating kubernetes LoadBalancer service in Azure? 如何使用 Java 客户端将 PublicIpAddress 与 Azure 中的 LoadBalancer 分离? - How to dissociate PublicIpAddress from LoadBalancer in Azure using Java client? 如何在将源定义为 Azure SQL 服务器的 NSG 中定义入站安全规则 - How to define a inbound security rule in a NSG defining source as an Azure SQL Server 如何允许入站 rdp 规则仅将 azure VM 连接到我的 ip? - how to allow inbound rdp rule to connect azure VM to my ip only? 如何在Azure负载平衡器入站NAT规则上替换目标VM和NIC - How to replace target VM and NIC on Azure Load Balancer Inbound NAT Rule
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM