@aws-sdk/client-braket 3.186.0 → 3.188.0
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 +8 -0
- package/dist-es/Braket.js +54 -61
- package/dist-es/BraketClient.js +22 -28
- package/dist-es/commands/CancelJobCommand.js +21 -28
- package/dist-es/commands/CancelQuantumTaskCommand.js +21 -28
- package/dist-es/commands/CreateJobCommand.js +21 -28
- package/dist-es/commands/CreateQuantumTaskCommand.js +21 -28
- package/dist-es/commands/GetDeviceCommand.js +21 -28
- package/dist-es/commands/GetJobCommand.js +21 -28
- package/dist-es/commands/GetQuantumTaskCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/SearchDevicesCommand.js +21 -28
- package/dist-es/commands/SearchJobsCommand.js +21 -28
- package/dist-es/commands/SearchQuantumTasksCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/BraketServiceException.js +5 -10
- package/dist-es/models/models_0.js +231 -144
- package/dist-es/pagination/SearchDevicesPaginator.js +25 -68
- package/dist-es/pagination/SearchJobsPaginator.js +25 -68
- package/dist-es/pagination/SearchQuantumTasksPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1220 -1581
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { BraketServiceException as __BaseException } from "./BraketServiceException";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
}(__BaseException));
|
|
14
|
-
export { AccessDeniedException };
|
|
13
|
+
}
|
|
15
14
|
export var CompressionType;
|
|
16
15
|
(function (CompressionType) {
|
|
17
16
|
CompressionType["GZIP"] = "GZIP";
|
|
@@ -28,71 +27,71 @@ export var DeviceType;
|
|
|
28
27
|
DeviceType["QPU"] = "QPU";
|
|
29
28
|
DeviceType["SIMULATOR"] = "SIMULATOR";
|
|
30
29
|
})(DeviceType || (DeviceType = {}));
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
export class InternalServiceException extends __BaseException {
|
|
31
|
+
constructor(opts) {
|
|
32
|
+
super({
|
|
33
|
+
name: "InternalServiceException",
|
|
34
|
+
$fault: "server",
|
|
35
|
+
...opts,
|
|
36
|
+
});
|
|
37
|
+
this.name = "InternalServiceException";
|
|
38
|
+
this.$fault = "server";
|
|
39
|
+
Object.setPrototypeOf(this, InternalServiceException.prototype);
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
}
|
|
42
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
43
|
+
constructor(opts) {
|
|
44
|
+
super({
|
|
45
|
+
name: "ResourceNotFoundException",
|
|
46
|
+
$fault: "client",
|
|
47
|
+
...opts,
|
|
48
|
+
});
|
|
49
|
+
this.name = "ResourceNotFoundException";
|
|
50
|
+
this.$fault = "client";
|
|
51
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
}
|
|
54
|
+
export class ThrottlingException extends __BaseException {
|
|
55
|
+
constructor(opts) {
|
|
56
|
+
super({
|
|
57
|
+
name: "ThrottlingException",
|
|
58
|
+
$fault: "client",
|
|
59
|
+
...opts,
|
|
60
|
+
});
|
|
61
|
+
this.name = "ThrottlingException";
|
|
62
|
+
this.$fault = "client";
|
|
63
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
}
|
|
66
|
+
export class ValidationException extends __BaseException {
|
|
67
|
+
constructor(opts) {
|
|
68
|
+
super({
|
|
69
|
+
name: "ValidationException",
|
|
70
|
+
$fault: "client",
|
|
71
|
+
...opts,
|
|
72
|
+
});
|
|
73
|
+
this.name = "ValidationException";
|
|
74
|
+
this.$fault = "client";
|
|
75
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
}(__BaseException));
|
|
78
|
-
export { ValidationException };
|
|
77
|
+
}
|
|
79
78
|
export var CancellationStatus;
|
|
80
79
|
(function (CancellationStatus) {
|
|
81
80
|
CancellationStatus["CANCELLED"] = "CANCELLED";
|
|
82
81
|
CancellationStatus["CANCELLING"] = "CANCELLING";
|
|
83
82
|
})(CancellationStatus || (CancellationStatus = {}));
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
export class ConflictException extends __BaseException {
|
|
84
|
+
constructor(opts) {
|
|
85
|
+
super({
|
|
86
|
+
name: "ConflictException",
|
|
87
|
+
$fault: "client",
|
|
88
|
+
...opts,
|
|
89
|
+
});
|
|
90
|
+
this.name = "ConflictException";
|
|
91
|
+
this.$fault = "client";
|
|
92
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
}(__BaseException));
|
|
95
|
-
export { ConflictException };
|
|
94
|
+
}
|
|
96
95
|
export var _InstanceType;
|
|
97
96
|
(function (_InstanceType) {
|
|
98
97
|
_InstanceType["ML_C4_2XLARGE"] = "ml.c4.2xlarge";
|
|
@@ -135,30 +134,30 @@ export var _InstanceType;
|
|
|
135
134
|
_InstanceType["ML_P3_8XLARGE"] = "ml.p3.8xlarge";
|
|
136
135
|
_InstanceType["ML_P4D_24XLARGE"] = "ml.p4d.24xlarge";
|
|
137
136
|
})(_InstanceType || (_InstanceType = {}));
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
137
|
+
export class DeviceRetiredException extends __BaseException {
|
|
138
|
+
constructor(opts) {
|
|
139
|
+
super({
|
|
140
|
+
name: "DeviceRetiredException",
|
|
141
|
+
$fault: "client",
|
|
142
|
+
...opts,
|
|
143
|
+
});
|
|
144
|
+
this.name = "DeviceRetiredException";
|
|
145
|
+
this.$fault = "client";
|
|
146
|
+
Object.setPrototypeOf(this, DeviceRetiredException.prototype);
|
|
146
147
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
}
|
|
149
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
150
|
+
constructor(opts) {
|
|
151
|
+
super({
|
|
152
|
+
name: "ServiceQuotaExceededException",
|
|
153
|
+
$fault: "client",
|
|
154
|
+
...opts,
|
|
155
|
+
});
|
|
156
|
+
this.name = "ServiceQuotaExceededException";
|
|
157
|
+
this.$fault = "client";
|
|
158
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
158
159
|
}
|
|
159
|
-
|
|
160
|
-
}(__BaseException));
|
|
161
|
-
export { ServiceQuotaExceededException };
|
|
160
|
+
}
|
|
162
161
|
export var JobEventType;
|
|
163
162
|
(function (JobEventType) {
|
|
164
163
|
JobEventType["CANCELLED"] = "CANCELLED";
|
|
@@ -192,18 +191,18 @@ export var SearchJobsFilterOperator;
|
|
|
192
191
|
SearchJobsFilterOperator["LT"] = "LT";
|
|
193
192
|
SearchJobsFilterOperator["LTE"] = "LTE";
|
|
194
193
|
})(SearchJobsFilterOperator || (SearchJobsFilterOperator = {}));
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
194
|
+
export class DeviceOfflineException extends __BaseException {
|
|
195
|
+
constructor(opts) {
|
|
196
|
+
super({
|
|
197
|
+
name: "DeviceOfflineException",
|
|
198
|
+
$fault: "client",
|
|
199
|
+
...opts,
|
|
200
|
+
});
|
|
201
|
+
this.name = "DeviceOfflineException";
|
|
202
|
+
this.$fault = "client";
|
|
203
|
+
Object.setPrototypeOf(this, DeviceOfflineException.prototype);
|
|
203
204
|
}
|
|
204
|
-
|
|
205
|
-
}(__BaseException));
|
|
206
|
-
export { DeviceOfflineException };
|
|
205
|
+
}
|
|
207
206
|
export var QuantumTaskStatus;
|
|
208
207
|
(function (QuantumTaskStatus) {
|
|
209
208
|
QuantumTaskStatus["CANCELLED"] = "CANCELLED";
|
|
@@ -223,47 +222,135 @@ export var SearchQuantumTasksFilterOperator;
|
|
|
223
222
|
SearchQuantumTasksFilterOperator["LT"] = "LT";
|
|
224
223
|
SearchQuantumTasksFilterOperator["LTE"] = "LTE";
|
|
225
224
|
})(SearchQuantumTasksFilterOperator || (SearchQuantumTasksFilterOperator = {}));
|
|
226
|
-
export
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
export
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
export
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
export
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
export
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
export
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
export
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
export
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
export
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
export
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
export
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
export
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
export
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
export
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
export
|
|
269
|
-
|
|
225
|
+
export const ContainerImageFilterSensitiveLog = (obj) => ({
|
|
226
|
+
...obj,
|
|
227
|
+
});
|
|
228
|
+
export const ScriptModeConfigFilterSensitiveLog = (obj) => ({
|
|
229
|
+
...obj,
|
|
230
|
+
});
|
|
231
|
+
export const AlgorithmSpecificationFilterSensitiveLog = (obj) => ({
|
|
232
|
+
...obj,
|
|
233
|
+
});
|
|
234
|
+
export const GetDeviceRequestFilterSensitiveLog = (obj) => ({
|
|
235
|
+
...obj,
|
|
236
|
+
});
|
|
237
|
+
export const GetDeviceResponseFilterSensitiveLog = (obj) => ({
|
|
238
|
+
...obj,
|
|
239
|
+
});
|
|
240
|
+
export const SearchDevicesFilterFilterSensitiveLog = (obj) => ({
|
|
241
|
+
...obj,
|
|
242
|
+
});
|
|
243
|
+
export const SearchDevicesRequestFilterSensitiveLog = (obj) => ({
|
|
244
|
+
...obj,
|
|
245
|
+
});
|
|
246
|
+
export const DeviceSummaryFilterSensitiveLog = (obj) => ({
|
|
247
|
+
...obj,
|
|
248
|
+
});
|
|
249
|
+
export const SearchDevicesResponseFilterSensitiveLog = (obj) => ({
|
|
250
|
+
...obj,
|
|
251
|
+
});
|
|
252
|
+
export const CancelJobRequestFilterSensitiveLog = (obj) => ({
|
|
253
|
+
...obj,
|
|
254
|
+
});
|
|
255
|
+
export const CancelJobResponseFilterSensitiveLog = (obj) => ({
|
|
256
|
+
...obj,
|
|
257
|
+
});
|
|
258
|
+
export const JobCheckpointConfigFilterSensitiveLog = (obj) => ({
|
|
259
|
+
...obj,
|
|
260
|
+
});
|
|
261
|
+
export const DeviceConfigFilterSensitiveLog = (obj) => ({
|
|
262
|
+
...obj,
|
|
263
|
+
});
|
|
264
|
+
export const S3DataSourceFilterSensitiveLog = (obj) => ({
|
|
265
|
+
...obj,
|
|
266
|
+
});
|
|
267
|
+
export const DataSourceFilterSensitiveLog = (obj) => ({
|
|
268
|
+
...obj,
|
|
269
|
+
});
|
|
270
|
+
export const InputFileConfigFilterSensitiveLog = (obj) => ({
|
|
271
|
+
...obj,
|
|
272
|
+
});
|
|
273
|
+
export const InstanceConfigFilterSensitiveLog = (obj) => ({
|
|
274
|
+
...obj,
|
|
275
|
+
});
|
|
276
|
+
export const JobOutputDataConfigFilterSensitiveLog = (obj) => ({
|
|
277
|
+
...obj,
|
|
278
|
+
});
|
|
279
|
+
export const JobStoppingConditionFilterSensitiveLog = (obj) => ({
|
|
280
|
+
...obj,
|
|
281
|
+
});
|
|
282
|
+
export const CreateJobRequestFilterSensitiveLog = (obj) => ({
|
|
283
|
+
...obj,
|
|
284
|
+
});
|
|
285
|
+
export const CreateJobResponseFilterSensitiveLog = (obj) => ({
|
|
286
|
+
...obj,
|
|
287
|
+
});
|
|
288
|
+
export const GetJobRequestFilterSensitiveLog = (obj) => ({
|
|
289
|
+
...obj,
|
|
290
|
+
});
|
|
291
|
+
export const JobEventDetailsFilterSensitiveLog = (obj) => ({
|
|
292
|
+
...obj,
|
|
293
|
+
});
|
|
294
|
+
export const GetJobResponseFilterSensitiveLog = (obj) => ({
|
|
295
|
+
...obj,
|
|
296
|
+
});
|
|
297
|
+
export const SearchJobsFilterFilterSensitiveLog = (obj) => ({
|
|
298
|
+
...obj,
|
|
299
|
+
});
|
|
300
|
+
export const SearchJobsRequestFilterSensitiveLog = (obj) => ({
|
|
301
|
+
...obj,
|
|
302
|
+
});
|
|
303
|
+
export const JobSummaryFilterSensitiveLog = (obj) => ({
|
|
304
|
+
...obj,
|
|
305
|
+
});
|
|
306
|
+
export const SearchJobsResponseFilterSensitiveLog = (obj) => ({
|
|
307
|
+
...obj,
|
|
308
|
+
});
|
|
309
|
+
export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
310
|
+
...obj,
|
|
311
|
+
});
|
|
312
|
+
export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
|
|
313
|
+
...obj,
|
|
314
|
+
});
|
|
315
|
+
export const CancelQuantumTaskRequestFilterSensitiveLog = (obj) => ({
|
|
316
|
+
...obj,
|
|
317
|
+
});
|
|
318
|
+
export const CancelQuantumTaskResponseFilterSensitiveLog = (obj) => ({
|
|
319
|
+
...obj,
|
|
320
|
+
});
|
|
321
|
+
export const CreateQuantumTaskRequestFilterSensitiveLog = (obj) => ({
|
|
322
|
+
...obj,
|
|
323
|
+
});
|
|
324
|
+
export const CreateQuantumTaskResponseFilterSensitiveLog = (obj) => ({
|
|
325
|
+
...obj,
|
|
326
|
+
});
|
|
327
|
+
export const GetQuantumTaskRequestFilterSensitiveLog = (obj) => ({
|
|
328
|
+
...obj,
|
|
329
|
+
});
|
|
330
|
+
export const GetQuantumTaskResponseFilterSensitiveLog = (obj) => ({
|
|
331
|
+
...obj,
|
|
332
|
+
});
|
|
333
|
+
export const SearchQuantumTasksFilterFilterSensitiveLog = (obj) => ({
|
|
334
|
+
...obj,
|
|
335
|
+
});
|
|
336
|
+
export const SearchQuantumTasksRequestFilterSensitiveLog = (obj) => ({
|
|
337
|
+
...obj,
|
|
338
|
+
});
|
|
339
|
+
export const QuantumTaskSummaryFilterSensitiveLog = (obj) => ({
|
|
340
|
+
...obj,
|
|
341
|
+
});
|
|
342
|
+
export const SearchQuantumTasksResponseFilterSensitiveLog = (obj) => ({
|
|
343
|
+
...obj,
|
|
344
|
+
});
|
|
345
|
+
export const TagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
346
|
+
...obj,
|
|
347
|
+
});
|
|
348
|
+
export const TagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
349
|
+
...obj,
|
|
350
|
+
});
|
|
351
|
+
export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
352
|
+
...obj,
|
|
353
|
+
});
|
|
354
|
+
export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
355
|
+
...obj,
|
|
356
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { Braket } from "../Braket";
|
|
3
2
|
import { BraketClient } from "../BraketClient";
|
|
4
3
|
import { SearchDevicesCommand, } from "../commands/SearchDevicesCommand";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i - 2] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
switch (_a.label) {
|
|
13
|
-
case 0: return [4, client.send.apply(client, __spreadArray([new SearchDevicesCommand(input)], __read(args), false))];
|
|
14
|
-
case 1: return [2, _a.sent()];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new SearchDevicesCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
-
args[_i - 2] = arguments[_i];
|
|
23
|
-
}
|
|
24
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
-
return __generator(this, function (_a) {
|
|
26
|
-
switch (_a.label) {
|
|
27
|
-
case 0: return [4, client.searchDevices.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
-
case 1: return [2, _a.sent()];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.searchDevices(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateSearchDevices(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateSearchDevices(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof Braket) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof BraketClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Braket | BraketClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
39
|
-
var token, hasNext, page, prevToken;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
token = config.startingToken || undefined;
|
|
44
|
-
hasNext = true;
|
|
45
|
-
_a.label = 1;
|
|
46
|
-
case 1:
|
|
47
|
-
if (!hasNext) return [3, 9];
|
|
48
|
-
input.nextToken = token;
|
|
49
|
-
input["maxResults"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof Braket)) return [3, 3];
|
|
51
|
-
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
-
case 2:
|
|
53
|
-
page = _a.sent();
|
|
54
|
-
return [3, 6];
|
|
55
|
-
case 3:
|
|
56
|
-
if (!(config.client instanceof BraketClient)) return [3, 5];
|
|
57
|
-
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
-
case 4:
|
|
59
|
-
page = _a.sent();
|
|
60
|
-
return [3, 6];
|
|
61
|
-
case 5: throw new Error("Invalid client, expected Braket | BraketClient");
|
|
62
|
-
case 6: return [4, __await(page)];
|
|
63
|
-
case 7: return [4, _a.sent()];
|
|
64
|
-
case 8:
|
|
65
|
-
_a.sent();
|
|
66
|
-
prevToken = token;
|
|
67
|
-
token = page.nextToken;
|
|
68
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
-
return [3, 1];
|
|
70
|
-
case 9: return [4, __await(undefined)];
|
|
71
|
-
case 10: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { Braket } from "../Braket";
|
|
3
2
|
import { BraketClient } from "../BraketClient";
|
|
4
3
|
import { SearchJobsCommand } from "../commands/SearchJobsCommand";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i - 2] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
switch (_a.label) {
|
|
13
|
-
case 0: return [4, client.send.apply(client, __spreadArray([new SearchJobsCommand(input)], __read(args), false))];
|
|
14
|
-
case 1: return [2, _a.sent()];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new SearchJobsCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
-
args[_i - 2] = arguments[_i];
|
|
23
|
-
}
|
|
24
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
-
return __generator(this, function (_a) {
|
|
26
|
-
switch (_a.label) {
|
|
27
|
-
case 0: return [4, client.searchJobs.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
-
case 1: return [2, _a.sent()];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.searchJobs(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateSearchJobs(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateSearchJobs(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof Braket) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof BraketClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Braket | BraketClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
39
|
-
var token, hasNext, page, prevToken;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
token = config.startingToken || undefined;
|
|
44
|
-
hasNext = true;
|
|
45
|
-
_a.label = 1;
|
|
46
|
-
case 1:
|
|
47
|
-
if (!hasNext) return [3, 9];
|
|
48
|
-
input.nextToken = token;
|
|
49
|
-
input["maxResults"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof Braket)) return [3, 3];
|
|
51
|
-
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
-
case 2:
|
|
53
|
-
page = _a.sent();
|
|
54
|
-
return [3, 6];
|
|
55
|
-
case 3:
|
|
56
|
-
if (!(config.client instanceof BraketClient)) return [3, 5];
|
|
57
|
-
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
-
case 4:
|
|
59
|
-
page = _a.sent();
|
|
60
|
-
return [3, 6];
|
|
61
|
-
case 5: throw new Error("Invalid client, expected Braket | BraketClient");
|
|
62
|
-
case 6: return [4, __await(page)];
|
|
63
|
-
case 7: return [4, _a.sent()];
|
|
64
|
-
case 8:
|
|
65
|
-
_a.sent();
|
|
66
|
-
prevToken = token;
|
|
67
|
-
token = page.nextToken;
|
|
68
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
-
return [3, 1];
|
|
70
|
-
case 9: return [4, __await(undefined)];
|
|
71
|
-
case 10: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|