Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to create NSG Rules in Microsoft Azure using their API, does anyone know if this is fine to create a Rule?
NetworkSecurityGroup.Update update = networkSecurityGroup.update(); update.defineRule(name) .allowInbound() .fromAddresses("") .fromPortRanges() .toAddresses("") .toPortRanges("") .withProtocol(SecurityRuleProtocol.UDP) .withPriority(ruleRepresentation.getPriority()) .attach();
Hello @Sara , Thank you for reaching out and apologies for delayed response here.
Have you considered about using management API in this case? You can perform the API call via code to create or update NSG and NSG rules.
Regarding Azure Java SDK have you explored the SecurityRulesClient Interface?