Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions packages/@azure/arm-cdn/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Azure CdnManagementClient SDK for JavaScript
## Azure PeeringManagementClient SDK for JavaScript

This package contains an isomorphic SDK for CdnManagementClient.
This package contains an isomorphic SDK for PeeringManagementClient.

### Currently supported environments

Expand All @@ -15,7 +15,7 @@ npm install @azure/arm-cdn

### How to use

#### nodejs - Authentication, client creation and list profiles as an example written in TypeScript.
#### nodejs - Authentication, client creation and list legacyPeerings as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -29,12 +29,14 @@ npm install @azure/ms-rest-nodeauth
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { CdnManagementClient, CdnManagementModels, CdnManagementMappers } from "@azure/arm-cdn";
import { PeeringManagementClient, PeeringManagementModels, PeeringManagementMappers } from "@azure/arm-cdn";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new CdnManagementClient(creds, subscriptionId);
client.profiles.list().then((result) => {
const client = new PeeringManagementClient(creds, subscriptionId);
const peeringLocation = "testpeeringLocation";
const kind = "Direct";
client.legacyPeerings.list(peeringLocation, kind).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -43,7 +45,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and list profiles as an example written in JavaScript.
#### browser - Authentication, client creation and list legacyPeerings as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

Expand Down Expand Up @@ -76,8 +78,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
// may cause redirects
authManager.login();
}
const client = new Azure.ArmCdn.CdnManagementClient(res.creds, subscriptionId);
client.profiles.list().then((result) => {
const client = new Azure.ArmCdn.PeeringManagementClient(res.creds, subscriptionId);
const peeringLocation = "testpeeringLocation";
const kind = "Direct";
client.legacyPeerings.list(peeringLocation, kind).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -94,6 +98,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fpackages%2F%40azure%2Farm-cdn%2FREADME.png)
Loading