@azure/arm-iothub-profile-2020-09-01-hybrid 2.1.1-alpha.20250717.1 → 2.1.1-alpha.20250730.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.
- package/dist/browser/iotHubClient.js +18 -5
- package/dist/browser/iotHubClient.js.map +1 -1
- package/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +9 -4
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/certificates.js +1 -0
- package/dist/browser/operations/certificates.js.map +1 -1
- package/dist/browser/operations/iotHub.js +12 -6
- package/dist/browser/operations/iotHub.js.map +1 -1
- package/dist/browser/operations/iotHubResource.js +210 -331
- package/dist/browser/operations/iotHubResource.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/resourceProviderCommon.js +1 -0
- package/dist/browser/operations/resourceProviderCommon.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/iotHubClient.js +18 -5
- package/dist/commonjs/iotHubClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +9 -4
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/certificates.js +1 -0
- package/dist/commonjs/operations/certificates.js.map +1 -1
- package/dist/commonjs/operations/iotHub.js +12 -6
- package/dist/commonjs/operations/iotHub.js.map +1 -1
- package/dist/commonjs/operations/iotHubResource.js +210 -330
- package/dist/commonjs/operations/iotHubResource.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/resourceProviderCommon.js +1 -0
- package/dist/commonjs/operations/resourceProviderCommon.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/iotHubClient.js +18 -5
- package/dist/esm/iotHubClient.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +9 -4
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/certificates.js +1 -0
- package/dist/esm/operations/certificates.js.map +1 -1
- package/dist/esm/operations/iotHub.js +12 -6
- package/dist/esm/operations/iotHub.js.map +1 -1
- package/dist/esm/operations/iotHubResource.js +210 -331
- package/dist/esm/operations/iotHubResource.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/resourceProviderCommon.js +1 -0
- package/dist/esm/operations/resourceProviderCommon.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/iotHubClient.js +18 -5
- package/dist/react-native/iotHubClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +9 -4
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/certificates.js +1 -0
- package/dist/react-native/operations/certificates.js.map +1 -1
- package/dist/react-native/operations/iotHub.js +12 -6
- package/dist/react-native/operations/iotHub.js.map +1 -1
- package/dist/react-native/operations/iotHubResource.js +210 -331
- package/dist/react-native/operations/iotHubResource.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/resourceProviderCommon.js +1 -0
- package/dist/react-native/operations/resourceProviderCommon.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-iothub-profile-2020-09-01-hybrid-node.api.md +1022 -1022
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing IotHubResource operations. */
|
|
20
20
|
class IotHubResourceImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class IotHubResource class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -39,52 +40,35 @@ class IotHubResourceImpl {
|
|
|
39
40
|
return this;
|
|
40
41
|
},
|
|
41
42
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
43
|
+
if (settings?.maxPageSize) {
|
|
43
44
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
45
|
}
|
|
45
46
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
50
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings?.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = await this._listBySubscription(options);
|
|
55
|
+
let page = result.value || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield page;
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
let page = result.value || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield page;
|
|
66
|
+
}
|
|
68
67
|
}
|
|
69
|
-
listBySubscriptionPagingAll(options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
68
|
+
async *listBySubscriptionPagingAll(options) {
|
|
69
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
70
|
+
yield* page;
|
|
71
|
+
}
|
|
88
72
|
}
|
|
89
73
|
/**
|
|
90
74
|
* Get all the IoT hubs in a resource group.
|
|
@@ -101,52 +85,35 @@ class IotHubResourceImpl {
|
|
|
101
85
|
return this;
|
|
102
86
|
},
|
|
103
87
|
byPage: (settings) => {
|
|
104
|
-
if (settings
|
|
88
|
+
if (settings?.maxPageSize) {
|
|
105
89
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
106
90
|
}
|
|
107
91
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
108
92
|
}
|
|
109
93
|
};
|
|
110
94
|
}
|
|
111
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
});
|
|
95
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
96
|
+
let result;
|
|
97
|
+
let continuationToken = settings?.continuationToken;
|
|
98
|
+
if (!continuationToken) {
|
|
99
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
continuationToken = result.nextLink;
|
|
102
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
103
|
+
yield page;
|
|
104
|
+
}
|
|
105
|
+
while (continuationToken) {
|
|
106
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
let page = result.value || [];
|
|
109
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
110
|
+
yield page;
|
|
111
|
+
}
|
|
130
112
|
}
|
|
131
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
136
|
-
_c = _f.value;
|
|
137
|
-
_d = false;
|
|
138
|
-
const page = _c;
|
|
139
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
143
|
-
finally {
|
|
144
|
-
try {
|
|
145
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
146
|
-
}
|
|
147
|
-
finally { if (e_2) throw e_2.error; }
|
|
148
|
-
}
|
|
149
|
-
});
|
|
113
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
114
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
115
|
+
yield* page;
|
|
116
|
+
}
|
|
150
117
|
}
|
|
151
118
|
/**
|
|
152
119
|
* Get the list of valid SKUs for an IoT hub.
|
|
@@ -164,52 +131,35 @@ class IotHubResourceImpl {
|
|
|
164
131
|
return this;
|
|
165
132
|
},
|
|
166
133
|
byPage: (settings) => {
|
|
167
|
-
if (settings
|
|
134
|
+
if (settings?.maxPageSize) {
|
|
168
135
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
169
136
|
}
|
|
170
137
|
return this.getValidSkusPagingPage(resourceGroupName, resourceName, options, settings);
|
|
171
138
|
}
|
|
172
139
|
};
|
|
173
140
|
}
|
|
174
|
-
getValidSkusPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
});
|
|
141
|
+
async *getValidSkusPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
142
|
+
let result;
|
|
143
|
+
let continuationToken = settings?.continuationToken;
|
|
144
|
+
if (!continuationToken) {
|
|
145
|
+
result = await this._getValidSkus(resourceGroupName, resourceName, options);
|
|
146
|
+
let page = result.value || [];
|
|
147
|
+
continuationToken = result.nextLink;
|
|
148
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
149
|
+
yield page;
|
|
150
|
+
}
|
|
151
|
+
while (continuationToken) {
|
|
152
|
+
result = await this._getValidSkusNext(resourceGroupName, resourceName, continuationToken, options);
|
|
153
|
+
continuationToken = result.nextLink;
|
|
154
|
+
let page = result.value || [];
|
|
155
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
156
|
+
yield page;
|
|
157
|
+
}
|
|
193
158
|
}
|
|
194
|
-
getValidSkusPagingAll(resourceGroupName, resourceName, options) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.getValidSkusPagingPage(resourceGroupName, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
199
|
-
_c = _f.value;
|
|
200
|
-
_d = false;
|
|
201
|
-
const page = _c;
|
|
202
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
206
|
-
finally {
|
|
207
|
-
try {
|
|
208
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
209
|
-
}
|
|
210
|
-
finally { if (e_3) throw e_3.error; }
|
|
211
|
-
}
|
|
212
|
-
});
|
|
159
|
+
async *getValidSkusPagingAll(resourceGroupName, resourceName, options) {
|
|
160
|
+
for await (const page of this.getValidSkusPagingPage(resourceGroupName, resourceName, options)) {
|
|
161
|
+
yield* page;
|
|
162
|
+
}
|
|
213
163
|
}
|
|
214
164
|
/**
|
|
215
165
|
* Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT
|
|
@@ -229,52 +179,35 @@ class IotHubResourceImpl {
|
|
|
229
179
|
return this;
|
|
230
180
|
},
|
|
231
181
|
byPage: (settings) => {
|
|
232
|
-
if (settings
|
|
182
|
+
if (settings?.maxPageSize) {
|
|
233
183
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
234
184
|
}
|
|
235
185
|
return this.listEventHubConsumerGroupsPagingPage(resourceGroupName, resourceName, eventHubEndpointName, options, settings);
|
|
236
186
|
}
|
|
237
187
|
};
|
|
238
188
|
}
|
|
239
|
-
listEventHubConsumerGroupsPagingPage(resourceGroupName, resourceName, eventHubEndpointName, options, settings) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
});
|
|
189
|
+
async *listEventHubConsumerGroupsPagingPage(resourceGroupName, resourceName, eventHubEndpointName, options, settings) {
|
|
190
|
+
let result;
|
|
191
|
+
let continuationToken = settings?.continuationToken;
|
|
192
|
+
if (!continuationToken) {
|
|
193
|
+
result = await this._listEventHubConsumerGroups(resourceGroupName, resourceName, eventHubEndpointName, options);
|
|
194
|
+
let page = result.value || [];
|
|
195
|
+
continuationToken = result.nextLink;
|
|
196
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
197
|
+
yield page;
|
|
198
|
+
}
|
|
199
|
+
while (continuationToken) {
|
|
200
|
+
result = await this._listEventHubConsumerGroupsNext(resourceGroupName, resourceName, eventHubEndpointName, continuationToken, options);
|
|
201
|
+
continuationToken = result.nextLink;
|
|
202
|
+
let page = result.value || [];
|
|
203
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
204
|
+
yield page;
|
|
205
|
+
}
|
|
258
206
|
}
|
|
259
|
-
listEventHubConsumerGroupsPagingAll(resourceGroupName, resourceName, eventHubEndpointName, options) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listEventHubConsumerGroupsPagingPage(resourceGroupName, resourceName, eventHubEndpointName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
264
|
-
_c = _f.value;
|
|
265
|
-
_d = false;
|
|
266
|
-
const page = _c;
|
|
267
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
271
|
-
finally {
|
|
272
|
-
try {
|
|
273
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
274
|
-
}
|
|
275
|
-
finally { if (e_4) throw e_4.error; }
|
|
276
|
-
}
|
|
277
|
-
});
|
|
207
|
+
async *listEventHubConsumerGroupsPagingAll(resourceGroupName, resourceName, eventHubEndpointName, options) {
|
|
208
|
+
for await (const page of this.listEventHubConsumerGroupsPagingPage(resourceGroupName, resourceName, eventHubEndpointName, options)) {
|
|
209
|
+
yield* page;
|
|
210
|
+
}
|
|
278
211
|
}
|
|
279
212
|
/**
|
|
280
213
|
* Get a list of all the jobs in an IoT hub. For more information, see:
|
|
@@ -293,52 +226,35 @@ class IotHubResourceImpl {
|
|
|
293
226
|
return this;
|
|
294
227
|
},
|
|
295
228
|
byPage: (settings) => {
|
|
296
|
-
if (settings
|
|
229
|
+
if (settings?.maxPageSize) {
|
|
297
230
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
298
231
|
}
|
|
299
232
|
return this.listJobsPagingPage(resourceGroupName, resourceName, options, settings);
|
|
300
233
|
}
|
|
301
234
|
};
|
|
302
235
|
}
|
|
303
|
-
listJobsPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
});
|
|
236
|
+
async *listJobsPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
237
|
+
let result;
|
|
238
|
+
let continuationToken = settings?.continuationToken;
|
|
239
|
+
if (!continuationToken) {
|
|
240
|
+
result = await this._listJobs(resourceGroupName, resourceName, options);
|
|
241
|
+
let page = result.value || [];
|
|
242
|
+
continuationToken = result.nextLink;
|
|
243
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
244
|
+
yield page;
|
|
245
|
+
}
|
|
246
|
+
while (continuationToken) {
|
|
247
|
+
result = await this._listJobsNext(resourceGroupName, resourceName, continuationToken, options);
|
|
248
|
+
continuationToken = result.nextLink;
|
|
249
|
+
let page = result.value || [];
|
|
250
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
251
|
+
yield page;
|
|
252
|
+
}
|
|
322
253
|
}
|
|
323
|
-
listJobsPagingAll(resourceGroupName, resourceName, options) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listJobsPagingPage(resourceGroupName, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
328
|
-
_c = _f.value;
|
|
329
|
-
_d = false;
|
|
330
|
-
const page = _c;
|
|
331
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
335
|
-
finally {
|
|
336
|
-
try {
|
|
337
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
338
|
-
}
|
|
339
|
-
finally { if (e_5) throw e_5.error; }
|
|
340
|
-
}
|
|
341
|
-
});
|
|
254
|
+
async *listJobsPagingAll(resourceGroupName, resourceName, options) {
|
|
255
|
+
for await (const page of this.listJobsPagingPage(resourceGroupName, resourceName, options)) {
|
|
256
|
+
yield* page;
|
|
257
|
+
}
|
|
342
258
|
}
|
|
343
259
|
/**
|
|
344
260
|
* Get the quota metrics for an IoT hub.
|
|
@@ -356,52 +272,35 @@ class IotHubResourceImpl {
|
|
|
356
272
|
return this;
|
|
357
273
|
},
|
|
358
274
|
byPage: (settings) => {
|
|
359
|
-
if (settings
|
|
275
|
+
if (settings?.maxPageSize) {
|
|
360
276
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
361
277
|
}
|
|
362
278
|
return this.getQuotaMetricsPagingPage(resourceGroupName, resourceName, options, settings);
|
|
363
279
|
}
|
|
364
280
|
};
|
|
365
281
|
}
|
|
366
|
-
getQuotaMetricsPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
});
|
|
282
|
+
async *getQuotaMetricsPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
283
|
+
let result;
|
|
284
|
+
let continuationToken = settings?.continuationToken;
|
|
285
|
+
if (!continuationToken) {
|
|
286
|
+
result = await this._getQuotaMetrics(resourceGroupName, resourceName, options);
|
|
287
|
+
let page = result.value || [];
|
|
288
|
+
continuationToken = result.nextLink;
|
|
289
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
290
|
+
yield page;
|
|
291
|
+
}
|
|
292
|
+
while (continuationToken) {
|
|
293
|
+
result = await this._getQuotaMetricsNext(resourceGroupName, resourceName, continuationToken, options);
|
|
294
|
+
continuationToken = result.nextLink;
|
|
295
|
+
let page = result.value || [];
|
|
296
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
297
|
+
yield page;
|
|
298
|
+
}
|
|
385
299
|
}
|
|
386
|
-
getQuotaMetricsPagingAll(resourceGroupName, resourceName, options) {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.getQuotaMetricsPagingPage(resourceGroupName, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
391
|
-
_c = _f.value;
|
|
392
|
-
_d = false;
|
|
393
|
-
const page = _c;
|
|
394
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
398
|
-
finally {
|
|
399
|
-
try {
|
|
400
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
401
|
-
}
|
|
402
|
-
finally { if (e_6) throw e_6.error; }
|
|
403
|
-
}
|
|
404
|
-
});
|
|
300
|
+
async *getQuotaMetricsPagingAll(resourceGroupName, resourceName, options) {
|
|
301
|
+
for await (const page of this.getQuotaMetricsPagingPage(resourceGroupName, resourceName, options)) {
|
|
302
|
+
yield* page;
|
|
303
|
+
}
|
|
405
304
|
}
|
|
406
305
|
/**
|
|
407
306
|
* Get the health for routing endpoints.
|
|
@@ -419,52 +318,35 @@ class IotHubResourceImpl {
|
|
|
419
318
|
return this;
|
|
420
319
|
},
|
|
421
320
|
byPage: (settings) => {
|
|
422
|
-
if (settings
|
|
321
|
+
if (settings?.maxPageSize) {
|
|
423
322
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
424
323
|
}
|
|
425
324
|
return this.getEndpointHealthPagingPage(resourceGroupName, iotHubName, options, settings);
|
|
426
325
|
}
|
|
427
326
|
};
|
|
428
327
|
}
|
|
429
|
-
getEndpointHealthPagingPage(resourceGroupName, iotHubName, options, settings) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
});
|
|
328
|
+
async *getEndpointHealthPagingPage(resourceGroupName, iotHubName, options, settings) {
|
|
329
|
+
let result;
|
|
330
|
+
let continuationToken = settings?.continuationToken;
|
|
331
|
+
if (!continuationToken) {
|
|
332
|
+
result = await this._getEndpointHealth(resourceGroupName, iotHubName, options);
|
|
333
|
+
let page = result.value || [];
|
|
334
|
+
continuationToken = result.nextLink;
|
|
335
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
336
|
+
yield page;
|
|
337
|
+
}
|
|
338
|
+
while (continuationToken) {
|
|
339
|
+
result = await this._getEndpointHealthNext(resourceGroupName, iotHubName, continuationToken, options);
|
|
340
|
+
continuationToken = result.nextLink;
|
|
341
|
+
let page = result.value || [];
|
|
342
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
343
|
+
yield page;
|
|
344
|
+
}
|
|
448
345
|
}
|
|
449
|
-
getEndpointHealthPagingAll(resourceGroupName, iotHubName, options) {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.getEndpointHealthPagingPage(resourceGroupName, iotHubName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
454
|
-
_c = _f.value;
|
|
455
|
-
_d = false;
|
|
456
|
-
const page = _c;
|
|
457
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
461
|
-
finally {
|
|
462
|
-
try {
|
|
463
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
464
|
-
}
|
|
465
|
-
finally { if (e_7) throw e_7.error; }
|
|
466
|
-
}
|
|
467
|
-
});
|
|
346
|
+
async *getEndpointHealthPagingAll(resourceGroupName, iotHubName, options) {
|
|
347
|
+
for await (const page of this.getEndpointHealthPagingPage(resourceGroupName, iotHubName, options)) {
|
|
348
|
+
yield* page;
|
|
349
|
+
}
|
|
468
350
|
}
|
|
469
351
|
/**
|
|
470
352
|
* Get the security metadata for an IoT hub. For more information, see:
|
|
@@ -483,52 +365,35 @@ class IotHubResourceImpl {
|
|
|
483
365
|
return this;
|
|
484
366
|
},
|
|
485
367
|
byPage: (settings) => {
|
|
486
|
-
if (settings
|
|
368
|
+
if (settings?.maxPageSize) {
|
|
487
369
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
488
370
|
}
|
|
489
371
|
return this.listKeysPagingPage(resourceGroupName, resourceName, options, settings);
|
|
490
372
|
}
|
|
491
373
|
};
|
|
492
374
|
}
|
|
493
|
-
listKeysPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
}
|
|
511
|
-
});
|
|
375
|
+
async *listKeysPagingPage(resourceGroupName, resourceName, options, settings) {
|
|
376
|
+
let result;
|
|
377
|
+
let continuationToken = settings?.continuationToken;
|
|
378
|
+
if (!continuationToken) {
|
|
379
|
+
result = await this._listKeys(resourceGroupName, resourceName, options);
|
|
380
|
+
let page = result.value || [];
|
|
381
|
+
continuationToken = result.nextLink;
|
|
382
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
383
|
+
yield page;
|
|
384
|
+
}
|
|
385
|
+
while (continuationToken) {
|
|
386
|
+
result = await this._listKeysNext(resourceGroupName, resourceName, continuationToken, options);
|
|
387
|
+
continuationToken = result.nextLink;
|
|
388
|
+
let page = result.value || [];
|
|
389
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
390
|
+
yield page;
|
|
391
|
+
}
|
|
512
392
|
}
|
|
513
|
-
listKeysPagingAll(resourceGroupName, resourceName, options) {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listKeysPagingPage(resourceGroupName, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
518
|
-
_c = _f.value;
|
|
519
|
-
_d = false;
|
|
520
|
-
const page = _c;
|
|
521
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
525
|
-
finally {
|
|
526
|
-
try {
|
|
527
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
528
|
-
}
|
|
529
|
-
finally { if (e_8) throw e_8.error; }
|
|
530
|
-
}
|
|
531
|
-
});
|
|
393
|
+
async *listKeysPagingAll(resourceGroupName, resourceName, options) {
|
|
394
|
+
for await (const page of this.listKeysPagingPage(resourceGroupName, resourceName, options)) {
|
|
395
|
+
yield* page;
|
|
396
|
+
}
|
|
532
397
|
}
|
|
533
398
|
/**
|
|
534
399
|
* Get the non-security related metadata of an IoT hub.
|
|
@@ -554,14 +419,19 @@ class IotHubResourceImpl {
|
|
|
554
419
|
return this.client.sendOperationRequest(args, spec);
|
|
555
420
|
};
|
|
556
421
|
const sendOperation = async (args, spec) => {
|
|
557
|
-
var _a;
|
|
558
422
|
let currentRawResponse = undefined;
|
|
559
|
-
const providedCallback =
|
|
423
|
+
const providedCallback = args.options?.onResponse;
|
|
560
424
|
const callback = (rawResponse, flatResponse) => {
|
|
561
425
|
currentRawResponse = rawResponse;
|
|
562
|
-
providedCallback
|
|
426
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
427
|
+
};
|
|
428
|
+
const updatedArgs = {
|
|
429
|
+
...args,
|
|
430
|
+
options: {
|
|
431
|
+
...args.options,
|
|
432
|
+
onResponse: callback
|
|
433
|
+
}
|
|
563
434
|
};
|
|
564
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
565
435
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
566
436
|
return {
|
|
567
437
|
flatResponse,
|
|
@@ -574,8 +444,8 @@ class IotHubResourceImpl {
|
|
|
574
444
|
};
|
|
575
445
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, resourceName, iotHubDescription, options }, createOrUpdateOperationSpec);
|
|
576
446
|
const poller = new core_lro_1.LroEngine(lro, {
|
|
577
|
-
resumeFrom: options
|
|
578
|
-
intervalInMs: options
|
|
447
|
+
resumeFrom: options?.resumeFrom,
|
|
448
|
+
intervalInMs: options?.updateIntervalInMs
|
|
579
449
|
});
|
|
580
450
|
await poller.poll();
|
|
581
451
|
return poller;
|
|
@@ -606,14 +476,19 @@ class IotHubResourceImpl {
|
|
|
606
476
|
return this.client.sendOperationRequest(args, spec);
|
|
607
477
|
};
|
|
608
478
|
const sendOperation = async (args, spec) => {
|
|
609
|
-
var _a;
|
|
610
479
|
let currentRawResponse = undefined;
|
|
611
|
-
const providedCallback =
|
|
480
|
+
const providedCallback = args.options?.onResponse;
|
|
612
481
|
const callback = (rawResponse, flatResponse) => {
|
|
613
482
|
currentRawResponse = rawResponse;
|
|
614
|
-
providedCallback
|
|
483
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
484
|
+
};
|
|
485
|
+
const updatedArgs = {
|
|
486
|
+
...args,
|
|
487
|
+
options: {
|
|
488
|
+
...args.options,
|
|
489
|
+
onResponse: callback
|
|
490
|
+
}
|
|
615
491
|
};
|
|
616
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
617
492
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
618
493
|
return {
|
|
619
494
|
flatResponse,
|
|
@@ -626,8 +501,8 @@ class IotHubResourceImpl {
|
|
|
626
501
|
};
|
|
627
502
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, resourceName, iotHubTags, options }, updateOperationSpec);
|
|
628
503
|
const poller = new core_lro_1.LroEngine(lro, {
|
|
629
|
-
resumeFrom: options
|
|
630
|
-
intervalInMs: options
|
|
504
|
+
resumeFrom: options?.resumeFrom,
|
|
505
|
+
intervalInMs: options?.updateIntervalInMs
|
|
631
506
|
});
|
|
632
507
|
await poller.poll();
|
|
633
508
|
return poller;
|
|
@@ -654,14 +529,19 @@ class IotHubResourceImpl {
|
|
|
654
529
|
return this.client.sendOperationRequest(args, spec);
|
|
655
530
|
};
|
|
656
531
|
const sendOperation = async (args, spec) => {
|
|
657
|
-
var _a;
|
|
658
532
|
let currentRawResponse = undefined;
|
|
659
|
-
const providedCallback =
|
|
533
|
+
const providedCallback = args.options?.onResponse;
|
|
660
534
|
const callback = (rawResponse, flatResponse) => {
|
|
661
535
|
currentRawResponse = rawResponse;
|
|
662
|
-
providedCallback
|
|
536
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
537
|
+
};
|
|
538
|
+
const updatedArgs = {
|
|
539
|
+
...args,
|
|
540
|
+
options: {
|
|
541
|
+
...args.options,
|
|
542
|
+
onResponse: callback
|
|
543
|
+
}
|
|
663
544
|
};
|
|
664
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
665
545
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
666
546
|
return {
|
|
667
547
|
flatResponse,
|
|
@@ -674,8 +554,8 @@ class IotHubResourceImpl {
|
|
|
674
554
|
};
|
|
675
555
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, resourceName, options }, deleteOperationSpec);
|
|
676
556
|
const poller = new core_lro_1.LroEngine(lro, {
|
|
677
|
-
resumeFrom: options
|
|
678
|
-
intervalInMs: options
|
|
557
|
+
resumeFrom: options?.resumeFrom,
|
|
558
|
+
intervalInMs: options?.updateIntervalInMs
|
|
679
559
|
});
|
|
680
560
|
await poller.poll();
|
|
681
561
|
return poller;
|