summary import { FirewallPolicyRuleCollectionGroup , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createFirewallPolicyRuleCollectionGroupWithIPGroups ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const firewallPolicyName = "firewallPolicy" ; const ruleCollectionGroupName = "ruleCollectionGroup1" ; const parameters = { priority : 110 , ruleCollections : [ { name : "Example-Filter-Rule-Collection" , action : { type : "Deny" } , ruleCollectionType : "FirewallPolicyFilterRuleCollection" , rules : [ { name : "network-1" , destinationIpGroups : [ "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2" ] , destinationPorts : [ "*" ] , ipProtocols : [ "TCP" ] , ruleType : "NetworkRule" , sourceIpGroups : [ "/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1" ] } ] } ] } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . firewallPolicyRuleCollectionGroups . beginCreateOrUpdateAndWait ( resourceGroupName , firewallPolicyName , ruleCollectionGroupName , parameters ) ; console . log ( result ) ; } createFirewallPolicyRuleCollectionGroupWithIPGroups ( ) . catch ( console . error ) ;