summary import { InboundSecurityRule , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createNetworkVirtualApplianceInboundSecurityRules ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const networkVirtualApplianceName = "nva" ; const ruleCollectionName = "rule1" ; const parameters = { rules : [ { destinationPortRange : 22 , sourceAddressPrefix : "50.20.121.5/32" , protocol : "TCP" } ] } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . inboundSecurityRuleOperations . beginCreateOrUpdateAndWait ( resourceGroupName , networkVirtualApplianceName , ruleCollectionName , parameters ) ; console . log ( result ) ; } createNetworkVirtualApplianceInboundSecurityRules ( ) . catch ( console . error ) ;