@azure/arm-storage 18.0.1-alpha.20221128.1 → 18.1.0-alpha.20221130.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 (192) hide show
  1. package/CHANGELOG.md +20 -10
  2. package/dist/index.js +388 -129
  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/blobContainersClearLegalHoldSample.js +1 -1
  7. package/dist-esm/samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.js +2 -2
  8. package/dist-esm/samples-dev/blobContainersCreateSample.js +3 -3
  9. package/dist-esm/samples-dev/blobContainersDeleteImmutabilityPolicySample.js +1 -1
  10. package/dist-esm/samples-dev/blobContainersDeleteSample.js +1 -1
  11. package/dist-esm/samples-dev/blobContainersExtendImmutabilityPolicySample.js +1 -1
  12. package/dist-esm/samples-dev/blobContainersGetImmutabilityPolicySample.js +1 -1
  13. package/dist-esm/samples-dev/blobContainersGetSample.js +2 -2
  14. package/dist-esm/samples-dev/blobContainersLeaseSample.js +2 -2
  15. package/dist-esm/samples-dev/blobContainersListSample.js +2 -2
  16. package/dist-esm/samples-dev/blobContainersLockImmutabilityPolicySample.js +1 -1
  17. package/dist-esm/samples-dev/blobContainersObjectLevelWormSample.js +1 -1
  18. package/dist-esm/samples-dev/blobContainersSetLegalHoldSample.js +2 -2
  19. package/dist-esm/samples-dev/blobContainersUpdateSample.js +1 -1
  20. package/dist-esm/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.js +3 -3
  21. package/dist-esm/samples-dev/blobInventoryPoliciesDeleteSample.js +1 -1
  22. package/dist-esm/samples-dev/blobInventoryPoliciesGetSample.js +1 -1
  23. package/dist-esm/samples-dev/blobInventoryPoliciesListSample.js +1 -1
  24. package/dist-esm/samples-dev/blobServicesGetServicePropertiesSample.js +1 -1
  25. package/dist-esm/samples-dev/blobServicesListSample.js +1 -1
  26. package/dist-esm/samples-dev/blobServicesSetServicePropertiesSample.js +3 -3
  27. package/dist-esm/samples-dev/deletedAccountsGetSample.js +1 -1
  28. package/dist-esm/samples-dev/deletedAccountsListSample.js +1 -1
  29. package/dist-esm/samples-dev/encryptionScopesGetSample.js +1 -1
  30. package/dist-esm/samples-dev/encryptionScopesListSample.js +1 -1
  31. package/dist-esm/samples-dev/encryptionScopesPatchSample.js +1 -1
  32. package/dist-esm/samples-dev/encryptionScopesPutSample.js +2 -2
  33. package/dist-esm/samples-dev/fileServicesGetServicePropertiesSample.js +1 -1
  34. package/dist-esm/samples-dev/fileServicesListSample.js +1 -1
  35. package/dist-esm/samples-dev/fileServicesSetServicePropertiesSample.js +3 -3
  36. package/dist-esm/samples-dev/fileSharesCreateSample.js +3 -3
  37. package/dist-esm/samples-dev/fileSharesDeleteSample.js +1 -1
  38. package/dist-esm/samples-dev/fileSharesGetSample.js +2 -2
  39. package/dist-esm/samples-dev/fileSharesLeaseSample.js +2 -2
  40. package/dist-esm/samples-dev/fileSharesListSample.js +3 -3
  41. package/dist-esm/samples-dev/fileSharesRestoreSample.js +1 -1
  42. package/dist-esm/samples-dev/fileSharesUpdateSample.js +2 -2
  43. package/dist-esm/samples-dev/localUsersCreateOrUpdateSample.js +2 -2
  44. package/dist-esm/samples-dev/localUsersDeleteSample.js +1 -1
  45. package/dist-esm/samples-dev/localUsersGetSample.js +1 -1
  46. package/dist-esm/samples-dev/localUsersListKeysSample.js +1 -1
  47. package/dist-esm/samples-dev/localUsersListSample.js +1 -1
  48. package/dist-esm/samples-dev/localUsersRegeneratePasswordSample.js +1 -1
  49. package/dist-esm/samples-dev/managementPoliciesCreateOrUpdateSample.js +99 -6
  50. package/dist-esm/samples-dev/managementPoliciesCreateOrUpdateSample.js.map +1 -1
  51. package/dist-esm/samples-dev/managementPoliciesDeleteSample.js +1 -1
  52. package/dist-esm/samples-dev/managementPoliciesGetSample.js +1 -1
  53. package/dist-esm/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.js +4 -4
  54. package/dist-esm/samples-dev/objectReplicationPoliciesDeleteSample.js +1 -1
  55. package/dist-esm/samples-dev/objectReplicationPoliciesGetSample.js +1 -1
  56. package/dist-esm/samples-dev/objectReplicationPoliciesListSample.js +1 -1
  57. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  58. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  59. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  60. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +1 -1
  61. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +1 -1
  62. package/dist-esm/samples-dev/privateLinkResourcesListByStorageAccountSample.js +1 -1
  63. package/dist-esm/samples-dev/queueCreateSample.js +2 -2
  64. package/dist-esm/samples-dev/queueDeleteSample.js +1 -1
  65. package/dist-esm/samples-dev/queueGetSample.js +1 -1
  66. package/dist-esm/samples-dev/queueListSample.js +1 -1
  67. package/dist-esm/samples-dev/queueServicesGetServicePropertiesSample.js +1 -1
  68. package/dist-esm/samples-dev/queueServicesListSample.js +1 -1
  69. package/dist-esm/samples-dev/queueServicesSetServicePropertiesSample.js +1 -1
  70. package/dist-esm/samples-dev/queueUpdateSample.js +1 -1
  71. package/dist-esm/samples-dev/skusListSample.js +1 -1
  72. package/dist-esm/samples-dev/storageAccountsAbortHierarchicalNamespaceMigrationSample.js +1 -1
  73. package/dist-esm/samples-dev/storageAccountsCheckNameAvailabilitySample.js +1 -1
  74. package/dist-esm/samples-dev/storageAccountsCreateSample.js +12 -12
  75. package/dist-esm/samples-dev/storageAccountsDeleteSample.js +1 -1
  76. package/dist-esm/samples-dev/storageAccountsFailoverSample.js +21 -3
  77. package/dist-esm/samples-dev/storageAccountsFailoverSample.js.map +1 -1
  78. package/dist-esm/samples-dev/storageAccountsGetPropertiesSample.js +4 -4
  79. package/dist-esm/samples-dev/storageAccountsHierarchicalNamespaceMigrationSample.js +1 -1
  80. package/dist-esm/samples-dev/storageAccountsListAccountSasSample.js +1 -1
  81. package/dist-esm/samples-dev/storageAccountsListByResourceGroupSample.js +1 -1
  82. package/dist-esm/samples-dev/storageAccountsListKeysSample.js +1 -1
  83. package/dist-esm/samples-dev/storageAccountsListSample.js +1 -1
  84. package/dist-esm/samples-dev/storageAccountsListServiceSasSample.js +1 -1
  85. package/dist-esm/samples-dev/storageAccountsRegenerateKeySample.js +2 -2
  86. package/dist-esm/samples-dev/storageAccountsRestoreBlobRangesSample.js +1 -1
  87. package/dist-esm/samples-dev/storageAccountsRevokeUserDelegationKeysSample.js +1 -1
  88. package/dist-esm/samples-dev/storageAccountsUpdateSample.js +8 -8
  89. package/dist-esm/samples-dev/tableCreateSample.js +2 -2
  90. package/dist-esm/samples-dev/tableDeleteSample.js +1 -1
  91. package/dist-esm/samples-dev/tableGetSample.js +1 -1
  92. package/dist-esm/samples-dev/tableListSample.js +1 -1
  93. package/dist-esm/samples-dev/tableServicesGetServicePropertiesSample.js +1 -1
  94. package/dist-esm/samples-dev/tableServicesListSample.js +1 -1
  95. package/dist-esm/samples-dev/tableServicesSetServicePropertiesSample.js +1 -1
  96. package/dist-esm/samples-dev/tableUpdateSample.js +2 -2
  97. package/dist-esm/samples-dev/usagesListByLocationSample.js +1 -1
  98. package/dist-esm/src/index.d.ts +1 -0
  99. package/dist-esm/src/index.d.ts.map +1 -1
  100. package/dist-esm/src/index.js +1 -0
  101. package/dist-esm/src/index.js.map +1 -1
  102. package/dist-esm/src/models/index.d.ts +61 -18
  103. package/dist-esm/src/models/index.d.ts.map +1 -1
  104. package/dist-esm/src/models/index.js +10 -0
  105. package/dist-esm/src/models/index.js.map +1 -1
  106. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  107. package/dist-esm/src/models/mappers.js +42 -0
  108. package/dist-esm/src/models/mappers.js.map +1 -1
  109. package/dist-esm/src/models/parameters.d.ts +6 -3
  110. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  111. package/dist-esm/src/models/parameters.js +46 -13
  112. package/dist-esm/src/models/parameters.js.map +1 -1
  113. package/dist-esm/src/operations/blobContainers.d.ts.map +1 -1
  114. package/dist-esm/src/operations/blobContainers.js +23 -11
  115. package/dist-esm/src/operations/blobContainers.js.map +1 -1
  116. package/dist-esm/src/operations/blobInventoryPolicies.d.ts.map +1 -1
  117. package/dist-esm/src/operations/blobInventoryPolicies.js +8 -4
  118. package/dist-esm/src/operations/blobInventoryPolicies.js.map +1 -1
  119. package/dist-esm/src/operations/blobServices.d.ts.map +1 -1
  120. package/dist-esm/src/operations/blobServices.js +8 -4
  121. package/dist-esm/src/operations/blobServices.js.map +1 -1
  122. package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -1
  123. package/dist-esm/src/operations/deletedAccounts.js +19 -7
  124. package/dist-esm/src/operations/deletedAccounts.js.map +1 -1
  125. package/dist-esm/src/operations/encryptionScopes.d.ts.map +1 -1
  126. package/dist-esm/src/operations/encryptionScopes.js +31 -9
  127. package/dist-esm/src/operations/encryptionScopes.js.map +1 -1
  128. package/dist-esm/src/operations/fileShares.d.ts.map +1 -1
  129. package/dist-esm/src/operations/fileShares.js +22 -10
  130. package/dist-esm/src/operations/fileShares.js.map +1 -1
  131. package/dist-esm/src/operations/localUsersOperations.d.ts.map +1 -1
  132. package/dist-esm/src/operations/localUsersOperations.js +8 -4
  133. package/dist-esm/src/operations/localUsersOperations.js.map +1 -1
  134. package/dist-esm/src/operations/objectReplicationPoliciesOperations.d.ts.map +1 -1
  135. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js +8 -4
  136. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js.map +1 -1
  137. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  138. package/dist-esm/src/operations/operations.js +8 -4
  139. package/dist-esm/src/operations/operations.js.map +1 -1
  140. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  141. package/dist-esm/src/operations/privateEndpointConnections.js +8 -4
  142. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  143. package/dist-esm/src/operations/queue.d.ts.map +1 -1
  144. package/dist-esm/src/operations/queue.js +23 -11
  145. package/dist-esm/src/operations/queue.js.map +1 -1
  146. package/dist-esm/src/operations/skus.d.ts.map +1 -1
  147. package/dist-esm/src/operations/skus.js +8 -4
  148. package/dist-esm/src/operations/skus.js.map +1 -1
  149. package/dist-esm/src/operations/storageAccounts.d.ts +20 -6
  150. package/dist-esm/src/operations/storageAccounts.d.ts.map +1 -1
  151. package/dist-esm/src/operations/storageAccounts.js +58 -21
  152. package/dist-esm/src/operations/storageAccounts.js.map +1 -1
  153. package/dist-esm/src/operations/tableOperations.d.ts.map +1 -1
  154. package/dist-esm/src/operations/tableOperations.js +19 -7
  155. package/dist-esm/src/operations/tableOperations.js.map +1 -1
  156. package/dist-esm/src/operations/usages.d.ts.map +1 -1
  157. package/dist-esm/src/operations/usages.js +8 -4
  158. package/dist-esm/src/operations/usages.js.map +1 -1
  159. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts +20 -6
  160. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts.map +1 -1
  161. package/dist-esm/src/pagingHelper.d.ts +13 -0
  162. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  163. package/dist-esm/src/pagingHelper.js +32 -0
  164. package/dist-esm/src/pagingHelper.js.map +1 -0
  165. package/dist-esm/src/storageManagementClient.d.ts.map +1 -1
  166. package/dist-esm/src/storageManagementClient.js +5 -8
  167. package/dist-esm/src/storageManagementClient.js.map +1 -1
  168. package/package.json +4 -3
  169. package/review/arm-storage.api.md +25 -0
  170. package/src/index.ts +1 -0
  171. package/src/models/index.ts +67 -20
  172. package/src/models/mappers.ts +42 -0
  173. package/src/models/parameters.ts +50 -14
  174. package/src/operations/blobContainers.ts +30 -12
  175. package/src/operations/blobInventoryPolicies.ts +17 -7
  176. package/src/operations/blobServices.ts +15 -5
  177. package/src/operations/deletedAccounts.ts +21 -8
  178. package/src/operations/encryptionScopes.ts +39 -11
  179. package/src/operations/fileShares.ts +29 -11
  180. package/src/operations/localUsersOperations.ts +15 -5
  181. package/src/operations/objectReplicationPoliciesOperations.ts +15 -5
  182. package/src/operations/operations.ts +10 -5
  183. package/src/operations/privateEndpointConnections.ts +15 -5
  184. package/src/operations/queue.ts +31 -13
  185. package/src/operations/skus.ts +10 -5
  186. package/src/operations/storageAccounts.ts +67 -24
  187. package/src/operations/tableOperations.ts +27 -9
  188. package/src/operations/usages.ts +10 -5
  189. package/src/operationsInterfaces/storageAccounts.ts +20 -6
  190. package/src/pagingHelper.ts +39 -0
  191. package/src/storageManagementClient.ts +6 -7
  192. package/types/arm-storage.d.ts +92 -24
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { TableOperations } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -16,6 +17,7 @@ import {
16
17
  Table,
17
18
  TableListNextOptionalParams,
18
19
  TableListOptionalParams,
20
+ TableListResponse,
19
21
  TableCreateOptionalParams,
20
22
  TableCreateResponse,
21
23
  TableUpdateOptionalParams,
@@ -23,7 +25,6 @@ import {
23
25
  TableGetOptionalParams,
24
26
  TableGetResponse,
25
27
  TableDeleteOptionalParams,
26
- TableListResponse,
27
28
  TableListNextResponse
28
29
  } from "../models";
29
30
 
@@ -62,8 +63,16 @@ export class TableOperationsImpl implements TableOperations {
62
63
  [Symbol.asyncIterator]() {
63
64
  return this;
64
65
  },
65
- byPage: () => {
66
- return this.listPagingPage(resourceGroupName, accountName, options);
66
+ byPage: (settings?: PageSettings) => {
67
+ if (settings?.maxPageSize) {
68
+ throw new Error("maxPageSize is not supported by this operation.");
69
+ }
70
+ return this.listPagingPage(
71
+ resourceGroupName,
72
+ accountName,
73
+ options,
74
+ settings
75
+ );
67
76
  }
68
77
  };
69
78
  }
@@ -71,11 +80,18 @@ export class TableOperationsImpl implements TableOperations {
71
80
  private async *listPagingPage(
72
81
  resourceGroupName: string,
73
82
  accountName: string,
74
- options?: TableListOptionalParams
83
+ options?: TableListOptionalParams,
84
+ settings?: PageSettings
75
85
  ): AsyncIterableIterator<Table[]> {
76
- let result = await this._list(resourceGroupName, accountName, options);
77
- yield result.value || [];
78
- let continuationToken = result.nextLink;
86
+ let result: TableListResponse;
87
+ let continuationToken = settings?.continuationToken;
88
+ if (!continuationToken) {
89
+ result = await this._list(resourceGroupName, accountName, options);
90
+ let page = result.value || [];
91
+ continuationToken = result.nextLink;
92
+ setContinuationToken(page, continuationToken);
93
+ yield page;
94
+ }
79
95
  while (continuationToken) {
80
96
  result = await this._listNext(
81
97
  resourceGroupName,
@@ -84,7 +100,9 @@ export class TableOperationsImpl implements TableOperations {
84
100
  options
85
101
  );
86
102
  continuationToken = result.nextLink;
87
- yield result.value || [];
103
+ let page = result.value || [];
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
88
106
  }
89
107
  }
90
108
 
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { Usages } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -48,17 +48,22 @@ export class UsagesImpl implements Usages {
48
48
  [Symbol.asyncIterator]() {
49
49
  return this;
50
50
  },
51
- byPage: () => {
52
- return this.listByLocationPagingPage(location, options);
51
+ byPage: (settings?: PageSettings) => {
52
+ if (settings?.maxPageSize) {
53
+ throw new Error("maxPageSize is not supported by this operation.");
54
+ }
55
+ return this.listByLocationPagingPage(location, options, settings);
53
56
  }
54
57
  };
55
58
  }
56
59
 
57
60
  private async *listByLocationPagingPage(
58
61
  location: string,
59
- options?: UsagesListByLocationOptionalParams
62
+ options?: UsagesListByLocationOptionalParams,
63
+ _settings?: PageSettings
60
64
  ): AsyncIterableIterator<Usage[]> {
61
- let result = await this._listByLocation(location, options);
65
+ let result: UsagesListByLocationResponse;
66
+ result = await this._listByLocation(location, options);
62
67
  yield result.value || [];
63
68
  }
64
69
 
@@ -236,9 +236,16 @@ export interface StorageAccounts {
236
236
  options?: StorageAccountsListServiceSASOptionalParams
237
237
  ): Promise<StorageAccountsListServiceSASResponse>;
238
238
  /**
239
- * Failover request can be triggered for a storage account in case of availability issues. The failover
240
- * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The
241
- * secondary cluster will become primary after failover.
239
+ * A failover request can be triggered for a storage account in the event a primary endpoint becomes
240
+ * unavailable for any reason. The failover occurs from the storage account's primary cluster to the
241
+ * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and
242
+ * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary
243
+ * clusters are swapped after failover and the account remains geo-replicated. Failover should continue
244
+ * to be used in the event of availability issues as Planned failover is only available while the
245
+ * primary and secondary endpoints are available. The primary use case of a Planned Failover is
246
+ * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter
247
+ * to 'Planned'. Learn more about the failover options here-
248
+ * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidanceS
242
249
  * @param resourceGroupName The name of the resource group within the user's subscription. The name is
243
250
  * case insensitive.
244
251
  * @param accountName The name of the storage account within the specified resource group. Storage
@@ -252,9 +259,16 @@ export interface StorageAccounts {
252
259
  options?: StorageAccountsFailoverOptionalParams
253
260
  ): Promise<PollerLike<PollOperationState<void>, void>>;
254
261
  /**
255
- * Failover request can be triggered for a storage account in case of availability issues. The failover
256
- * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The
257
- * secondary cluster will become primary after failover.
262
+ * A failover request can be triggered for a storage account in the event a primary endpoint becomes
263
+ * unavailable for any reason. The failover occurs from the storage account's primary cluster to the
264
+ * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and
265
+ * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary
266
+ * clusters are swapped after failover and the account remains geo-replicated. Failover should continue
267
+ * to be used in the event of availability issues as Planned failover is only available while the
268
+ * primary and secondary endpoints are available. The primary use case of a Planned Failover is
269
+ * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter
270
+ * to 'Planned'. Learn more about the failover options here-
271
+ * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance
258
272
  * @param resourceGroupName The name of the resource group within the user's subscription. The name is
259
273
  * case insensitive.
260
274
  * @param accountName The name of the storage account within the specified resource group. Storage
@@ -0,0 +1,39 @@
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
+
9
+ export interface PageInfo {
10
+ continuationToken?: string;
11
+ }
12
+
13
+ const pageMap = new WeakMap<object, PageInfo>();
14
+
15
+ /**
16
+ * Given a result page from a pageable operation, returns a
17
+ * continuation token that can be used to begin paging from
18
+ * that point later.
19
+ * @param page A result object from calling .byPage() on a paged operation.
20
+ * @returns The continuation token that can be passed into byPage().
21
+ */
22
+ export function getContinuationToken(page: unknown): string | undefined {
23
+ if (typeof page !== "object" || page === null) {
24
+ return undefined;
25
+ }
26
+ return pageMap.get(page)?.continuationToken;
27
+ }
28
+
29
+ export function setContinuationToken(
30
+ page: unknown,
31
+ continuationToken: string | undefined
32
+ ): void {
33
+ if (typeof page !== "object" || page === null || !continuationToken) {
34
+ return;
35
+ }
36
+ const pageInfo = pageMap.get(page) ?? {};
37
+ pageInfo.continuationToken = continuationToken;
38
+ pageMap.set(page, pageInfo);
39
+ }
@@ -92,22 +92,19 @@ export class StorageManagementClient extends coreClient.ServiceClient {
92
92
  credential: credentials
93
93
  };
94
94
 
95
- const packageDetails = `azsdk-js-arm-storage/18.0.1`;
95
+ const packageDetails = `azsdk-js-arm-storage/18.1.0`;
96
96
  const userAgentPrefix =
97
97
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
98
98
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
99
99
  : `${packageDetails}`;
100
100
 
101
- if (!options.credentialScopes) {
102
- options.credentialScopes = ["https://management.azure.com/.default"];
103
- }
104
101
  const optionsWithDefaults = {
105
102
  ...defaults,
106
103
  ...options,
107
104
  userAgentOptions: {
108
105
  userAgentPrefix
109
106
  },
110
- baseUri:
107
+ endpoint:
111
108
  options.endpoint ?? options.baseUri ?? "https://management.azure.com"
112
109
  };
113
110
  super(optionsWithDefaults);
@@ -133,7 +130,9 @@ export class StorageManagementClient extends coreClient.ServiceClient {
133
130
  this.pipeline.addPolicy(
134
131
  coreRestPipeline.bearerTokenAuthenticationPolicy({
135
132
  credential: credentials,
136
- scopes: `${optionsWithDefaults.credentialScopes}`,
133
+ scopes:
134
+ optionsWithDefaults.credentialScopes ??
135
+ `${optionsWithDefaults.endpoint}/.default`,
137
136
  challengeCallbacks: {
138
137
  authorizeRequestOnChallenge:
139
138
  coreClient.authorizeRequestOnClaimChallenge
@@ -146,7 +145,7 @@ export class StorageManagementClient extends coreClient.ServiceClient {
146
145
 
147
146
  // Assigning values to Constant parameters
148
147
  this.$host = options.$host || "https://management.azure.com";
149
- this.apiVersion = options.apiVersion || "2022-05-01";
148
+ this.apiVersion = options.apiVersion || "2022-09-01";
150
149
  this.operations = new OperationsImpl(this);
151
150
  this.skus = new SkusImpl(this);
152
151
  this.storageAccounts = new StorageAccountsImpl(this);
@@ -554,10 +554,10 @@ export declare type BlobContainersLeaseResponse = LeaseContainerResponse;
554
554
 
555
555
  /** Optional parameters. */
556
556
  export declare interface BlobContainersListNextOptionalParams extends coreClient.OperationOptions {
557
- /** Optional. Specified maximum number of containers that can be included in the list. */
558
- maxpagesize?: string;
559
557
  /** Optional. When specified, only container names starting with the filter will be listed. */
560
558
  filter?: string;
559
+ /** Optional. Specified maximum number of containers that can be included in the list. */
560
+ maxpagesize?: string;
561
561
  /** Optional, used to include the properties for soft deleted blob containers. */
562
562
  include?: ListContainersInclude;
563
563
  }
@@ -567,10 +567,10 @@ export declare type BlobContainersListNextResponse = ListContainerItems;
567
567
 
568
568
  /** Optional parameters. */
569
569
  export declare interface BlobContainersListOptionalParams extends coreClient.OperationOptions {
570
- /** Optional. Specified maximum number of containers that can be included in the list. */
571
- maxpagesize?: string;
572
570
  /** Optional. When specified, only container names starting with the filter will be listed. */
573
571
  filter?: string;
572
+ /** Optional. Specified maximum number of containers that can be included in the list. */
573
+ maxpagesize?: string;
574
574
  /** Optional, used to include the properties for soft deleted blob containers. */
575
575
  include?: ListContainersInclude;
576
576
  }
@@ -1330,6 +1330,12 @@ export declare type EncryptionScopesGetResponse = EncryptionScope;
1330
1330
 
1331
1331
  /** Optional parameters. */
1332
1332
  export declare interface EncryptionScopesListNextOptionalParams extends coreClient.OperationOptions {
1333
+ /** Optional, specifies the maximum number of encryption scopes that will be included in the list response. */
1334
+ maxpagesize?: number;
1335
+ /** Optional. When specified, only encryption scope names starting with the filter will be listed. */
1336
+ filter?: string;
1337
+ /** Optional, when specified, will list encryption scopes with the specific state. Defaults to All */
1338
+ include?: ListEncryptionScopesInclude;
1333
1339
  }
1334
1340
 
1335
1341
  /** Contains response data for the listNext operation. */
@@ -1337,6 +1343,12 @@ export declare type EncryptionScopesListNextResponse = EncryptionScopeListResult
1337
1343
 
1338
1344
  /** Optional parameters. */
1339
1345
  export declare interface EncryptionScopesListOptionalParams extends coreClient.OperationOptions {
1346
+ /** Optional, specifies the maximum number of encryption scopes that will be included in the list response. */
1347
+ maxpagesize?: number;
1348
+ /** Optional. When specified, only encryption scope names starting with the filter will be listed. */
1349
+ filter?: string;
1350
+ /** Optional, when specified, will list encryption scopes with the specific state. Defaults to All */
1351
+ include?: ListEncryptionScopesInclude;
1340
1352
  }
1341
1353
 
1342
1354
  /** Contains response data for the list operation. */
@@ -1877,10 +1889,10 @@ export declare type FileSharesLeaseResponse = FileSharesLeaseHeaders & LeaseShar
1877
1889
 
1878
1890
  /** Optional parameters. */
1879
1891
  export declare interface FileSharesListNextOptionalParams extends coreClient.OperationOptions {
1880
- /** Optional. Specified maximum number of shares that can be included in the list. */
1881
- maxpagesize?: string;
1882
1892
  /** Optional. When specified, only share names starting with the filter will be listed. */
1883
1893
  filter?: string;
1894
+ /** Optional. Specified maximum number of shares that can be included in the list. */
1895
+ maxpagesize?: string;
1884
1896
  /** Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ',' */
1885
1897
  expand?: string;
1886
1898
  }
@@ -1890,10 +1902,10 @@ export declare type FileSharesListNextResponse = FileShareItems;
1890
1902
 
1891
1903
  /** Optional parameters. */
1892
1904
  export declare interface FileSharesListOptionalParams extends coreClient.OperationOptions {
1893
- /** Optional. Specified maximum number of shares that can be included in the list. */
1894
- maxpagesize?: string;
1895
1905
  /** Optional. When specified, only share names starting with the filter will be listed. */
1896
1906
  filter?: string;
1907
+ /** Optional. Specified maximum number of shares that can be included in the list. */
1908
+ maxpagesize?: string;
1897
1909
  /** Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ',' */
1898
1910
  expand?: string;
1899
1911
  }
@@ -1952,6 +1964,15 @@ export declare interface GeoReplicationStats {
1952
1964
  */
1953
1965
  export declare type GeoReplicationStatus = string;
1954
1966
 
1967
+ /**
1968
+ * Given a result page from a pageable operation, returns a
1969
+ * continuation token that can be used to begin paging from
1970
+ * that point later.
1971
+ * @param page A result object from calling .byPage() on a paged operation.
1972
+ * @returns The continuation token that can be passed into byPage().
1973
+ */
1974
+ export declare function getContinuationToken(page: unknown): string | undefined;
1975
+
1955
1976
  /** Defines values for HttpProtocol. */
1956
1977
  export declare type HttpProtocol = "https,http" | "https";
1957
1978
 
@@ -2473,6 +2494,16 @@ export declare enum KnownListContainersInclude {
2473
2494
  Deleted = "deleted"
2474
2495
  }
2475
2496
 
2497
+ /** Known values of {@link ListEncryptionScopesInclude} that the service accepts. */
2498
+ export declare enum KnownListEncryptionScopesInclude {
2499
+ /** All */
2500
+ All = "All",
2501
+ /** Enabled */
2502
+ Enabled = "Enabled",
2503
+ /** Disabled */
2504
+ Disabled = "Disabled"
2505
+ }
2506
+
2476
2507
  /** Known values of {@link ManagementPolicyName} that the service accepts. */
2477
2508
  export declare enum KnownManagementPolicyName {
2478
2509
  /** Default */
@@ -2963,6 +2994,17 @@ export declare interface ListContainerItems {
2963
2994
  */
2964
2995
  export declare type ListContainersInclude = string;
2965
2996
 
2997
+ /**
2998
+ * Defines values for ListEncryptionScopesInclude. \
2999
+ * {@link KnownListEncryptionScopesInclude} can be used interchangeably with ListEncryptionScopesInclude,
3000
+ * this enum contains the known values that the service supports.
3001
+ * ### Known values supported by the service
3002
+ * **All** \
3003
+ * **Enabled** \
3004
+ * **Disabled**
3005
+ */
3006
+ export declare type ListEncryptionScopesInclude = string;
3007
+
2966
3008
  export declare interface ListQueue extends Resource {
2967
3009
  /** A name-value pair that represents queue metadata. */
2968
3010
  metadata?: {
@@ -3271,10 +3313,14 @@ export declare interface ManagementPolicyAction {
3271
3313
 
3272
3314
  /** Management policy action for base blob. */
3273
3315
  export declare interface ManagementPolicyBaseBlob {
3274
- /** The function to tier blobs to cool storage. Support blobs currently at Hot tier */
3316
+ /** The function to tier blobs to cool storage. */
3275
3317
  tierToCool?: DateAfterModification;
3276
- /** The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier */
3318
+ /** The function to tier blobs to archive storage. */
3277
3319
  tierToArchive?: DateAfterModification;
3320
+ /** The function to tier blobs to cold storage. */
3321
+ tierToCold?: DateAfterModification;
3322
+ /** The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts */
3323
+ tierToHot?: DateAfterModification;
3278
3324
  /** The function to delete the blob */
3279
3325
  delete?: DateAfterModification;
3280
3326
  /** This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan. */
@@ -3328,20 +3374,28 @@ export declare interface ManagementPolicySchema {
3328
3374
 
3329
3375
  /** Management policy action for snapshot. */
3330
3376
  export declare interface ManagementPolicySnapShot {
3331
- /** The function to tier blob snapshot to cool storage. Support blob snapshot currently at Hot tier */
3377
+ /** The function to tier blob snapshot to cool storage. */
3332
3378
  tierToCool?: DateAfterCreation;
3333
- /** The function to tier blob snapshot to archive storage. Support blob snapshot currently at Hot or Cool tier */
3379
+ /** The function to tier blob snapshot to archive storage. */
3334
3380
  tierToArchive?: DateAfterCreation;
3381
+ /** The function to tier blobs to cold storage. */
3382
+ tierToCold?: DateAfterCreation;
3383
+ /** The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts */
3384
+ tierToHot?: DateAfterCreation;
3335
3385
  /** The function to delete the blob snapshot */
3336
3386
  delete?: DateAfterCreation;
3337
3387
  }
3338
3388
 
3339
3389
  /** Management policy action for blob version. */
3340
3390
  export declare interface ManagementPolicyVersion {
3341
- /** The function to tier blob version to cool storage. Support blob version currently at Hot tier */
3391
+ /** The function to tier blob version to cool storage. */
3342
3392
  tierToCool?: DateAfterCreation;
3343
- /** The function to tier blob version to archive storage. Support blob version currently at Hot or Cool tier */
3393
+ /** The function to tier blob version to archive storage. */
3344
3394
  tierToArchive?: DateAfterCreation;
3395
+ /** The function to tier blobs to cold storage. */
3396
+ tierToCold?: DateAfterCreation;
3397
+ /** The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts */
3398
+ tierToHot?: DateAfterCreation;
3345
3399
  /** The function to delete the blob version */
3346
3400
  delete?: DateAfterCreation;
3347
3401
  }
@@ -3934,10 +3988,10 @@ export declare type QueueGetResponse = StorageQueue;
3934
3988
 
3935
3989
  /** Optional parameters. */
3936
3990
  export declare interface QueueListNextOptionalParams extends coreClient.OperationOptions {
3937
- /** Optional, a maximum number of queues that should be included in a list queue response */
3938
- maxpagesize?: string;
3939
3991
  /** Optional, When specified, only the queues with a name starting with the given filter will be listed. */
3940
3992
  filter?: string;
3993
+ /** Optional, a maximum number of queues that should be included in a list queue response */
3994
+ maxpagesize?: string;
3941
3995
  }
3942
3996
 
3943
3997
  /** Contains response data for the listNext operation. */
@@ -3945,10 +3999,10 @@ export declare type QueueListNextResponse = ListQueueResource;
3945
3999
 
3946
4000
  /** Optional parameters. */
3947
4001
  export declare interface QueueListOptionalParams extends coreClient.OperationOptions {
3948
- /** Optional, a maximum number of queues that should be included in a list queue response */
3949
- maxpagesize?: string;
3950
4002
  /** Optional, When specified, only the queues with a name starting with the given filter will be listed. */
3951
4003
  filter?: string;
4004
+ /** Optional, a maximum number of queues that should be included in a list queue response */
4005
+ maxpagesize?: string;
3952
4006
  }
3953
4007
 
3954
4008
  /** Contains response data for the list operation. */
@@ -4872,9 +4926,16 @@ export declare interface StorageAccounts {
4872
4926
  */
4873
4927
  listServiceSAS(resourceGroupName: string, accountName: string, parameters: ServiceSasParameters, options?: StorageAccountsListServiceSASOptionalParams): Promise<StorageAccountsListServiceSASResponse>;
4874
4928
  /**
4875
- * Failover request can be triggered for a storage account in case of availability issues. The failover
4876
- * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The
4877
- * secondary cluster will become primary after failover.
4929
+ * A failover request can be triggered for a storage account in the event a primary endpoint becomes
4930
+ * unavailable for any reason. The failover occurs from the storage account's primary cluster to the
4931
+ * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and
4932
+ * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary
4933
+ * clusters are swapped after failover and the account remains geo-replicated. Failover should continue
4934
+ * to be used in the event of availability issues as Planned failover is only available while the
4935
+ * primary and secondary endpoints are available. The primary use case of a Planned Failover is
4936
+ * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter
4937
+ * to 'Planned'. Learn more about the failover options here-
4938
+ * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidanceS
4878
4939
  * @param resourceGroupName The name of the resource group within the user's subscription. The name is
4879
4940
  * case insensitive.
4880
4941
  * @param accountName The name of the storage account within the specified resource group. Storage
@@ -4884,9 +4945,16 @@ export declare interface StorageAccounts {
4884
4945
  */
4885
4946
  beginFailover(resourceGroupName: string, accountName: string, options?: StorageAccountsFailoverOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
4886
4947
  /**
4887
- * Failover request can be triggered for a storage account in case of availability issues. The failover
4888
- * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The
4889
- * secondary cluster will become primary after failover.
4948
+ * A failover request can be triggered for a storage account in the event a primary endpoint becomes
4949
+ * unavailable for any reason. The failover occurs from the storage account's primary cluster to the
4950
+ * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and
4951
+ * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary
4952
+ * clusters are swapped after failover and the account remains geo-replicated. Failover should continue
4953
+ * to be used in the event of availability issues as Planned failover is only available while the
4954
+ * primary and secondary endpoints are available. The primary use case of a Planned Failover is
4955
+ * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter
4956
+ * to 'Planned'. Learn more about the failover options here-
4957
+ * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance
4890
4958
  * @param resourceGroupName The name of the resource group within the user's subscription. The name is
4891
4959
  * case insensitive.
4892
4960
  * @param accountName The name of the storage account within the specified resource group. Storage