@azure/arm-elasticsan 1.0.0-beta.1 → 1.0.0-beta.3

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 (197) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +2839 -1192
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/elasticSansCreateSample.js +26 -17
  9. package/dist-esm/samples-dev/elasticSansCreateSample.js.map +1 -1
  10. package/dist-esm/samples-dev/elasticSansDeleteSample.js +17 -10
  11. package/dist-esm/samples-dev/elasticSansDeleteSample.js.map +1 -1
  12. package/dist-esm/samples-dev/elasticSansGetSample.js +17 -10
  13. package/dist-esm/samples-dev/elasticSansGetSample.js.map +1 -1
  14. package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js +39 -18
  15. package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js.map +1 -1
  16. package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js +37 -16
  17. package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js.map +1 -1
  18. package/dist-esm/samples-dev/elasticSansUpdateSample.js +21 -13
  19. package/dist-esm/samples-dev/elasticSansUpdateSample.js.map +1 -1
  20. package/dist-esm/samples-dev/operationsListSample.js +39 -16
  21. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  22. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts +2 -0
  23. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts.map +1 -0
  24. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js +70 -0
  25. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js.map +1 -0
  26. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  27. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  28. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +58 -0
  29. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  30. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  31. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  32. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +58 -0
  33. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  34. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
  35. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
  36. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +98 -0
  37. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
  38. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.d.ts +2 -0
  39. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.d.ts.map +1 -0
  40. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.js +56 -0
  41. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.js.map +1 -0
  42. package/dist-esm/samples-dev/skusListSample.js +38 -17
  43. package/dist-esm/samples-dev/skusListSample.js.map +1 -1
  44. package/dist-esm/samples-dev/volumeGroupsCreateSample.js +34 -16
  45. package/dist-esm/samples-dev/volumeGroupsCreateSample.js.map +1 -1
  46. package/dist-esm/samples-dev/volumeGroupsDeleteSample.js +19 -12
  47. package/dist-esm/samples-dev/volumeGroupsDeleteSample.js.map +1 -1
  48. package/dist-esm/samples-dev/volumeGroupsGetSample.js +19 -12
  49. package/dist-esm/samples-dev/volumeGroupsGetSample.js.map +1 -1
  50. package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js +41 -20
  51. package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js.map +1 -1
  52. package/dist-esm/samples-dev/volumeGroupsUpdateSample.js +33 -15
  53. package/dist-esm/samples-dev/volumeGroupsUpdateSample.js.map +1 -1
  54. package/dist-esm/samples-dev/volumeSnapshotsCreateSample.d.ts +2 -0
  55. package/dist-esm/samples-dev/volumeSnapshotsCreateSample.d.ts.map +1 -0
  56. package/dist-esm/samples-dev/volumeSnapshotsCreateSample.js +70 -0
  57. package/dist-esm/samples-dev/volumeSnapshotsCreateSample.js.map +1 -0
  58. package/dist-esm/samples-dev/volumeSnapshotsDeleteSample.d.ts +2 -0
  59. package/dist-esm/samples-dev/volumeSnapshotsDeleteSample.d.ts.map +1 -0
  60. package/dist-esm/samples-dev/volumeSnapshotsDeleteSample.js +60 -0
  61. package/dist-esm/samples-dev/volumeSnapshotsDeleteSample.js.map +1 -0
  62. package/dist-esm/samples-dev/volumeSnapshotsGetSample.d.ts +2 -0
  63. package/dist-esm/samples-dev/volumeSnapshotsGetSample.d.ts.map +1 -0
  64. package/dist-esm/samples-dev/volumeSnapshotsGetSample.js +60 -0
  65. package/dist-esm/samples-dev/volumeSnapshotsGetSample.js.map +1 -0
  66. package/dist-esm/samples-dev/volumeSnapshotsListByVolumeGroupSample.d.ts +2 -0
  67. package/dist-esm/samples-dev/volumeSnapshotsListByVolumeGroupSample.d.ts.map +1 -0
  68. package/dist-esm/samples-dev/volumeSnapshotsListByVolumeGroupSample.js +102 -0
  69. package/dist-esm/samples-dev/volumeSnapshotsListByVolumeGroupSample.js.map +1 -0
  70. package/dist-esm/samples-dev/volumesCreateSample.js +25 -18
  71. package/dist-esm/samples-dev/volumesCreateSample.js.map +1 -1
  72. package/dist-esm/samples-dev/volumesDeleteSample.js +28 -15
  73. package/dist-esm/samples-dev/volumesDeleteSample.js.map +1 -1
  74. package/dist-esm/samples-dev/volumesGetSample.js +21 -14
  75. package/dist-esm/samples-dev/volumesGetSample.js.map +1 -1
  76. package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js +43 -22
  77. package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js.map +1 -1
  78. package/dist-esm/samples-dev/volumesUpdateSample.js +22 -18
  79. package/dist-esm/samples-dev/volumesUpdateSample.js.map +1 -1
  80. package/dist-esm/src/elasticSanManagement.d.ts +4 -1
  81. package/dist-esm/src/elasticSanManagement.d.ts.map +1 -1
  82. package/dist-esm/src/elasticSanManagement.js +9 -9
  83. package/dist-esm/src/elasticSanManagement.js.map +1 -1
  84. package/dist-esm/src/index.d.ts +1 -0
  85. package/dist-esm/src/index.d.ts.map +1 -1
  86. package/dist-esm/src/index.js +1 -0
  87. package/dist-esm/src/index.js.map +1 -1
  88. package/dist-esm/src/lroImpl.d.ts +6 -11
  89. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  90. package/dist-esm/src/lroImpl.js +12 -20
  91. package/dist-esm/src/lroImpl.js.map +1 -1
  92. package/dist-esm/src/models/index.d.ts +613 -135
  93. package/dist-esm/src/models/index.d.ts.map +1 -1
  94. package/dist-esm/src/models/index.js +84 -0
  95. package/dist-esm/src/models/index.js.map +1 -1
  96. package/dist-esm/src/models/mappers.d.ts +30 -6
  97. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  98. package/dist-esm/src/models/mappers.js +704 -133
  99. package/dist-esm/src/models/mappers.js.map +1 -1
  100. package/dist-esm/src/models/parameters.d.ts +6 -0
  101. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  102. package/dist-esm/src/models/parameters.js +53 -3
  103. package/dist-esm/src/models/parameters.js.map +1 -1
  104. package/dist-esm/src/operations/elasticSans.d.ts +4 -4
  105. package/dist-esm/src/operations/elasticSans.d.ts.map +1 -1
  106. package/dist-esm/src/operations/elasticSans.js +98 -51
  107. package/dist-esm/src/operations/elasticSans.js.map +1 -1
  108. package/dist-esm/src/operations/index.d.ts +3 -0
  109. package/dist-esm/src/operations/index.d.ts.map +1 -1
  110. package/dist-esm/src/operations/index.js +3 -0
  111. package/dist-esm/src/operations/index.js.map +1 -1
  112. package/dist-esm/src/operations/operations.d.ts +2 -2
  113. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  114. package/dist-esm/src/operations/operations.js +22 -11
  115. package/dist-esm/src/operations/operations.js.map +1 -1
  116. package/dist-esm/src/operations/privateEndpointConnections.d.ts +73 -0
  117. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  118. package/dist-esm/src/operations/privateEndpointConnections.js +334 -0
  119. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  120. package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
  121. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  122. package/dist-esm/src/operations/privateLinkResources.js +53 -0
  123. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  124. package/dist-esm/src/operations/skus.d.ts.map +1 -1
  125. package/dist-esm/src/operations/skus.js +21 -10
  126. package/dist-esm/src/operations/skus.js.map +1 -1
  127. package/dist-esm/src/operations/volumeGroups.d.ts +4 -4
  128. package/dist-esm/src/operations/volumeGroups.d.ts.map +1 -1
  129. package/dist-esm/src/operations/volumeGroups.js +78 -48
  130. package/dist-esm/src/operations/volumeGroups.js.map +1 -1
  131. package/dist-esm/src/operations/volumeSnapshots.d.ts +89 -0
  132. package/dist-esm/src/operations/volumeSnapshots.d.ts.map +1 -0
  133. package/dist-esm/src/operations/volumeSnapshots.js +395 -0
  134. package/dist-esm/src/operations/volumeSnapshots.js.map +1 -0
  135. package/dist-esm/src/operations/volumes.d.ts +4 -4
  136. package/dist-esm/src/operations/volumes.d.ts.map +1 -1
  137. package/dist-esm/src/operations/volumes.js +91 -57
  138. package/dist-esm/src/operations/volumes.js.map +1 -1
  139. package/dist-esm/src/operationsInterfaces/elasticSans.d.ts +4 -4
  140. package/dist-esm/src/operationsInterfaces/elasticSans.d.ts.map +1 -1
  141. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  142. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  143. package/dist-esm/src/operationsInterfaces/index.js +3 -0
  144. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  145. package/dist-esm/src/operationsInterfaces/operations.d.ts +2 -2
  146. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -1
  147. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
  148. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  149. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  150. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  151. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
  152. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  153. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  154. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  155. package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts +4 -4
  156. package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts.map +1 -1
  157. package/dist-esm/src/operationsInterfaces/volumeSnapshots.d.ts +62 -0
  158. package/dist-esm/src/operationsInterfaces/volumeSnapshots.d.ts.map +1 -0
  159. package/dist-esm/src/operationsInterfaces/volumeSnapshots.js +9 -0
  160. package/dist-esm/src/operationsInterfaces/volumeSnapshots.js.map +1 -0
  161. package/dist-esm/src/operationsInterfaces/volumes.d.ts +4 -4
  162. package/dist-esm/src/operationsInterfaces/volumes.d.ts.map +1 -1
  163. package/dist-esm/src/pagingHelper.d.ts +13 -0
  164. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  165. package/dist-esm/src/pagingHelper.js +32 -0
  166. package/dist-esm/src/pagingHelper.js.map +1 -0
  167. package/dist-esm/test/elasticsan_examples.spec.js +12 -5
  168. package/dist-esm/test/elasticsan_examples.spec.js.map +1 -1
  169. package/package.json +18 -23
  170. package/review/arm-elasticsan.api.md +416 -66
  171. package/src/elasticSanManagement.ts +20 -9
  172. package/src/index.ts +1 -0
  173. package/src/lroImpl.ts +31 -23
  174. package/src/models/index.ts +648 -109
  175. package/src/models/mappers.ts +749 -130
  176. package/src/models/parameters.ts +61 -3
  177. package/src/operations/elasticSans.ts +97 -60
  178. package/src/operations/index.ts +3 -0
  179. package/src/operations/operations.ts +16 -11
  180. package/src/operations/privateEndpointConnections.ts +450 -0
  181. package/src/operations/privateLinkResources.ts +72 -0
  182. package/src/operations/skus.ts +11 -6
  183. package/src/operations/volumeGroups.ts +76 -53
  184. package/src/operations/volumeSnapshots.ts +551 -0
  185. package/src/operations/volumes.ts +87 -54
  186. package/src/operationsInterfaces/elasticSans.ts +6 -6
  187. package/src/operationsInterfaces/index.ts +3 -0
  188. package/src/operationsInterfaces/operations.ts +2 -2
  189. package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
  190. package/src/operationsInterfaces/privateLinkResources.ts +27 -0
  191. package/src/operationsInterfaces/volumeGroups.ts +6 -6
  192. package/src/operationsInterfaces/volumeSnapshots.ts +121 -0
  193. package/src/operationsInterfaces/volumes.ts +10 -4
  194. package/src/pagingHelper.ts +39 -0
  195. package/types/arm-elasticsan.d.ts +784 -112
  196. package/types/tsdoc-metadata.json +1 -1
  197. package/rollup.config.js +0 -122
