Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR @azure/arm-subscriptions] Nasingla/stableversion #8650

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
2 changes: 1 addition & 1 deletion sdk/subscription/arm-subscriptions/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 10 additions & 8 deletions sdk/subscription/arm-subscriptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-subscriptions

### How to use

#### nodejs - Authentication, client creation and listLocations subscriptions as an example written in TypeScript.
#### nodejs - Authentication, client creation and get subscriptionOperation as an example written in TypeScript.

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

Expand All @@ -31,10 +31,12 @@ 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 { SubscriptionClient, SubscriptionModels, SubscriptionMappers } from "@azure/arm-subscriptions";

const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new SubscriptionClient(creds);
client.subscriptions.list().then((result) => {
const client = new SubscriptionClient(creds, subscriptionId);
const operationId = "testoperationId";
client.subscriptionOperation.get(operationId).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 listLocations subscriptions as an example written in JavaScript.
#### browser - Authentication, client creation and get subscriptionOperation as an example written in JavaScript.

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

Expand Down Expand Up @@ -77,8 +79,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
authManager.login();
}
const client = new Azure.ArmSubscriptions.SubscriptionClient(res.creds, subscriptionId);
const subscriptionId = "testsubscriptionId";
client.subscriptions.listLocations(subscriptionId).then((result) => {
const operationId = "testoperationId";
client.subscriptionOperation.get(operationId).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -96,4 +98,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [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%2Fsdk%2Fsubscription%2Farm-subscriptions%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/subscription/arm-subscriptions/README.png)
Loading