@azure/arm-storage-profile-2020-09-01-hybrid 2.0.1-alpha.20221128.1 → 2.1.1-alpha.20221223.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/index.js +266 -53
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.d.ts +2 -0
  7. package/dist-esm/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.d.ts.map +1 -0
  8. package/dist-esm/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.js +60 -0
  9. package/dist-esm/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.js.map +1 -0
  10. package/dist-esm/samples-dev/blobInventoryPoliciesDeleteSample.d.ts +2 -0
  11. package/dist-esm/samples-dev/blobInventoryPoliciesDeleteSample.d.ts.map +1 -0
  12. package/dist-esm/samples-dev/blobInventoryPoliciesDeleteSample.js +39 -0
  13. package/dist-esm/samples-dev/blobInventoryPoliciesDeleteSample.js.map +1 -0
  14. package/dist-esm/samples-dev/blobInventoryPoliciesGetSample.d.ts +2 -0
  15. package/dist-esm/samples-dev/blobInventoryPoliciesGetSample.d.ts.map +1 -0
  16. package/dist-esm/samples-dev/blobInventoryPoliciesGetSample.js +39 -0
  17. package/dist-esm/samples-dev/blobInventoryPoliciesGetSample.js.map +1 -0
  18. package/dist-esm/samples-dev/blobInventoryPoliciesListSample.d.ts +2 -0
  19. package/dist-esm/samples-dev/blobInventoryPoliciesListSample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/blobInventoryPoliciesListSample.js +52 -0
  21. package/dist-esm/samples-dev/blobInventoryPoliciesListSample.js.map +1 -0
  22. package/dist-esm/samples-dev/encryptionScopesGetSample.d.ts +2 -0
  23. package/dist-esm/samples-dev/encryptionScopesGetSample.d.ts.map +1 -0
  24. package/dist-esm/samples-dev/encryptionScopesGetSample.js +39 -0
  25. package/dist-esm/samples-dev/encryptionScopesGetSample.js.map +1 -0
  26. package/dist-esm/samples-dev/encryptionScopesListSample.d.ts +2 -0
  27. package/dist-esm/samples-dev/encryptionScopesListSample.d.ts.map +1 -0
  28. package/dist-esm/samples-dev/encryptionScopesListSample.js +52 -0
  29. package/dist-esm/samples-dev/encryptionScopesListSample.js.map +1 -0
  30. package/dist-esm/samples-dev/encryptionScopesPatchSample.d.ts +2 -0
  31. package/dist-esm/samples-dev/encryptionScopesPatchSample.d.ts.map +1 -0
  32. package/dist-esm/samples-dev/encryptionScopesPatchSample.js +45 -0
  33. package/dist-esm/samples-dev/encryptionScopesPatchSample.js.map +1 -0
  34. package/dist-esm/samples-dev/encryptionScopesPutSample.d.ts +2 -0
  35. package/dist-esm/samples-dev/encryptionScopesPutSample.d.ts.map +1 -0
  36. package/dist-esm/samples-dev/encryptionScopesPutSample.js +40 -0
  37. package/dist-esm/samples-dev/encryptionScopesPutSample.js.map +1 -0
  38. package/dist-esm/samples-dev/managementPoliciesCreateOrUpdateSample.d.ts +2 -0
  39. package/dist-esm/samples-dev/managementPoliciesCreateOrUpdateSample.d.ts.map +1 -0
  40. package/dist-esm/samples-dev/managementPoliciesCreateOrUpdateSample.js +225 -0
  41. package/dist-esm/samples-dev/managementPoliciesCreateOrUpdateSample.js.map +1 -0
  42. package/dist-esm/samples-dev/managementPoliciesDeleteSample.d.ts +2 -0
  43. package/dist-esm/samples-dev/managementPoliciesDeleteSample.d.ts.map +1 -0
  44. package/dist-esm/samples-dev/managementPoliciesDeleteSample.js +39 -0
  45. package/dist-esm/samples-dev/managementPoliciesDeleteSample.js.map +1 -0
  46. package/dist-esm/samples-dev/managementPoliciesGetSample.d.ts +2 -0
  47. package/dist-esm/samples-dev/managementPoliciesGetSample.d.ts.map +1 -0
  48. package/dist-esm/samples-dev/managementPoliciesGetSample.js +39 -0
  49. package/dist-esm/samples-dev/managementPoliciesGetSample.js.map +1 -0
  50. package/dist-esm/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.d.ts +2 -0
  51. package/dist-esm/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.d.ts.map +1 -0
  52. package/dist-esm/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.js +152 -0
  53. package/dist-esm/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.js.map +1 -0
  54. package/dist-esm/samples-dev/objectReplicationPoliciesDeleteSample.d.ts +2 -0
  55. package/dist-esm/samples-dev/objectReplicationPoliciesDeleteSample.d.ts.map +1 -0
  56. package/dist-esm/samples-dev/objectReplicationPoliciesDeleteSample.js +39 -0
  57. package/dist-esm/samples-dev/objectReplicationPoliciesDeleteSample.js.map +1 -0
  58. package/dist-esm/samples-dev/objectReplicationPoliciesGetSample.d.ts +2 -0
  59. package/dist-esm/samples-dev/objectReplicationPoliciesGetSample.d.ts.map +1 -0
  60. package/dist-esm/samples-dev/objectReplicationPoliciesGetSample.js +39 -0
  61. package/dist-esm/samples-dev/objectReplicationPoliciesGetSample.js.map +1 -0
  62. package/dist-esm/samples-dev/objectReplicationPoliciesListSample.d.ts +2 -0
  63. package/dist-esm/samples-dev/objectReplicationPoliciesListSample.d.ts.map +1 -0
  64. package/dist-esm/samples-dev/objectReplicationPoliciesListSample.js +52 -0
  65. package/dist-esm/samples-dev/objectReplicationPoliciesListSample.js.map +1 -0
  66. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  67. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  68. package/dist-esm/samples-dev/operationsListSample.js +51 -0
  69. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  70. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  71. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  72. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +39 -0
  73. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  74. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  75. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  76. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +39 -0
  77. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  78. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
  79. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
  80. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +52 -0
  81. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
  82. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.d.ts +2 -0
  83. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.d.ts.map +1 -0
  84. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +45 -0
  85. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -0
  86. package/dist-esm/samples-dev/privateLinkResourcesListByStorageAccountSample.d.ts +2 -0
  87. package/dist-esm/samples-dev/privateLinkResourcesListByStorageAccountSample.d.ts.map +1 -0
  88. package/dist-esm/samples-dev/privateLinkResourcesListByStorageAccountSample.js +38 -0
  89. package/dist-esm/samples-dev/privateLinkResourcesListByStorageAccountSample.js.map +1 -0
  90. package/dist-esm/samples-dev/skusListSample.d.ts +2 -0
  91. package/dist-esm/samples-dev/skusListSample.d.ts.map +1 -0
  92. package/dist-esm/samples-dev/skusListSample.js +50 -0
  93. package/dist-esm/samples-dev/skusListSample.js.map +1 -0
  94. package/dist-esm/samples-dev/storageAccountsCheckNameAvailabilitySample.d.ts +2 -0
  95. package/dist-esm/samples-dev/storageAccountsCheckNameAvailabilitySample.d.ts.map +1 -0
  96. package/dist-esm/samples-dev/storageAccountsCheckNameAvailabilitySample.js +40 -0
  97. package/dist-esm/samples-dev/storageAccountsCheckNameAvailabilitySample.js.map +1 -0
  98. package/dist-esm/samples-dev/storageAccountsCreateSample.d.ts +2 -0
  99. package/dist-esm/samples-dev/storageAccountsCreateSample.d.ts.map +1 -0
  100. package/dist-esm/samples-dev/storageAccountsCreateSample.js +61 -0
  101. package/dist-esm/samples-dev/storageAccountsCreateSample.js.map +1 -0
  102. package/dist-esm/samples-dev/storageAccountsDeleteSample.d.ts +2 -0
  103. package/dist-esm/samples-dev/storageAccountsDeleteSample.d.ts.map +1 -0
  104. package/dist-esm/samples-dev/storageAccountsDeleteSample.js +38 -0
  105. package/dist-esm/samples-dev/storageAccountsDeleteSample.js.map +1 -0
  106. package/dist-esm/samples-dev/storageAccountsFailoverSample.d.ts +2 -0
  107. package/dist-esm/samples-dev/storageAccountsFailoverSample.d.ts.map +1 -0
  108. package/dist-esm/samples-dev/storageAccountsFailoverSample.js +38 -0
  109. package/dist-esm/samples-dev/storageAccountsFailoverSample.js.map +1 -0
  110. package/dist-esm/samples-dev/storageAccountsGetPropertiesSample.d.ts +2 -0
  111. package/dist-esm/samples-dev/storageAccountsGetPropertiesSample.d.ts.map +1 -0
  112. package/dist-esm/samples-dev/storageAccountsGetPropertiesSample.js +56 -0
  113. package/dist-esm/samples-dev/storageAccountsGetPropertiesSample.js.map +1 -0
  114. package/dist-esm/samples-dev/storageAccountsListAccountSasSample.d.ts +2 -0
  115. package/dist-esm/samples-dev/storageAccountsListAccountSasSample.d.ts.map +1 -0
  116. package/dist-esm/samples-dev/storageAccountsListAccountSasSample.js +47 -0
  117. package/dist-esm/samples-dev/storageAccountsListAccountSasSample.js.map +1 -0
  118. package/dist-esm/samples-dev/storageAccountsListByResourceGroupSample.d.ts +2 -0
  119. package/dist-esm/samples-dev/storageAccountsListByResourceGroupSample.d.ts.map +1 -0
  120. package/dist-esm/samples-dev/storageAccountsListByResourceGroupSample.js +51 -0
  121. package/dist-esm/samples-dev/storageAccountsListByResourceGroupSample.js.map +1 -0
  122. package/dist-esm/samples-dev/storageAccountsListKeysSample.d.ts +2 -0
  123. package/dist-esm/samples-dev/storageAccountsListKeysSample.d.ts.map +1 -0
  124. package/dist-esm/samples-dev/storageAccountsListKeysSample.js +38 -0
  125. package/dist-esm/samples-dev/storageAccountsListKeysSample.js.map +1 -0
  126. package/dist-esm/samples-dev/storageAccountsListSample.d.ts +2 -0
  127. package/dist-esm/samples-dev/storageAccountsListSample.d.ts.map +1 -0
  128. package/dist-esm/samples-dev/storageAccountsListSample.js +50 -0
  129. package/dist-esm/samples-dev/storageAccountsListSample.js.map +1 -0
  130. package/dist-esm/samples-dev/storageAccountsListServiceSasSample.d.ts +2 -0
  131. package/dist-esm/samples-dev/storageAccountsListServiceSasSample.d.ts.map +1 -0
  132. package/dist-esm/samples-dev/storageAccountsListServiceSasSample.js +44 -0
  133. package/dist-esm/samples-dev/storageAccountsListServiceSasSample.js.map +1 -0
  134. package/dist-esm/samples-dev/storageAccountsRegenerateKeySample.d.ts +2 -0
  135. package/dist-esm/samples-dev/storageAccountsRegenerateKeySample.d.ts.map +1 -0
  136. package/dist-esm/samples-dev/storageAccountsRegenerateKeySample.js +62 -0
  137. package/dist-esm/samples-dev/storageAccountsRegenerateKeySample.js.map +1 -0
  138. package/dist-esm/samples-dev/storageAccountsRestoreBlobRangesSample.d.ts +2 -0
  139. package/dist-esm/samples-dev/storageAccountsRestoreBlobRangesSample.d.ts.map +1 -0
  140. package/dist-esm/samples-dev/storageAccountsRestoreBlobRangesSample.js +45 -0
  141. package/dist-esm/samples-dev/storageAccountsRestoreBlobRangesSample.js.map +1 -0
  142. package/dist-esm/samples-dev/storageAccountsRevokeUserDelegationKeysSample.d.ts +2 -0
  143. package/dist-esm/samples-dev/storageAccountsRevokeUserDelegationKeysSample.d.ts.map +1 -0
  144. package/dist-esm/samples-dev/storageAccountsRevokeUserDelegationKeysSample.js +38 -0
  145. package/dist-esm/samples-dev/storageAccountsRevokeUserDelegationKeysSample.js.map +1 -0
  146. package/dist-esm/samples-dev/storageAccountsUpdateSample.d.ts +2 -0
  147. package/dist-esm/samples-dev/storageAccountsUpdateSample.d.ts.map +1 -0
  148. package/dist-esm/samples-dev/storageAccountsUpdateSample.js +119 -0
  149. package/dist-esm/samples-dev/storageAccountsUpdateSample.js.map +1 -0
  150. package/dist-esm/samples-dev/usagesListByLocationSample.d.ts +2 -0
  151. package/dist-esm/samples-dev/usagesListByLocationSample.d.ts.map +1 -0
  152. package/dist-esm/samples-dev/usagesListByLocationSample.js +51 -0
  153. package/dist-esm/samples-dev/usagesListByLocationSample.js.map +1 -0
  154. package/dist-esm/src/index.d.ts +1 -0
  155. package/dist-esm/src/index.d.ts.map +1 -1
  156. package/dist-esm/src/index.js +1 -0
  157. package/dist-esm/src/index.js.map +1 -1
  158. package/dist-esm/src/models/index.d.ts +93 -16
  159. package/dist-esm/src/models/index.d.ts.map +1 -1
  160. package/dist-esm/src/models/index.js +77 -0
  161. package/dist-esm/src/models/index.js.map +1 -1
  162. package/dist-esm/src/operations/blobInventoryPolicies.d.ts.map +1 -1
  163. package/dist-esm/src/operations/blobInventoryPolicies.js +8 -4
  164. package/dist-esm/src/operations/blobInventoryPolicies.js.map +1 -1
  165. package/dist-esm/src/operations/encryptionScopes.d.ts.map +1 -1
  166. package/dist-esm/src/operations/encryptionScopes.js +19 -8
  167. package/dist-esm/src/operations/encryptionScopes.js.map +1 -1
  168. package/dist-esm/src/operations/objectReplicationPoliciesOperations.d.ts.map +1 -1
  169. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js +8 -4
  170. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js.map +1 -1
  171. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  172. package/dist-esm/src/operations/operations.js +8 -4
  173. package/dist-esm/src/operations/operations.js.map +1 -1
  174. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  175. package/dist-esm/src/operations/privateEndpointConnections.js +8 -4
  176. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  177. package/dist-esm/src/operations/skus.d.ts.map +1 -1
  178. package/dist-esm/src/operations/skus.js +8 -4
  179. package/dist-esm/src/operations/skus.js.map +1 -1
  180. package/dist-esm/src/operations/storageAccounts.d.ts.map +1 -1
  181. package/dist-esm/src/operations/storageAccounts.js +36 -15
  182. package/dist-esm/src/operations/storageAccounts.js.map +1 -1
  183. package/dist-esm/src/operations/usages.d.ts.map +1 -1
  184. package/dist-esm/src/operations/usages.js +8 -4
  185. package/dist-esm/src/operations/usages.js.map +1 -1
  186. package/dist-esm/src/pagingHelper.d.ts +13 -0
  187. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  188. package/dist-esm/src/pagingHelper.js +32 -0
  189. package/dist-esm/src/pagingHelper.js.map +1 -0
  190. package/dist-esm/src/storageManagementClient.d.ts +2 -0
  191. package/dist-esm/src/storageManagementClient.d.ts.map +1 -1
  192. package/dist-esm/src/storageManagementClient.js +54 -5
  193. package/dist-esm/src/storageManagementClient.js.map +1 -1
  194. package/dist-esm/test/sampleTest.js +11 -13
  195. package/dist-esm/test/sampleTest.js.map +1 -1
  196. package/package.json +24 -11
  197. package/review/arm-storage-profile-2020-09-01-hybrid.api.md +48 -103
  198. package/src/index.ts +1 -0
  199. package/src/models/index.ts +93 -16
  200. package/src/operations/blobInventoryPolicies.ts +17 -7
  201. package/src/operations/encryptionScopes.ts +27 -10
  202. package/src/operations/objectReplicationPoliciesOperations.ts +15 -5
  203. package/src/operations/operations.ts +10 -5
  204. package/src/operations/privateEndpointConnections.ts +15 -5
  205. package/src/operations/skus.ts +10 -5
  206. package/src/operations/storageAccounts.ts +45 -18
  207. package/src/operations/usages.ts +10 -5
  208. package/src/pagingHelper.ts +39 -0
  209. package/src/storageManagementClient.ts +70 -5
  210. package/tsconfig.json +8 -2
  211. package/types/arm-storage-profile-2020-09-01-hybrid.d.ts +104 -16
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncValues, __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
17
+ *
18
+ * @summary Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountList.json
20
+ */
21
+ function storageAccountList() {
22
+ var e_1, _a;
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
25
+ const credential = new DefaultAzureCredential();
26
+ const client = new StorageManagementClient(credential, subscriptionId);
27
+ const resArray = new Array();
28
+ try {
29
+ for (var _b = __asyncValues(client.storageAccounts.list()), _c; _c = yield _b.next(), !_c.done;) {
30
+ let item = _c.value;
31
+ resArray.push(item);
32
+ }
33
+ }
34
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
35
+ finally {
36
+ try {
37
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
38
+ }
39
+ finally { if (e_1) throw e_1.error; }
40
+ }
41
+ console.log(resArray);
42
+ });
43
+ }
44
+ function main() {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ storageAccountList();
47
+ });
48
+ }
49
+ main().catch(console.error);
50
+ //# sourceMappingURL=storageAccountsListSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsListSample.js","sourceRoot":"","sources":["../../samples-dev/storageAccountsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,kBAAkB;;;QAC/B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAzC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,kBAAkB,EAAE,CAAC;IACvB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=storageAccountsListServiceSasSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsListServiceSasSample.d.ts","sourceRoot":"","sources":["../../samples-dev/storageAccountsListServiceSasSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to List service SAS credentials of a specific resource.
17
+ *
18
+ * @summary List service SAS credentials of a specific resource.
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountListServiceSAS.json
20
+ */
21
+ function storageAccountListServiceSas() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
24
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7439";
25
+ const accountName = "sto1299";
26
+ const parameters = {
27
+ canonicalizedResource: "/blob/sto1299/music",
28
+ sharedAccessExpiryTime: new Date("2017-05-24T11:32:48.8457197Z"),
29
+ permissions: "l",
30
+ resource: "c"
31
+ };
32
+ const credential = new DefaultAzureCredential();
33
+ const client = new StorageManagementClient(credential, subscriptionId);
34
+ const result = yield client.storageAccounts.listServiceSAS(resourceGroupName, accountName, parameters);
35
+ console.log(result);
36
+ });
37
+ }
38
+ function main() {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ storageAccountListServiceSas();
41
+ });
42
+ }
43
+ main().catch(console.error);
44
+ //# sourceMappingURL=storageAccountsListServiceSasSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsListServiceSasSample.js","sourceRoot":"","sources":["../../samples-dev/storageAccountsListServiceSasSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,4BAA4B;;QACzC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;QAC7E,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAAyB;YACvC,qBAAqB,EAAE,qBAAqB;YAC5C,sBAAsB,EAAE,IAAI,IAAI,CAAC,8BAA8B,CAAC;YAChE,WAAW,EAAE,GAAG;YAChB,QAAQ,EAAE,GAAG;SACd,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,cAAc,CACxD,iBAAiB,EACjB,WAAW,EACX,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,4BAA4B,EAAE,CAAC;IACjC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=storageAccountsRegenerateKeySample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsRegenerateKeySample.d.ts","sourceRoot":"","sources":["../../samples-dev/storageAccountsRegenerateKeySample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account.
17
+ *
18
+ * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account.
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountRegenerateKerbKey.json
20
+ */
21
+ function storageAccountRegenerateKerbKey() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
24
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4167";
25
+ const accountName = "sto3539";
26
+ const regenerateKey = {
27
+ keyName: "kerb1"
28
+ };
29
+ const credential = new DefaultAzureCredential();
30
+ const client = new StorageManagementClient(credential, subscriptionId);
31
+ const result = yield client.storageAccounts.regenerateKey(resourceGroupName, accountName, regenerateKey);
32
+ console.log(result);
33
+ });
34
+ }
35
+ /**
36
+ * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account.
37
+ *
38
+ * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account.
39
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountRegenerateKey.json
40
+ */
41
+ function storageAccountRegenerateKey() {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
44
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4167";
45
+ const accountName = "sto3539";
46
+ const regenerateKey = {
47
+ keyName: "key2"
48
+ };
49
+ const credential = new DefaultAzureCredential();
50
+ const client = new StorageManagementClient(credential, subscriptionId);
51
+ const result = yield client.storageAccounts.regenerateKey(resourceGroupName, accountName, regenerateKey);
52
+ console.log(result);
53
+ });
54
+ }
55
+ function main() {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ storageAccountRegenerateKerbKey();
58
+ storageAccountRegenerateKey();
59
+ });
60
+ }
61
+ main().catch(console.error);
62
+ //# sourceMappingURL=storageAccountsRegenerateKeySample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsRegenerateKeySample.js","sourceRoot":"","sources":["../../samples-dev/storageAccountsRegenerateKeySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,+BAA+B;;QAC5C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;QAC7E,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAA0C;YAC3D,OAAO,EAAE,OAAO;SACjB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,aAAa,CACvD,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED;;;;;GAKG;AACH,SAAe,2BAA2B;;QACxC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;QAC7E,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAA0C;YAC3D,OAAO,EAAE,MAAM;SAChB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,aAAa,CACvD,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,+BAA+B,EAAE,CAAC;QAClC,2BAA2B,EAAE,CAAC;IAChC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=storageAccountsRestoreBlobRangesSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsRestoreBlobRangesSample.d.ts","sourceRoot":"","sources":["../../samples-dev/storageAccountsRestoreBlobRangesSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Restore blobs in the specified blob ranges
17
+ *
18
+ * @summary Restore blobs in the specified blob ranges
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/BlobRangesRestore.json
20
+ */
21
+ function blobRangesRestore() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
24
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101";
25
+ const accountName = "sto4445";
26
+ const parameters = {
27
+ blobRanges: [
28
+ { endRange: "container/blobpath2", startRange: "container/blobpath1" },
29
+ { endRange: "", startRange: "container2/blobpath3" }
30
+ ],
31
+ timeToRestore: new Date("2019-04-20T15:30:00.0000000Z")
32
+ };
33
+ const credential = new DefaultAzureCredential();
34
+ const client = new StorageManagementClient(credential, subscriptionId);
35
+ const result = yield client.storageAccounts.beginRestoreBlobRangesAndWait(resourceGroupName, accountName, parameters);
36
+ console.log(result);
37
+ });
38
+ }
39
+ function main() {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ blobRangesRestore();
42
+ });
43
+ }
44
+ main().catch(console.error);
45
+ //# sourceMappingURL=storageAccountsRestoreBlobRangesSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsRestoreBlobRangesSample.js","sourceRoot":"","sources":["../../samples-dev/storageAccountsRestoreBlobRangesSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;QAC7E,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAA0B;YACxC,UAAU,EAAE;gBACV,EAAE,QAAQ,EAAE,qBAAqB,EAAE,UAAU,EAAE,qBAAqB,EAAE;gBACtE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;aACrD;YACD,aAAa,EAAE,IAAI,IAAI,CAAC,8BAA8B,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,6BAA6B,CACvE,iBAAiB,EACjB,WAAW,EACX,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=storageAccountsRevokeUserDelegationKeysSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsRevokeUserDelegationKeysSample.d.ts","sourceRoot":"","sources":["../../samples-dev/storageAccountsRevokeUserDelegationKeysSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Revoke user delegation keys.
17
+ *
18
+ * @summary Revoke user delegation keys.
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountRevokeUserDelegationKeys.json
20
+ */
21
+ function storageAccountRevokeUserDelegationKeys() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
24
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4167";
25
+ const accountName = "sto3539";
26
+ const credential = new DefaultAzureCredential();
27
+ const client = new StorageManagementClient(credential, subscriptionId);
28
+ const result = yield client.storageAccounts.revokeUserDelegationKeys(resourceGroupName, accountName);
29
+ console.log(result);
30
+ });
31
+ }
32
+ function main() {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ storageAccountRevokeUserDelegationKeys();
35
+ });
36
+ }
37
+ main().catch(console.error);
38
+ //# sourceMappingURL=storageAccountsRevokeUserDelegationKeysSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsRevokeUserDelegationKeysSample.js","sourceRoot":"","sources":["../../samples-dev/storageAccountsRevokeUserDelegationKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,sCAAsC;;QACnD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;QAC7E,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,wBAAwB,CAClE,iBAAiB,EACjB,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,sCAAsC,EAAE,CAAC;IAC3C,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=storageAccountsUpdateSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/storageAccountsUpdateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,119 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
17
+ *
18
+ * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountEnableAD.json
20
+ */
21
+ function storageAccountEnableAd() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
24
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407";
25
+ const accountName = "sto8596";
26
+ const parameters = {
27
+ azureFilesIdentityBasedAuthentication: {
28
+ activeDirectoryProperties: {
29
+ azureStorageSid: "S-1-5-21-2400535526-2334094090-2402026252-0012",
30
+ domainGuid: "aebfc118-9fa9-4732-a21f-d98e41a77ae1",
31
+ domainName: "adtest.com",
32
+ domainSid: "S-1-5-21-2400535526-2334094090-2402026252",
33
+ forestName: "adtest.com",
34
+ netBiosDomainName: "adtest.com"
35
+ },
36
+ directoryServiceOptions: "AD"
37
+ }
38
+ };
39
+ const credential = new DefaultAzureCredential();
40
+ const client = new StorageManagementClient(credential, subscriptionId);
41
+ const result = yield client.storageAccounts.update(resourceGroupName, accountName, parameters);
42
+ console.log(result);
43
+ });
44
+ }
45
+ /**
46
+ * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
47
+ *
48
+ * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
49
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountEnableCMK.json
50
+ */
51
+ function storageAccountEnableCmk() {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
54
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407";
55
+ const accountName = "sto8596";
56
+ const parameters = {
57
+ encryption: {
58
+ keySource: "Microsoft.Keyvault",
59
+ keyVaultProperties: {
60
+ keyName: "wrappingKey",
61
+ keyVaultUri: "https://myvault8569.vault.azure.net",
62
+ keyVersion: ""
63
+ },
64
+ services: {
65
+ blob: { enabled: true, keyType: "Account" },
66
+ file: { enabled: true, keyType: "Account" }
67
+ }
68
+ }
69
+ };
70
+ const credential = new DefaultAzureCredential();
71
+ const client = new StorageManagementClient(credential, subscriptionId);
72
+ const result = yield client.storageAccounts.update(resourceGroupName, accountName, parameters);
73
+ console.log(result);
74
+ });
75
+ }
76
+ /**
77
+ * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
78
+ *
79
+ * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
80
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountUpdate.json
81
+ */
82
+ function storageAccountUpdate() {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
85
+ const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407";
86
+ const accountName = "sto8596";
87
+ const parameters = {
88
+ allowBlobPublicAccess: false,
89
+ allowSharedKeyAccess: true,
90
+ encryption: {
91
+ keySource: "Microsoft.Storage",
92
+ services: {
93
+ blob: { enabled: true, keyType: "Account" },
94
+ file: { enabled: true, keyType: "Account" }
95
+ }
96
+ },
97
+ minimumTlsVersion: "TLS1_2",
98
+ networkRuleSet: { defaultAction: "Allow" },
99
+ routingPreference: {
100
+ publishInternetEndpoints: true,
101
+ publishMicrosoftEndpoints: true,
102
+ routingChoice: "MicrosoftRouting"
103
+ }
104
+ };
105
+ const credential = new DefaultAzureCredential();
106
+ const client = new StorageManagementClient(credential, subscriptionId);
107
+ const result = yield client.storageAccounts.update(resourceGroupName, accountName, parameters);
108
+ console.log(result);
109
+ });
110
+ }
111
+ function main() {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ storageAccountEnableAd();
114
+ storageAccountEnableCmk();
115
+ storageAccountUpdate();
116
+ });
117
+ }
118
+ main().catch(console.error);
119
+ //# sourceMappingURL=storageAccountsUpdateSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageAccountsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/storageAccountsUpdateSample.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=usagesListByLocationSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usagesListByLocationSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usagesListByLocationSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncValues, __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { StorageManagementClient } from "@azure/arm-storage-profile-2020-09-01-hybrid";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Gets the current usage count and the limit for the resources of the location under the subscription.
17
+ *
18
+ * @summary Gets the current usage count and the limit for the resources of the location under the subscription.
19
+ * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/StorageAccountListLocationUsage.json
20
+ */
21
+ function usageList() {
22
+ var e_1, _a;
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
25
+ const location = "eastus2(stage)";
26
+ const credential = new DefaultAzureCredential();
27
+ const client = new StorageManagementClient(credential, subscriptionId);
28
+ const resArray = new Array();
29
+ try {
30
+ for (var _b = __asyncValues(client.usages.listByLocation(location)), _c; _c = yield _b.next(), !_c.done;) {
31
+ let item = _c.value;
32
+ resArray.push(item);
33
+ }
34
+ }
35
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
36
+ finally {
37
+ try {
38
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
39
+ }
40
+ finally { if (e_1) throw e_1.error; }
41
+ }
42
+ console.log(resArray);
43
+ });
44
+ }
45
+ function main() {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ usageList();
48
+ });
49
+ }
50
+ main().catch(console.error);
51
+ //# sourceMappingURL=usagesListByLocationSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usagesListByLocationSample.js","sourceRoot":"","sources":["../../samples-dev/usagesListByLocationSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,SAAS;;;QACtB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,mBAAmB,CAAC;QAChE,MAAM,QAAQ,GAAG,gBAAgB,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA,IAAA;gBAAlD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,SAAS,EAAE,CAAC;IACd,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  /// <reference lib="esnext.asynciterable" />
2
+ export { getContinuationToken } from "./pagingHelper";
2
3
  export * from "./models";
3
4
  export { StorageManagementClient } from "./storageManagementClient";
4
5
  export * from "./operationsInterfaces";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AASA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,wBAAwB,CAAC"}
@@ -6,6 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  /// <reference lib="esnext.asynciterable" />
9
+ export { getContinuationToken } from "./pagingHelper";
9
10
  export * from "./models";
10
11
  export { StorageManagementClient } from "./storageManagementClient";
11
12
  export * from "./operationsInterfaces";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,wBAAwB,CAAC"}