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