summary import { AppServicePlan , WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createOrUpdateAppServicePlan ( ) { const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" ; const resourceGroupName = "testrg123" ; const name = "testsf6141" ; const appServicePlan = { kind : "app" , location : "East US" , sku : { name : "P1" , capacity : 1 , family : "P" , size : "P1" , tier : "Premium" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const result = await client . appServicePlans . beginCreateOrUpdateAndWait ( resourceGroupName , name , appServicePlan ) ; console . log ( result ) ; } createOrUpdateAppServicePlan ( ) . catch ( console . error ) ;