summary import { SecurityPartnerProvider , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createSecurityPartnerProvider ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const securityPartnerProviderName = "securityPartnerProvider" ; const parameters = { location : "West US" , securityProviderName : "ZScaler" , tags : { key1 : "value1" } , virtualHub : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . securityPartnerProviders . beginCreateOrUpdateAndWait ( resourceGroupName , securityPartnerProviderName , parameters ) ; console . log ( result ) ; } createSecurityPartnerProvider ( ) . catch ( console . error ) ;