summary import { StaticSiteARMResource , WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createOrUpdateAStaticSite ( ) { const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" ; const resourceGroupName = "rg" ; const name = "testStaticSite0" ; const staticSiteEnvelope = { branch : "master" , buildProperties : { apiLocation : "api" , appArtifactLocation : "build" , appLocation : "app" } , location : "West US 2" , repositoryToken : "repoToken123" , repositoryUrl : "https://github.com/username/RepoName" , sku : { name : "Basic" , tier : "Basic" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const result = await client . staticSites . beginCreateOrUpdateStaticSiteAndWait ( resourceGroupName , name , staticSiteEnvelope ) ; console . log ( result ) ; } createOrUpdateAStaticSite ( ) . catch ( console . error ) ;