@@ -0,0 +1,450 @@
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
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { PrivateEndpointConnections } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { ElasticSanManagement } from "../elasticSanManagement";
15
+ import {
16
+ SimplePollerLike,
17
+ OperationState,
18
+ createHttpPoller
19
+ } from "@azure/core-lro";
20
+ import { createLroSpec } from "../lroImpl";
21
+ import {
22
+ PrivateEndpointConnection,
23
+ PrivateEndpointConnectionsListOptionalParams,
24
+ PrivateEndpointConnectionsListResponse,
25
+ PrivateEndpointConnectionsCreateOptionalParams,
26
+ PrivateEndpointConnectionsCreateResponse,
27
+ PrivateEndpointConnectionsGetOptionalParams,
28
+ PrivateEndpointConnectionsGetResponse,
29
+ PrivateEndpointConnectionsDeleteOptionalParams
30
+ } from "../models";
31
+
32
+ /// <reference lib="esnext.asynciterable" />
33
+ /** Class containing PrivateEndpointConnections operations. */
34
+ export class PrivateEndpointConnectionsImpl
35
+ implements PrivateEndpointConnections {
36
+ private readonly client: ElasticSanManagement;
37
+
38
+ /**
39
+ * Initialize a new instance of the class PrivateEndpointConnections class.
40
+ * @param client Reference to the service client
41
+ */
42
+ constructor(client: ElasticSanManagement) {
43
+ this.client = client;
44
+ }
45
+
46
+ /**
47
+ * List all Private Endpoint Connections associated with the Elastic San.
48
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
49
+ * @param elasticSanName The name of the ElasticSan.
50
+ * @param options The options parameters.
51
+ */
52
+ public list(
53
+ resourceGroupName: string,
54
+ elasticSanName: string,
55
+ options?: PrivateEndpointConnectionsListOptionalParams
56
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
57
+ const iter = this.listPagingAll(resourceGroupName, elasticSanName, options);
58
+ return {
59
+ next() {
60
+ return iter.next();
61
+ },
62
+ [Symbol.asyncIterator]() {
63
+ return this;
64
+ },
65
+ byPage: (settings?: PageSettings) => {
66
+ if (settings?.maxPageSize) {
67
+ throw new Error("maxPageSize is not supported by this operation.");
68
+ }
69
+ return this.listPagingPage(
70
+ resourceGroupName,
71
+ elasticSanName,
72
+ options,
73
+ settings
74
+ );
75
+ }
76
+ };
77
+ }
78
+
79
+ private async *listPagingPage(
80
+ resourceGroupName: string,
81
+ elasticSanName: string,
82
+ options?: PrivateEndpointConnectionsListOptionalParams,
83
+ _settings?: PageSettings
84
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
85
+ let result: PrivateEndpointConnectionsListResponse;
86
+ result = await this._list(resourceGroupName, elasticSanName, options);
87
+ yield result.value || [];
88
+ }
89
+
90
+ private async *listPagingAll(
91
+ resourceGroupName: string,
92
+ elasticSanName: string,
93
+ options?: PrivateEndpointConnectionsListOptionalParams
94
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
95
+ for await (const page of this.listPagingPage(
96
+ resourceGroupName,
97
+ elasticSanName,
98
+ options
99
+ )) {
100
+ yield* page;
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Update the state of specified private endpoint connection associated with the Elastic San
106
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
107
+ * @param elasticSanName The name of the ElasticSan.
108
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
109
+ * @param parameters Private Endpoint Connection Approval object.
110
+ * @param options The options parameters.
111
+ */
112
+ async beginCreate(
113
+ resourceGroupName: string,
114
+ elasticSanName: string,
115
+ privateEndpointConnectionName: string,
116
+ parameters: PrivateEndpointConnection,
117
+ options?: PrivateEndpointConnectionsCreateOptionalParams
118
+ ): Promise<
119
+ SimplePollerLike<
120
+ OperationState<PrivateEndpointConnectionsCreateResponse>,
121
+ PrivateEndpointConnectionsCreateResponse
122
+ >
123
+ > {
124
+ const directSendOperation = async (
125
+ args: coreClient.OperationArguments,
126
+ spec: coreClient.OperationSpec
127
+ ): Promise<PrivateEndpointConnectionsCreateResponse> => {
128
+ return this.client.sendOperationRequest(args, spec);
129
+ };
130
+ const sendOperationFn = async (
131
+ args: coreClient.OperationArguments,
132
+ spec: coreClient.OperationSpec
133
+ ) => {
134
+ let currentRawResponse:
135
+ | coreClient.FullOperationResponse
136
+ | undefined = undefined;
137
+ const providedCallback = args.options?.onResponse;
138
+ const callback: coreClient.RawResponseCallback = (
139
+ rawResponse: coreClient.FullOperationResponse,
140
+ flatResponse: unknown
141
+ ) => {
142
+ currentRawResponse = rawResponse;
143
+ providedCallback?.(rawResponse, flatResponse);
144
+ };
145
+ const updatedArgs = {
146
+ ...args,
147
+ options: {
148
+ ...args.options,
149
+ onResponse: callback
150
+ }
151
+ };
152
+ const flatResponse = await directSendOperation(updatedArgs, spec);
153
+ return {
154
+ flatResponse,
155
+ rawResponse: {
156
+ statusCode: currentRawResponse!.status,
157
+ body: currentRawResponse!.parsedBody,
158
+ headers: currentRawResponse!.headers.toJSON()
159
+ }
160
+ };
161
+ };
162
+
163
+ const lro = createLroSpec({
164
+ sendOperationFn,
165
+ args: {
166
+ resourceGroupName,
167
+ elasticSanName,
168
+ privateEndpointConnectionName,
169
+ parameters,
170
+ options
171
+ },
172
+ spec: createOperationSpec
173
+ });
174
+ const poller = await createHttpPoller<
175
+ PrivateEndpointConnectionsCreateResponse,
176
+ OperationState<PrivateEndpointConnectionsCreateResponse>
177
+ >(lro, {
178
+ restoreFrom: options?.resumeFrom,
179
+ intervalInMs: options?.updateIntervalInMs,
180
+ resourceLocationConfig: "location"
181
+ });
182
+ await poller.poll();
183
+ return poller;
184
+ }
185
+
186
+ /**
187
+ * Update the state of specified private endpoint connection associated with the Elastic San
188
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
189
+ * @param elasticSanName The name of the ElasticSan.
190
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
191
+ * @param parameters Private Endpoint Connection Approval object.
192
+ * @param options The options parameters.
193
+ */
194
+ async beginCreateAndWait(
195
+ resourceGroupName: string,
196
+ elasticSanName: string,
197
+ privateEndpointConnectionName: string,
198
+ parameters: PrivateEndpointConnection,
199
+ options?: PrivateEndpointConnectionsCreateOptionalParams
200
+ ): Promise<PrivateEndpointConnectionsCreateResponse> {
201
+ const poller = await this.beginCreate(
202
+ resourceGroupName,
203
+ elasticSanName,
204
+ privateEndpointConnectionName,
205
+ parameters,
206
+ options
207
+ );
208
+ return poller.pollUntilDone();
209
+ }
210
+
211
+ /**
212
+ * Gets the specified private endpoint connection associated with the Elastic San
213
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
214
+ * @param elasticSanName The name of the ElasticSan.
215
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
216
+ * @param options The options parameters.
217
+ */
218
+ get(
219
+ resourceGroupName: string,
220
+ elasticSanName: string,
221
+ privateEndpointConnectionName: string,
222
+ options?: PrivateEndpointConnectionsGetOptionalParams
223
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
224
+ return this.client.sendOperationRequest(
225
+ {
226
+ resourceGroupName,
227
+ elasticSanName,
228
+ privateEndpointConnectionName,
229
+ options
230
+ },
231
+ getOperationSpec
232
+ );
233
+ }
234
+
235
+ /**
236
+ * Deletes the specified private endpoint connection associated with the Elastic San
237
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
238
+ * @param elasticSanName The name of the ElasticSan.
239
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
240
+ * @param options The options parameters.
241
+ */
242
+ async beginDelete(
243
+ resourceGroupName: string,
244
+ elasticSanName: string,
245
+ privateEndpointConnectionName: string,
246
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
247
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
248
+ const directSendOperation = async (
249
+ args: coreClient.OperationArguments,
250
+ spec: coreClient.OperationSpec
251
+ ): Promise<void> => {
252
+ return this.client.sendOperationRequest(args, spec);
253
+ };
254
+ const sendOperationFn = async (
255
+ args: coreClient.OperationArguments,
256
+ spec: coreClient.OperationSpec
257
+ ) => {
258
+ let currentRawResponse:
259
+ | coreClient.FullOperationResponse
260
+ | undefined = undefined;
261
+ const providedCallback = args.options?.onResponse;
262
+ const callback: coreClient.RawResponseCallback = (
263
+ rawResponse: coreClient.FullOperationResponse,
264
+ flatResponse: unknown
265
+ ) => {
266
+ currentRawResponse = rawResponse;
267
+ providedCallback?.(rawResponse, flatResponse);
268
+ };
269
+ const updatedArgs = {
270
+ ...args,
271
+ options: {
272
+ ...args.options,
273
+ onResponse: callback
274
+ }
275
+ };
276
+ const flatResponse = await directSendOperation(updatedArgs, spec);
277
+ return {
278
+ flatResponse,
279
+ rawResponse: {
280
+ statusCode: currentRawResponse!.status,
281
+ body: currentRawResponse!.parsedBody,
282
+ headers: currentRawResponse!.headers.toJSON()
283
+ }
284
+ };
285
+ };
286
+
287
+ const lro = createLroSpec({
288
+ sendOperationFn,
289
+ args: {
290
+ resourceGroupName,
291
+ elasticSanName,
292
+ privateEndpointConnectionName,
293
+ options
294
+ },
295
+ spec: deleteOperationSpec
296
+ });
297
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
298
+ restoreFrom: options?.resumeFrom,
299
+ intervalInMs: options?.updateIntervalInMs,
300
+ resourceLocationConfig: "location"
301
+ });
302
+ await poller.poll();
303
+ return poller;
304
+ }
305
+
306
+ /**
307
+ * Deletes the specified private endpoint connection associated with the Elastic San
308
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
309
+ * @param elasticSanName The name of the ElasticSan.
310
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
311
+ * @param options The options parameters.
312
+ */
313
+ async beginDeleteAndWait(
314
+ resourceGroupName: string,
315
+ elasticSanName: string,
316
+ privateEndpointConnectionName: string,
317
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
318
+ ): Promise<void> {
319
+ const poller = await this.beginDelete(
320
+ resourceGroupName,
321
+ elasticSanName,
322
+ privateEndpointConnectionName,
323
+ options
324
+ );
325
+ return poller.pollUntilDone();
326
+ }
327
+
328
+ /**
329
+ * List all Private Endpoint Connections associated with the Elastic San.
330
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
331
+ * @param elasticSanName The name of the ElasticSan.
332
+ * @param options The options parameters.
333
+ */
334
+ private _list(
335
+ resourceGroupName: string,
336
+ elasticSanName: string,
337
+ options?: PrivateEndpointConnectionsListOptionalParams
338
+ ): Promise<PrivateEndpointConnectionsListResponse> {
339
+ return this.client.sendOperationRequest(
340
+ { resourceGroupName, elasticSanName, options },
341
+ listOperationSpec
342
+ );
343
+ }
344
+ }
345
+ // Operation Specifications
346
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
347
+
348
+ const createOperationSpec: coreClient.OperationSpec = {
349
+ path:
350
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}",
351
+ httpMethod: "PUT",
352
+ responses: {
353
+ 200: {
354
+ bodyMapper: Mappers.PrivateEndpointConnection
355
+ },
356
+ 201: {
357
+ bodyMapper: Mappers.PrivateEndpointConnection
358
+ },
359
+ 202: {
360
+ bodyMapper: Mappers.PrivateEndpointConnection
361
+ },
362
+ 204: {
363
+ bodyMapper: Mappers.PrivateEndpointConnection
364
+ },
365
+ default: {
366
+ bodyMapper: Mappers.ErrorResponse
367
+ }
368
+ },
369
+ requestBody: Parameters.parameters6,
370
+ queryParameters: [Parameters.apiVersion],
371
+ urlParameters: [
372
+ Parameters.$host,
373
+ Parameters.subscriptionId,
374
+ Parameters.resourceGroupName,
375
+ Parameters.elasticSanName,
376
+ Parameters.privateEndpointConnectionName
377
+ ],
378
+ headerParameters: [Parameters.accept, Parameters.contentType],
379
+ mediaType: "json",
380
+ serializer
381
+ };
382
+ const getOperationSpec: coreClient.OperationSpec = {
383
+ path:
384
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}",
385
+ httpMethod: "GET",
386
+ responses: {
387
+ 200: {
388
+ bodyMapper: Mappers.PrivateEndpointConnection
389
+ },
390
+ default: {
391
+ bodyMapper: Mappers.ErrorResponse
392
+ }
393
+ },
394
+ queryParameters: [Parameters.apiVersion],
395
+ urlParameters: [
396
+ Parameters.$host,
397
+ Parameters.subscriptionId,
398
+ Parameters.resourceGroupName,
399
+ Parameters.elasticSanName,
400
+ Parameters.privateEndpointConnectionName
401
+ ],
402
+ headerParameters: [Parameters.accept],
403
+ serializer
404
+ };
405
+ const deleteOperationSpec: coreClient.OperationSpec = {
406
+ path:
407
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}",
408
+ httpMethod: "DELETE",
409
+ responses: {
410
+ 200: {},
411
+ 201: {},
412
+ 202: {},
413
+ 204: {},
414
+ default: {
415
+ bodyMapper: Mappers.ErrorResponse
416
+ }
417
+ },
418
+ queryParameters: [Parameters.apiVersion],
419
+ urlParameters: [
420
+ Parameters.$host,
421
+ Parameters.subscriptionId,
422
+ Parameters.resourceGroupName,
423
+ Parameters.elasticSanName,
424
+ Parameters.privateEndpointConnectionName
425
+ ],
426
+ headerParameters: [Parameters.accept],
427
+ serializer
428
+ };
429
+ const listOperationSpec: coreClient.OperationSpec = {
430
+ path:
431
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections",
432
+ httpMethod: "GET",
433
+ responses: {
434
+ 200: {
435
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
436
+ },
437
+ default: {
438
+ bodyMapper: Mappers.ErrorResponse
439
+ }
440
+ },
441
+ queryParameters: [Parameters.apiVersion],
442
+ urlParameters: [
443
+ Parameters.$host,
444
+ Parameters.subscriptionId,
445
+ Parameters.resourceGroupName,
446
+ Parameters.elasticSanName
447
+ ],
448
+ headerParameters: [Parameters.accept],
449
+ serializer
450
+ };
@@ -0,0 +1,72 @@
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
+ import { PrivateLinkResources } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { ElasticSanManagement } from "../elasticSanManagement";
14
+ import {
15
+ PrivateLinkResourcesListByElasticSanOptionalParams,
16
+ PrivateLinkResourcesListByElasticSanResponse
17
+ } from "../models";
18
+
19
+ /** Class containing PrivateLinkResources operations. */
20
+ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
21
+ private readonly client: ElasticSanManagement;
22
+
23
+ /**
24
+ * Initialize a new instance of the class PrivateLinkResources class.
25
+ * @param client Reference to the service client
26
+ */
27
+ constructor(client: ElasticSanManagement) {
28
+ this.client = client;
29
+ }
30
+
31
+ /**
32
+ * Gets the private link resources that need to be created for a elastic San.
33
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
34
+ * @param elasticSanName The name of the ElasticSan.
35
+ * @param options The options parameters.
36
+ */
37
+ listByElasticSan(
38
+ resourceGroupName: string,
39
+ elasticSanName: string,
40
+ options?: PrivateLinkResourcesListByElasticSanOptionalParams
41
+ ): Promise<PrivateLinkResourcesListByElasticSanResponse> {
42
+ return this.client.sendOperationRequest(
43
+ { resourceGroupName, elasticSanName, options },
44
+ listByElasticSanOperationSpec
45
+ );
46
+ }
47
+ }
48
+ // Operation Specifications
49
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
50
+
51
+ const listByElasticSanOperationSpec: coreClient.OperationSpec = {
52
+ path:
53
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateLinkResources",
54
+ httpMethod: "GET",
55
+ responses: {
56
+ 200: {
57
+ bodyMapper: Mappers.PrivateLinkResourceListResult
58
+ },
59
+ default: {
60
+ bodyMapper: Mappers.ErrorResponse
61
+ }
62
+ },
63
+ queryParameters: [Parameters.apiVersion],
64
+ urlParameters: [
65
+ Parameters.$host,
66
+ Parameters.subscriptionId,
67
+ Parameters.resourceGroupName,
68
+ Parameters.elasticSanName
69
+ ],
70
+ headerParameters: [Parameters.accept],
71
+ serializer
72
+ };
@@ -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 { Skus } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -46,16 +46,21 @@ export class SkusImpl implements Skus {
46
46
  [Symbol.asyncIterator]() {
47
47
  return this;
48
48
  },
49
- byPage: () => {
50
- return this.listPagingPage(options);
49
+ byPage: (settings?: PageSettings) => {
50
+ if (settings?.maxPageSize) {
51
+ throw new Error("maxPageSize is not supported by this operation.");
52
+ }
53
+ return this.listPagingPage(options, settings);
51
54
  }
52
55
  };
53
56
  }
54
57
 
55
58
  private async *listPagingPage(
56
- options?: SkusListOptionalParams
59
+ options?: SkusListOptionalParams,
60
+ _settings?: PageSettings
57
61
  ): AsyncIterableIterator<SkuInformation[]> {
58
- let result = await this._list(options);
62
+ let result: SkusListResponse;
63
+ result = await this._list(options);
59
64
  yield result.value || [];
60
65
  }
61
66
 
@@ -86,7 +91,7 @@ const listOperationSpec: coreClient.OperationSpec = {
86
91
  bodyMapper: Mappers.SkuInformationList
87
92
  },
88
93
  default: {
89
- bodyMapper: Mappers.ErrorModel
94
+ bodyMapper: Mappers.ErrorResponse
90
95
  }
91
96
  },
92
97
  queryParameters: [Parameters.apiVersion, Parameters.filter],