summary import { TagsObject , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function virtualHubUpdate ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualHubName = "virtualHub2" ; const virtualHubParameters = { tags : { key1 : "value1" , key2 : "value2" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualHubs . updateTags ( resourceGroupName , virtualHubName , virtualHubParameters ) ; console . log ( result ) ; } virtualHubUpdate ( ) . catch ( console . error ) ;