@@ -15,7 +15,7 @@ npm install @azure/arm-peering
1515
1616### How to use  
1717
18- #### nodejs - Authentication,  client creation and list legacyPeerings  as an example written in TypeScript.  
18+ #### nodejs - client creation and list cdnPeeringPrefixes  as an example written in TypeScript.  
1919
2020##### Install @azure/ms-rest-nodeauth    
2121
@@ -26,18 +26,16 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"
2626
2727##### Sample code  
2828
29+ While the below sample uses the interactive login, other authentication options can be found in the [ README.md file of @azure/ms-rest-nodeauth  ] ( https://www.npmjs.com/package/@azure/ms-rest-nodeauth )  package
2930``` typescript 
30- import  *  as  msRest  from  " @azure/ms-rest-js" 
31- import  *  as  msRestAzure  from  " @azure/ms-rest-azure-js" 
32- import  *  as  msRestNodeAuth  from  " @azure/ms-rest-nodeauth" 
33- import  { PeeringManagementClient , PeeringManagementModels , PeeringManagementMappers  } from  " @azure/arm-peering" 
31+ const =  require (" @azure/ms-rest-nodeauth" 
32+ const =  require (" @azure/arm-peering" 
3433const =  process .env [" AZURE_SUBSCRIPTION_ID" 
3534
3635msRestNodeAuth .interactiveLogin ().then ((creds ) =>  {
3736  const =  new  PeeringManagementClient (creds , subscriptionId );
3837  const =  " testpeeringLocation" 
39-   const =  " Direct" 
40-   client .legacyPeerings .list (peeringLocation , kind ).then ((result ) =>  {
38+   client .cdnPeeringPrefixes .list (peeringLocation ).then ((result ) =>  {
4139    console .log (" The result is:" 
4240    console .log (result );
4341  });
@@ -46,7 +44,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
4644});
4745``` 
4846
49- #### browser - Authentication, client creation and list legacyPeerings  as an example written in JavaScript.  
47+ #### browser - Authentication, client creation and list cdnPeeringPrefixes  as an example written in JavaScript.  
5048
5149##### Install @azure/ms-rest-browserauth    
5250
@@ -81,8 +79,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
8179        } 
8280        const  client  =  new  Azure.ArmPeering.PeeringManagementClient (res .creds , subscriptionId); 
8381        const  peeringLocation  =  " testpeeringLocation"  
84-         const  kind  =  " Direct"  
85-         client .legacyPeerings .list (peeringLocation, kind).then ((result ) =>  { 
82+         client .cdnPeeringPrefixes .list (peeringLocation).then ((result ) =>  { 
8683          console .log (" The result is:"  
8784          console .log (result); 
8885        }).catch ((err ) =>  { 
@@ -100,4 +97,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
10097
10198-  [ Microsoft Azure SDK for Javascript] ( https://github.com/Azure/azure-sdk-for-js ) 
10299
103- ![ Impressions] ( https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpeering%2Farm -peering%2FREADME .png ) 
100+ ![ Impressions] ( https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/peering/arm -peering/README .png ) 
0 commit comments