首页 > 解决方案 > 使用 Java 在 Azure 中创建 NSG 规则

问题描述

我正在尝试使用他们的 API 在 Microsoft Azure 中创建 NSG 规则,有谁知道这是否可以创建规则?

NetworkSecurityGroup.Update update = networkSecurityGroup.update();
update.defineRule(name)
                        .allowInbound()
                        .fromAddresses("")
                        .fromPortRanges()
                        .toAddresses("")
                        .toPortRanges("")
                        .withProtocol(SecurityRuleProtocol.UDP)
                        .withPriority(ruleRepresentation.getPriority())
                        .attach();

标签: azure

解决方案


推荐阅读