Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Resolve conflicts
  • Loading branch information
kpajdzik committed Nov 14, 2018
commit fbc82b7c93b07af2369ed871b6e8511c675360f1
80 changes: 0 additions & 80 deletions packages/@azure/arm-storage/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
## Azure StorageManagementClient SDK for JavaScript

This package contains an isomorphic SDK for StorageManagementClient.
Expand Down Expand Up @@ -95,82 +94,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)
=======
# Azure StorageManagementClient SDK for JavaScript
This package contains an isomorphic SDK for StorageManagementClient.

## Currently supported environments
- Node.js version 6.x.x or higher
- Browser JavaScript

## How to Install
```
npm install @azure/arm-storage
```


## How to use

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

```ts
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import { StorageManagementClient, StorageManagementModels, StorageManagementMappers } from "@azure/arm-storage";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new StorageManagementClient(creds, subscriptionId);
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.error(err);
});
```

### browser - Authentication, client creation and list operations as an example written in JavaScript.
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/arm-storage sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-storage/dist/arm-storage.js"></script>
<script>
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
tenant: "<optional tenant for your organization>"
});
authManager.finalizeLogin().then((res) => {
if (!res.isLoggedIn) {
// may cause redirects
authManager.login();
}
const client = new Azure.ArmStorage.StorageManagementClient(res.creds, subscriptionId);
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
console.log("An error occurred:");
console.error(err);
});
});
</script>
</head>
<body>
</body>
</html>
```

# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
>>>>>>> 7a66602e283bb61ba6f96e4585862eb8826b27f1
5 changes: 0 additions & 5 deletions packages/@azure/arm-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
"description": "StorageManagementClient Library with typescript type definitions for node.js and browser.",
"version": "0.1.0",
"dependencies": {
<<<<<<< HEAD
"@azure/ms-rest-azure-js": "^1.1.0",
"@azure/ms-rest-js": "^1.1.0",
=======
"ms-rest-azure-js": "^1.0.181",
"ms-rest-js": "^1.0.460",
>>>>>>> 7a66602e283bb61ba6f96e4585862eb8826b27f1
"tslib": "^1.9.3"
},
"keywords": [
Expand Down