Skip to content

Commit

Permalink
subscriptions-readme-sample-update (Azure#17559)
Browse files Browse the repository at this point in the history
* update

* update
  • Loading branch information
colawwj authored Sep 10, 2021
1 parent ffb22c4 commit eb24323
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions sdk/subscription/arm-subscriptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
const creds = new DefaultAzureCredential();
const client = new SubscriptionClient(creds, subscriptionId);
const testSubscriptionId = "testsubscriptionId";
client.subscriptions.listLocations(testSubscriptionId).then((result) => {
const client = new SubscriptionClient(creds);
client.subscriptions.listLocations(subscriptionId).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down Expand Up @@ -88,9 +87,8 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
clientId: "<client id for your Azure AD app>",
tenantId: "<optional tenant for your organization>"
});
const client = new Azure.ArmSubscriptions.SubscriptionClient(creds, subscriptionId);
const testSubscriptionId = "testsubscriptionId";
client.subscriptions.listLocations(testSubscriptionId).then((result) => {
const client = new Azure.ArmSubscriptions.SubscriptionClient(creds);
client.subscriptions.listLocations(subscriptionId).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion sdk/subscription/arm-subscriptions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@azure/arm-subscriptions",
"author": "Microsoft Corporation",
"description": "SubscriptionClient Library with typescript type definitions for node.js and browser.",
"version": "3.1.1",
"version": "3.1.2",
"dependencies": {
"@azure/ms-rest-azure-js": "^2.1.0",
"@azure/ms-rest-js": "^2.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TokenCredential } from "@azure/core-auth";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-subscriptions";
const packageVersion = "3.1.1";
const packageVersion = "3.1.2";

export class SubscriptionClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials | TokenCredential;
Expand Down

0 comments on commit eb24323

Please sign in to comment.