Skip to content

Commit 7a66602

Browse files
authored
Generated from 1f26996e492bf786c2acd06e0a4e46159c52df70 (#482)
Adds storage account quick failover API
1 parent 76a07bc commit 7a66602

File tree

13 files changed

+250
-334
lines changed

13 files changed

+250
-334
lines changed
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
The MIT License (MIT)
2-
3-
Copyright (c) 2018 Microsoft
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
# Azure StorageManagementClient SDK for JavaScript
2-
This package contains an isomorphic SDK for StorageManagementClient.
3-
4-
## Currently supported environments
5-
- Node.js version 6.x.x or higher
6-
- Browser JavaScript
7-
8-
## How to Install
9-
```
10-
npm install @azure/arm-storage
11-
```
12-
13-
14-
## How to use
15-
16-
### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
17-
18-
```ts
19-
import * as msRest from "ms-rest-js";
20-
import * as msRestAzure from "ms-rest-azure-js";
21-
import * as msRestNodeAuth from "ms-rest-nodeauth";
22-
import { StorageManagementClient, StorageManagementModels, StorageManagementMappers } from "@azure/arm-storage";
23-
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
24-
25-
msRestNodeAuth.interactiveLogin().then((creds) => {
26-
const client = new StorageManagementClient(creds, subscriptionId);
27-
client.operations.list().then((result) => {
28-
console.log("The result is:");
29-
console.log(result);
30-
});
31-
}).catch((err) => {
32-
console.error(err);
33-
});
34-
```
35-
36-
### browser - Authentication, client creation and list operations as an example written in JavaScript.
37-
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
38-
39-
- index.html
40-
```html
41-
<!DOCTYPE html>
42-
<html lang="en">
43-
<head>
44-
<title>@azure/arm-storage sample</title>
45-
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
46-
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
47-
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
48-
<script src="node_modules/@azure/arm-storage/dist/arm-storage.js"></script>
49-
<script>
50-
const subscriptionId = "<Subscription_Id>";
51-
const authManager = new msAuth.AuthManager({
52-
clientId: "<client id for your Azure AD app>",
53-
tenant: "<optional tenant for your organization>"
54-
});
55-
authManager.finalizeLogin().then((res) => {
56-
if (!res.isLoggedIn) {
57-
// may cause redirects
58-
authManager.login();
59-
}
60-
const client = new Azure.ArmStorage.StorageManagementClient(res.creds, subscriptionId);
61-
client.operations.list().then((result) => {
62-
console.log("The result is:");
63-
console.log(result);
64-
}).catch((err) => {
65-
console.log("An error occurred:");
66-
console.error(err);
67-
});
68-
});
69-
</script>
70-
</head>
71-
<body>
72-
</body>
73-
</html>
74-
```
75-
76-
# Related projects
77-
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
1+
# Azure StorageManagementClient SDK for JavaScript
2+
This package contains an isomorphic SDK for StorageManagementClient.
3+
4+
## Currently supported environments
5+
- Node.js version 6.x.x or higher
6+
- Browser JavaScript
7+
8+
## How to Install
9+
```
10+
npm install @azure/arm-storage
11+
```
12+
13+
14+
## How to use
15+
16+
### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
17+
18+
```ts
19+
import * as msRest from "ms-rest-js";
20+
import * as msRestAzure from "ms-rest-azure-js";
21+
import * as msRestNodeAuth from "ms-rest-nodeauth";
22+
import { StorageManagementClient, StorageManagementModels, StorageManagementMappers } from "@azure/arm-storage";
23+
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
24+
25+
msRestNodeAuth.interactiveLogin().then((creds) => {
26+
const client = new StorageManagementClient(creds, subscriptionId);
27+
client.operations.list().then((result) => {
28+
console.log("The result is:");
29+
console.log(result);
30+
});
31+
}).catch((err) => {
32+
console.error(err);
33+
});
34+
```
35+
36+
### browser - Authentication, client creation and list operations as an example written in JavaScript.
37+
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
38+
39+
- index.html
40+
```html
41+
<!DOCTYPE html>
42+
<html lang="en">
43+
<head>
44+
<title>@azure/arm-storage sample</title>
45+
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
46+
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
47+
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
48+
<script src="node_modules/@azure/arm-storage/dist/arm-storage.js"></script>
49+
<script>
50+
const subscriptionId = "<Subscription_Id>";
51+
const authManager = new msAuth.AuthManager({
52+
clientId: "<client id for your Azure AD app>",
53+
tenant: "<optional tenant for your organization>"
54+
});
55+
authManager.finalizeLogin().then((res) => {
56+
if (!res.isLoggedIn) {
57+
// may cause redirects
58+
authManager.login();
59+
}
60+
const client = new Azure.ArmStorage.StorageManagementClient(res.creds, subscriptionId);
61+
client.operations.list().then((result) => {
62+
console.log("The result is:");
63+
console.log(result);
64+
}).catch((err) => {
65+
console.log("An error occurred:");
66+
console.error(err);
67+
});
68+
});
69+
</script>
70+
</head>
71+
<body>
72+
</body>
73+
</html>
74+
```
75+
76+
# Related projects
77+
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

0 commit comments

Comments
 (0)