@azure/arm-elasticsan 1.0.0-beta.1 → 1.0.0-beta.2
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.
- package/CHANGELOG.md +64 -0
- package/LICENSE +1 -1
- package/dist/index.js +1245 -374
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/elasticSansCreateSample.js +25 -17
- package/dist-esm/samples-dev/elasticSansCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/elasticSansDeleteSample.js +17 -10
- package/dist-esm/samples-dev/elasticSansDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/elasticSansGetSample.js +17 -10
- package/dist-esm/samples-dev/elasticSansGetSample.js.map +1 -1
- package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js +39 -18
- package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js +37 -16
- package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/elasticSansUpdateSample.js +20 -13
- package/dist-esm/samples-dev/elasticSansUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +39 -16
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js +74 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +58 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +58 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +98 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.js +56 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.js.map +1 -0
- package/dist-esm/samples-dev/skusListSample.js +38 -17
- package/dist-esm/samples-dev/skusListSample.js.map +1 -1
- package/dist-esm/samples-dev/volumeGroupsCreateSample.js +24 -15
- package/dist-esm/samples-dev/volumeGroupsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.js +19 -12
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/volumeGroupsGetSample.js +19 -12
- package/dist-esm/samples-dev/volumeGroupsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js +41 -20
- package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js.map +1 -1
- package/dist-esm/samples-dev/volumeGroupsUpdateSample.js +24 -15
- package/dist-esm/samples-dev/volumeGroupsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/volumesCreateSample.js +24 -18
- package/dist-esm/samples-dev/volumesCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/volumesDeleteSample.js +21 -14
- package/dist-esm/samples-dev/volumesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/volumesGetSample.js +21 -14
- package/dist-esm/samples-dev/volumesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js +43 -22
- package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/volumesUpdateSample.js +22 -18
- package/dist-esm/samples-dev/volumesUpdateSample.js.map +1 -1
- package/dist-esm/src/elasticSanManagement.d.ts +3 -1
- package/dist-esm/src/elasticSanManagement.d.ts.map +1 -1
- package/dist-esm/src/elasticSanManagement.js +8 -9
- package/dist-esm/src/elasticSanManagement.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +331 -124
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +28 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +20 -6
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +400 -112
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +2 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +16 -3
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/elasticSans.d.ts +4 -4
- package/dist-esm/src/operations/elasticSans.d.ts.map +1 -1
- package/dist-esm/src/operations/elasticSans.js +98 -51
- package/dist-esm/src/operations/elasticSans.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +2 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts +2 -2
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +22 -11
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +73 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +334 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +53 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/skus.d.ts.map +1 -1
- package/dist-esm/src/operations/skus.js +21 -10
- package/dist-esm/src/operations/skus.js.map +1 -1
- package/dist-esm/src/operations/volumeGroups.d.ts +4 -4
- package/dist-esm/src/operations/volumeGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/volumeGroups.js +78 -48
- package/dist-esm/src/operations/volumeGroups.js.map +1 -1
- package/dist-esm/src/operations/volumes.d.ts +4 -4
- package/dist-esm/src/operations/volumes.d.ts.map +1 -1
- package/dist-esm/src/operations/volumes.js +86 -56
- package/dist-esm/src/operations/volumes.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/elasticSans.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/elasticSans.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +2 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/operations.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/volumes.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/volumes.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/elasticsan_examples.spec.js +12 -5
- package/dist-esm/test/elasticsan_examples.spec.js.map +1 -1
- package/package.json +11 -10
- package/review/arm-elasticsan.api.md +229 -60
- package/src/elasticSanManagement.ts +16 -9
- package/src/index.ts +1 -0
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +334 -93
- package/src/models/mappers.ts +429 -114
- package/src/models/parameters.ts +19 -3
- package/src/operations/elasticSans.ts +97 -60
- package/src/operations/index.ts +2 -0
- package/src/operations/operations.ts +16 -11
- package/src/operations/privateEndpointConnections.ts +450 -0
- package/src/operations/privateLinkResources.ts +72 -0
- package/src/operations/skus.ts +11 -6
- package/src/operations/volumeGroups.ts +76 -53
- package/src/operations/volumes.ts +82 -53
- package/src/operationsInterfaces/elasticSans.ts +6 -6
- package/src/operationsInterfaces/index.ts +2 -0
- package/src/operationsInterfaces/operations.ts +2 -2
- package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
- package/src/operationsInterfaces/privateLinkResources.ts +27 -0
- package/src/operationsInterfaces/volumeGroups.ts +6 -6
- package/src/operationsInterfaces/volumes.ts +10 -4
- package/src/pagingHelper.ts +39 -0
- package/types/arm-elasticsan.d.ts +409 -98
- package/types/tsdoc-metadata.json +1 -1
package/src/models/parameters.ts
CHANGED
|
@@ -17,7 +17,8 @@ import {
|
|
|
17
17
|
VolumeGroup as VolumeGroupMapper,
|
|
18
18
|
VolumeGroupUpdate as VolumeGroupUpdateMapper,
|
|
19
19
|
Volume as VolumeMapper,
|
|
20
|
-
VolumeUpdate as VolumeUpdateMapper
|
|
20
|
+
VolumeUpdate as VolumeUpdateMapper,
|
|
21
|
+
PrivateEndpointConnection as PrivateEndpointConnectionMapper
|
|
21
22
|
} from "../models/mappers";
|
|
22
23
|
|
|
23
24
|
export const accept: OperationParameter = {
|
|
@@ -47,7 +48,7 @@ export const $host: OperationURLParameter = {
|
|
|
47
48
|
export const apiVersion: OperationQueryParameter = {
|
|
48
49
|
parameterPath: "apiVersion",
|
|
49
50
|
mapper: {
|
|
50
|
-
defaultValue: "
|
|
51
|
+
defaultValue: "2022-12-01-preview",
|
|
51
52
|
isConstant: true,
|
|
52
53
|
serializedName: "api-version",
|
|
53
54
|
type: {
|
|
@@ -84,7 +85,6 @@ export const resourceGroupName: OperationURLParameter = {
|
|
|
84
85
|
parameterPath: "resourceGroupName",
|
|
85
86
|
mapper: {
|
|
86
87
|
constraints: {
|
|
87
|
-
Pattern: new RegExp("^[-\\w\\._]*[0-9A-Za-z]$"),
|
|
88
88
|
MaxLength: 90,
|
|
89
89
|
MinLength: 1
|
|
90
90
|
},
|
|
@@ -197,3 +197,19 @@ export const parameters5: OperationParameter = {
|
|
|
197
197
|
parameterPath: "parameters",
|
|
198
198
|
mapper: VolumeUpdateMapper
|
|
199
199
|
};
|
|
200
|
+
|
|
201
|
+
export const parameters6: OperationParameter = {
|
|
202
|
+
parameterPath: "parameters",
|
|
203
|
+
mapper: PrivateEndpointConnectionMapper
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const privateEndpointConnectionName: OperationURLParameter = {
|
|
207
|
+
parameterPath: "privateEndpointConnectionName",
|
|
208
|
+
mapper: {
|
|
209
|
+
serializedName: "privateEndpointConnectionName",
|
|
210
|
+
required: true,
|
|
211
|
+
type: {
|
|
212
|
+
name: "String"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
@@ -6,21 +6,26 @@
|
|
|
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 { ElasticSans } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
13
14
|
import * as Parameters from "../models/parameters";
|
|
14
15
|
import { ElasticSanManagement } from "../elasticSanManagement";
|
|
15
|
-
import {
|
|
16
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
17
22
|
import {
|
|
18
23
|
ElasticSan,
|
|
19
24
|
ElasticSansListBySubscriptionNextOptionalParams,
|
|
20
25
|
ElasticSansListBySubscriptionOptionalParams,
|
|
26
|
+
ElasticSansListBySubscriptionResponse,
|
|
21
27
|
ElasticSansListByResourceGroupNextOptionalParams,
|
|
22
28
|
ElasticSansListByResourceGroupOptionalParams,
|
|
23
|
-
ElasticSansListBySubscriptionResponse,
|
|
24
29
|
ElasticSansListByResourceGroupResponse,
|
|
25
30
|
ElasticSansCreateOptionalParams,
|
|
26
31
|
ElasticSansCreateResponse,
|
|
@@ -62,22 +67,34 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
62
67
|
[Symbol.asyncIterator]() {
|
|
63
68
|
return this;
|
|
64
69
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
-
|
|
70
|
+
byPage: (settings?: PageSettings) => {
|
|
71
|
+
if (settings?.maxPageSize) {
|
|
72
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
73
|
+
}
|
|
74
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
67
75
|
}
|
|
68
76
|
};
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
private async *listBySubscriptionPagingPage(
|
|
72
|
-
options?: ElasticSansListBySubscriptionOptionalParams
|
|
80
|
+
options?: ElasticSansListBySubscriptionOptionalParams,
|
|
81
|
+
settings?: PageSettings
|
|
73
82
|
): AsyncIterableIterator<ElasticSan[]> {
|
|
74
|
-
let result
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
let result: ElasticSansListBySubscriptionResponse;
|
|
84
|
+
let continuationToken = settings?.continuationToken;
|
|
85
|
+
if (!continuationToken) {
|
|
86
|
+
result = await this._listBySubscription(options);
|
|
87
|
+
let page = result.value || [];
|
|
88
|
+
continuationToken = result.nextLink;
|
|
89
|
+
setContinuationToken(page, continuationToken);
|
|
90
|
+
yield page;
|
|
91
|
+
}
|
|
77
92
|
while (continuationToken) {
|
|
78
93
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
79
94
|
continuationToken = result.nextLink;
|
|
80
|
-
|
|
95
|
+
let page = result.value || [];
|
|
96
|
+
setContinuationToken(page, continuationToken);
|
|
97
|
+
yield page;
|
|
81
98
|
}
|
|
82
99
|
}
|
|
83
100
|
|
|
@@ -106,19 +123,33 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
106
123
|
[Symbol.asyncIterator]() {
|
|
107
124
|
return this;
|
|
108
125
|
},
|
|
109
|
-
byPage: () => {
|
|
110
|
-
|
|
126
|
+
byPage: (settings?: PageSettings) => {
|
|
127
|
+
if (settings?.maxPageSize) {
|
|
128
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
129
|
+
}
|
|
130
|
+
return this.listByResourceGroupPagingPage(
|
|
131
|
+
resourceGroupName,
|
|
132
|
+
options,
|
|
133
|
+
settings
|
|
134
|
+
);
|
|
111
135
|
}
|
|
112
136
|
};
|
|
113
137
|
}
|
|
114
138
|
|
|
115
139
|
private async *listByResourceGroupPagingPage(
|
|
116
140
|
resourceGroupName: string,
|
|
117
|
-
options?: ElasticSansListByResourceGroupOptionalParams
|
|
141
|
+
options?: ElasticSansListByResourceGroupOptionalParams,
|
|
142
|
+
settings?: PageSettings
|
|
118
143
|
): AsyncIterableIterator<ElasticSan[]> {
|
|
119
|
-
let result
|
|
120
|
-
|
|
121
|
-
|
|
144
|
+
let result: ElasticSansListByResourceGroupResponse;
|
|
145
|
+
let continuationToken = settings?.continuationToken;
|
|
146
|
+
if (!continuationToken) {
|
|
147
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
148
|
+
let page = result.value || [];
|
|
149
|
+
continuationToken = result.nextLink;
|
|
150
|
+
setContinuationToken(page, continuationToken);
|
|
151
|
+
yield page;
|
|
152
|
+
}
|
|
122
153
|
while (continuationToken) {
|
|
123
154
|
result = await this._listByResourceGroupNext(
|
|
124
155
|
resourceGroupName,
|
|
@@ -126,7 +157,9 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
126
157
|
options
|
|
127
158
|
);
|
|
128
159
|
continuationToken = result.nextLink;
|
|
129
|
-
|
|
160
|
+
let page = result.value || [];
|
|
161
|
+
setContinuationToken(page, continuationToken);
|
|
162
|
+
yield page;
|
|
130
163
|
}
|
|
131
164
|
}
|
|
132
165
|
|
|
@@ -183,8 +216,8 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
183
216
|
parameters: ElasticSan,
|
|
184
217
|
options?: ElasticSansCreateOptionalParams
|
|
185
218
|
): Promise<
|
|
186
|
-
|
|
187
|
-
|
|
219
|
+
SimplePollerLike<
|
|
220
|
+
OperationState<ElasticSansCreateResponse>,
|
|
188
221
|
ElasticSansCreateResponse
|
|
189
222
|
>
|
|
190
223
|
> {
|
|
@@ -194,7 +227,7 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
194
227
|
): Promise<ElasticSansCreateResponse> => {
|
|
195
228
|
return this.client.sendOperationRequest(args, spec);
|
|
196
229
|
};
|
|
197
|
-
const
|
|
230
|
+
const sendOperationFn = async (
|
|
198
231
|
args: coreClient.OperationArguments,
|
|
199
232
|
spec: coreClient.OperationSpec
|
|
200
233
|
) => {
|
|
@@ -227,15 +260,18 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
227
260
|
};
|
|
228
261
|
};
|
|
229
262
|
|
|
230
|
-
const lro =
|
|
231
|
-
|
|
232
|
-
{ resourceGroupName, elasticSanName, parameters, options },
|
|
233
|
-
createOperationSpec
|
|
234
|
-
);
|
|
235
|
-
const poller =
|
|
236
|
-
|
|
263
|
+
const lro = createLroSpec({
|
|
264
|
+
sendOperationFn,
|
|
265
|
+
args: { resourceGroupName, elasticSanName, parameters, options },
|
|
266
|
+
spec: createOperationSpec
|
|
267
|
+
});
|
|
268
|
+
const poller = await createHttpPoller<
|
|
269
|
+
ElasticSansCreateResponse,
|
|
270
|
+
OperationState<ElasticSansCreateResponse>
|
|
271
|
+
>(lro, {
|
|
272
|
+
restoreFrom: options?.resumeFrom,
|
|
237
273
|
intervalInMs: options?.updateIntervalInMs,
|
|
238
|
-
|
|
274
|
+
resourceLocationConfig: "location"
|
|
239
275
|
});
|
|
240
276
|
await poller.poll();
|
|
241
277
|
return poller;
|
|
@@ -276,8 +312,8 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
276
312
|
parameters: ElasticSanUpdate,
|
|
277
313
|
options?: ElasticSansUpdateOptionalParams
|
|
278
314
|
): Promise<
|
|
279
|
-
|
|
280
|
-
|
|
315
|
+
SimplePollerLike<
|
|
316
|
+
OperationState<ElasticSansUpdateResponse>,
|
|
281
317
|
ElasticSansUpdateResponse
|
|
282
318
|
>
|
|
283
319
|
> {
|
|
@@ -287,7 +323,7 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
287
323
|
): Promise<ElasticSansUpdateResponse> => {
|
|
288
324
|
return this.client.sendOperationRequest(args, spec);
|
|
289
325
|
};
|
|
290
|
-
const
|
|
326
|
+
const sendOperationFn = async (
|
|
291
327
|
args: coreClient.OperationArguments,
|
|
292
328
|
spec: coreClient.OperationSpec
|
|
293
329
|
) => {
|
|
@@ -320,15 +356,18 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
320
356
|
};
|
|
321
357
|
};
|
|
322
358
|
|
|
323
|
-
const lro =
|
|
324
|
-
|
|
325
|
-
{ resourceGroupName, elasticSanName, parameters, options },
|
|
326
|
-
updateOperationSpec
|
|
327
|
-
);
|
|
328
|
-
const poller =
|
|
329
|
-
|
|
359
|
+
const lro = createLroSpec({
|
|
360
|
+
sendOperationFn,
|
|
361
|
+
args: { resourceGroupName, elasticSanName, parameters, options },
|
|
362
|
+
spec: updateOperationSpec
|
|
363
|
+
});
|
|
364
|
+
const poller = await createHttpPoller<
|
|
365
|
+
ElasticSansUpdateResponse,
|
|
366
|
+
OperationState<ElasticSansUpdateResponse>
|
|
367
|
+
>(lro, {
|
|
368
|
+
restoreFrom: options?.resumeFrom,
|
|
330
369
|
intervalInMs: options?.updateIntervalInMs,
|
|
331
|
-
|
|
370
|
+
resourceLocationConfig: "location"
|
|
332
371
|
});
|
|
333
372
|
await poller.poll();
|
|
334
373
|
return poller;
|
|
@@ -366,14 +405,14 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
366
405
|
resourceGroupName: string,
|
|
367
406
|
elasticSanName: string,
|
|
368
407
|
options?: ElasticSansDeleteOptionalParams
|
|
369
|
-
): Promise<
|
|
408
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
370
409
|
const directSendOperation = async (
|
|
371
410
|
args: coreClient.OperationArguments,
|
|
372
411
|
spec: coreClient.OperationSpec
|
|
373
412
|
): Promise<void> => {
|
|
374
413
|
return this.client.sendOperationRequest(args, spec);
|
|
375
414
|
};
|
|
376
|
-
const
|
|
415
|
+
const sendOperationFn = async (
|
|
377
416
|
args: coreClient.OperationArguments,
|
|
378
417
|
spec: coreClient.OperationSpec
|
|
379
418
|
) => {
|
|
@@ -406,15 +445,15 @@ export class ElasticSansImpl implements ElasticSans {
|
|
|
406
445
|
};
|
|
407
446
|
};
|
|
408
447
|
|
|
409
|
-
const lro =
|
|
410
|
-
|
|
411
|
-
{ resourceGroupName, elasticSanName, options },
|
|
412
|
-
deleteOperationSpec
|
|
413
|
-
);
|
|
414
|
-
const poller =
|
|
415
|
-
|
|
448
|
+
const lro = createLroSpec({
|
|
449
|
+
sendOperationFn,
|
|
450
|
+
args: { resourceGroupName, elasticSanName, options },
|
|
451
|
+
spec: deleteOperationSpec
|
|
452
|
+
});
|
|
453
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
454
|
+
restoreFrom: options?.resumeFrom,
|
|
416
455
|
intervalInMs: options?.updateIntervalInMs,
|
|
417
|
-
|
|
456
|
+
resourceLocationConfig: "location"
|
|
418
457
|
});
|
|
419
458
|
await poller.poll();
|
|
420
459
|
return poller;
|
|
@@ -500,7 +539,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
|
500
539
|
bodyMapper: Mappers.ElasticSanList
|
|
501
540
|
},
|
|
502
541
|
default: {
|
|
503
|
-
bodyMapper: Mappers.
|
|
542
|
+
bodyMapper: Mappers.ErrorResponse
|
|
504
543
|
}
|
|
505
544
|
},
|
|
506
545
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -517,7 +556,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
|
517
556
|
bodyMapper: Mappers.ElasticSanList
|
|
518
557
|
},
|
|
519
558
|
default: {
|
|
520
|
-
bodyMapper: Mappers.
|
|
559
|
+
bodyMapper: Mappers.ErrorResponse
|
|
521
560
|
}
|
|
522
561
|
},
|
|
523
562
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -547,7 +586,7 @@ const createOperationSpec: coreClient.OperationSpec = {
|
|
|
547
586
|
bodyMapper: Mappers.ElasticSan
|
|
548
587
|
},
|
|
549
588
|
default: {
|
|
550
|
-
bodyMapper: Mappers.
|
|
589
|
+
bodyMapper: Mappers.ErrorResponse
|
|
551
590
|
}
|
|
552
591
|
},
|
|
553
592
|
requestBody: Parameters.parameters,
|
|
@@ -580,7 +619,7 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
580
619
|
bodyMapper: Mappers.ElasticSan
|
|
581
620
|
},
|
|
582
621
|
default: {
|
|
583
|
-
bodyMapper: Mappers.
|
|
622
|
+
bodyMapper: Mappers.ErrorResponse
|
|
584
623
|
}
|
|
585
624
|
},
|
|
586
625
|
requestBody: Parameters.parameters1,
|
|
@@ -605,7 +644,7 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
|
605
644
|
202: {},
|
|
606
645
|
204: {},
|
|
607
646
|
default: {
|
|
608
|
-
bodyMapper: Mappers.
|
|
647
|
+
bodyMapper: Mappers.ErrorResponse
|
|
609
648
|
}
|
|
610
649
|
},
|
|
611
650
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -627,7 +666,7 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|
|
627
666
|
bodyMapper: Mappers.ElasticSan
|
|
628
667
|
},
|
|
629
668
|
default: {
|
|
630
|
-
bodyMapper: Mappers.
|
|
669
|
+
bodyMapper: Mappers.ErrorResponse
|
|
631
670
|
}
|
|
632
671
|
},
|
|
633
672
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -648,10 +687,9 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
|
648
687
|
bodyMapper: Mappers.ElasticSanList
|
|
649
688
|
},
|
|
650
689
|
default: {
|
|
651
|
-
bodyMapper: Mappers.
|
|
690
|
+
bodyMapper: Mappers.ErrorResponse
|
|
652
691
|
}
|
|
653
692
|
},
|
|
654
|
-
queryParameters: [Parameters.apiVersion],
|
|
655
693
|
urlParameters: [
|
|
656
694
|
Parameters.$host,
|
|
657
695
|
Parameters.subscriptionId,
|
|
@@ -668,10 +706,9 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
668
706
|
bodyMapper: Mappers.ElasticSanList
|
|
669
707
|
},
|
|
670
708
|
default: {
|
|
671
|
-
bodyMapper: Mappers.
|
|
709
|
+
bodyMapper: Mappers.ErrorResponse
|
|
672
710
|
}
|
|
673
711
|
},
|
|
674
|
-
queryParameters: [Parameters.apiVersion],
|
|
675
712
|
urlParameters: [
|
|
676
713
|
Parameters.$host,
|
|
677
714
|
Parameters.subscriptionId,
|
package/src/operations/index.ts
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
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 { Operations } from "../operationsInterfaces";
|
|
11
11
|
import * as coreClient from "@azure/core-client";
|
|
12
12
|
import * as Mappers from "../models/mappers";
|
|
13
13
|
import * as Parameters from "../models/parameters";
|
|
14
14
|
import { ElasticSanManagement } from "../elasticSanManagement";
|
|
15
15
|
import {
|
|
16
|
-
|
|
16
|
+
Operation,
|
|
17
17
|
OperationsListOptionalParams,
|
|
18
18
|
OperationsListResponse
|
|
19
19
|
} from "../models";
|
|
@@ -37,7 +37,7 @@ export class OperationsImpl implements Operations {
|
|
|
37
37
|
*/
|
|
38
38
|
public list(
|
|
39
39
|
options?: OperationsListOptionalParams
|
|
40
|
-
): PagedAsyncIterableIterator<
|
|
40
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
41
41
|
const iter = this.listPagingAll(options);
|
|
42
42
|
return {
|
|
43
43
|
next() {
|
|
@@ -46,22 +46,27 @@ export class OperationsImpl implements Operations {
|
|
|
46
46
|
[Symbol.asyncIterator]() {
|
|
47
47
|
return this;
|
|
48
48
|
},
|
|
49
|
-
byPage: () => {
|
|
50
|
-
|
|
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?: OperationsListOptionalParams
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
options?: OperationsListOptionalParams,
|
|
60
|
+
_settings?: PageSettings
|
|
61
|
+
): AsyncIterableIterator<Operation[]> {
|
|
62
|
+
let result: OperationsListResponse;
|
|
63
|
+
result = await this._list(options);
|
|
59
64
|
yield result.value || [];
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
private async *listPagingAll(
|
|
63
68
|
options?: OperationsListOptionalParams
|
|
64
|
-
): AsyncIterableIterator<
|
|
69
|
+
): AsyncIterableIterator<Operation> {
|
|
65
70
|
for await (const page of this.listPagingPage(options)) {
|
|
66
71
|
yield* page;
|
|
67
72
|
}
|
|
@@ -85,10 +90,10 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
85
90
|
httpMethod: "GET",
|
|
86
91
|
responses: {
|
|
87
92
|
200: {
|
|
88
|
-
bodyMapper: Mappers.
|
|
93
|
+
bodyMapper: Mappers.OperationListResult
|
|
89
94
|
},
|
|
90
95
|
default: {
|
|
91
|
-
bodyMapper: Mappers.
|
|
96
|
+
bodyMapper: Mappers.ErrorResponse
|
|
92
97
|
}
|
|
93
98
|
},
|
|
94
99
|
queryParameters: [Parameters.apiVersion],
|