summary import { WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function renewAnExistingDomain ( ) { const subscriptionId = "3dddfa4f-cedf-4dc0-ba29-b6d1a69ab545" ; const resourceGroupName = "RG" ; const domainName = "example.com" ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const result = await client . domains . renew ( resourceGroupName , domainName ) ; console . log ( result ) ; } renewAnExistingDomain ( ) . catch ( console . error ) ;