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