summary import { ApplicationSecurityGroup , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createApplicationSecurityGroup ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const applicationSecurityGroupName = "test-asg" ; const parameters = { location : "westus" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . applicationSecurityGroups . beginCreateOrUpdateAndWait ( resourceGroupName , applicationSecurityGroupName , parameters ) ; console . log ( result ) ; } createApplicationSecurityGroup ( ) . catch ( console . error ) ;