@aws-sdk/client-iot-data-plane 3.183.0 → 3.186.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 +19 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/IoTDataPlane.js +37 -30
- package/dist-es/IoTDataPlaneClient.js +28 -22
- package/dist-es/commands/DeleteThingShadowCommand.js +28 -21
- package/dist-es/commands/GetRetainedMessageCommand.js +28 -21
- package/dist-es/commands/GetThingShadowCommand.js +28 -21
- package/dist-es/commands/ListNamedShadowsForThingCommand.js +28 -21
- package/dist-es/commands/ListRetainedMessagesCommand.js +28 -21
- package/dist-es/commands/PublishCommand.js +29 -22
- package/dist-es/commands/UpdateThingShadowCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/IoTDataPlaneServiceException.js +10 -5
- package/dist-es/models/models_0.js +125 -152
- package/dist-es/pagination/ListRetainedMessagesPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +908 -652
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,32 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
1
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
2
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { UpdateThingShadowRequestFilterSensitiveLog, UpdateThingShadowResponseFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { deserializeAws_restJson1UpdateThingShadowCommand, serializeAws_restJson1UpdateThingShadowCommand, } from "../protocols/Aws_restJson1";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var UpdateThingShadowCommand = (function (_super) {
|
|
7
|
+
__extends(UpdateThingShadowCommand, _super);
|
|
8
|
+
function UpdateThingShadowCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
9
12
|
}
|
|
10
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
13
|
+
UpdateThingShadowCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
11
14
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
logger,
|
|
18
|
-
clientName,
|
|
19
|
-
commandName,
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "IoTDataPlaneClient";
|
|
18
|
+
var commandName = "UpdateThingShadowCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
20
23
|
inputFilterSensitiveLog: UpdateThingShadowRequestFilterSensitiveLog,
|
|
21
24
|
outputFilterSensitiveLog: UpdateThingShadowResponseFilterSensitiveLog,
|
|
22
25
|
};
|
|
23
|
-
|
|
24
|
-
return stack.resolve((request)
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
UpdateThingShadowCommand.prototype.serialize = function (input, context) {
|
|
27
32
|
return serializeAws_restJson1UpdateThingShadowCommand(input, context);
|
|
28
|
-
}
|
|
29
|
-
deserialize(output, context) {
|
|
33
|
+
};
|
|
34
|
+
UpdateThingShadowCommand.prototype.deserialize = function (output, context) {
|
|
30
35
|
return deserializeAws_restJson1UpdateThingShadowCommand(output, context);
|
|
31
|
-
}
|
|
32
|
-
|
|
36
|
+
};
|
|
37
|
+
return UpdateThingShadowCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { UpdateThingShadowCommand };
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
2
|
-
|
|
3
|
+
var regionHash = {
|
|
3
4
|
"ca-central-1": {
|
|
4
5
|
variants: [
|
|
5
6
|
{
|
|
@@ -57,7 +58,7 @@ const regionHash = {
|
|
|
57
58
|
],
|
|
58
59
|
},
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
+
var partitionHash = {
|
|
61
62
|
aws: {
|
|
62
63
|
regions: [
|
|
63
64
|
"af-south-1",
|
|
@@ -182,9 +183,8 @@ const partitionHash = {
|
|
|
182
183
|
],
|
|
183
184
|
},
|
|
184
185
|
};
|
|
185
|
-
export
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
});
|
|
186
|
+
export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
+
return __generator(this, function (_a) {
|
|
188
|
+
return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "iotdata", regionHash: regionHash, partitionHash: partitionHash }))];
|
|
189
|
+
});
|
|
190
|
+
}); };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
1
2
|
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var IoTDataPlaneServiceException = (function (_super) {
|
|
4
|
+
__extends(IoTDataPlaneServiceException, _super);
|
|
5
|
+
function IoTDataPlaneServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, IoTDataPlaneServiceException.prototype);
|
|
8
|
+
return _this;
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
return IoTDataPlaneServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { IoTDataPlaneServiceException };
|
|
@@ -1,163 +1,136 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
1
2
|
import { IoTDataPlaneServiceException as __BaseException } from "./IoTDataPlaneServiceException";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.$fault = "client";
|
|
11
|
-
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
3
|
+
var ConflictException = (function (_super) {
|
|
4
|
+
__extends(ConflictException, _super);
|
|
5
|
+
function ConflictException(opts) {
|
|
6
|
+
var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
|
|
7
|
+
_this.name = "ConflictException";
|
|
8
|
+
_this.$fault = "client";
|
|
9
|
+
Object.setPrototypeOf(_this, ConflictException.prototype);
|
|
10
|
+
return _this;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
return ConflictException;
|
|
13
|
+
}(__BaseException));
|
|
14
|
+
export { ConflictException };
|
|
15
|
+
var InternalFailureException = (function (_super) {
|
|
16
|
+
__extends(InternalFailureException, _super);
|
|
17
|
+
function InternalFailureException(opts) {
|
|
18
|
+
var _this = _super.call(this, __assign({ name: "InternalFailureException", $fault: "server" }, opts)) || this;
|
|
19
|
+
_this.name = "InternalFailureException";
|
|
20
|
+
_this.$fault = "server";
|
|
21
|
+
Object.setPrototypeOf(_this, InternalFailureException.prototype);
|
|
22
|
+
return _this;
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
return InternalFailureException;
|
|
25
|
+
}(__BaseException));
|
|
26
|
+
export { InternalFailureException };
|
|
27
|
+
var InvalidRequestException = (function (_super) {
|
|
28
|
+
__extends(InvalidRequestException, _super);
|
|
29
|
+
function InvalidRequestException(opts) {
|
|
30
|
+
var _this = _super.call(this, __assign({ name: "InvalidRequestException", $fault: "client" }, opts)) || this;
|
|
31
|
+
_this.name = "InvalidRequestException";
|
|
32
|
+
_this.$fault = "client";
|
|
33
|
+
Object.setPrototypeOf(_this, InvalidRequestException.prototype);
|
|
34
|
+
return _this;
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
return InvalidRequestException;
|
|
37
|
+
}(__BaseException));
|
|
38
|
+
export { InvalidRequestException };
|
|
39
|
+
var MethodNotAllowedException = (function (_super) {
|
|
40
|
+
__extends(MethodNotAllowedException, _super);
|
|
41
|
+
function MethodNotAllowedException(opts) {
|
|
42
|
+
var _this = _super.call(this, __assign({ name: "MethodNotAllowedException", $fault: "client" }, opts)) || this;
|
|
43
|
+
_this.name = "MethodNotAllowedException";
|
|
44
|
+
_this.$fault = "client";
|
|
45
|
+
Object.setPrototypeOf(_this, MethodNotAllowedException.prototype);
|
|
46
|
+
return _this;
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
return MethodNotAllowedException;
|
|
49
|
+
}(__BaseException));
|
|
50
|
+
export { MethodNotAllowedException };
|
|
51
|
+
var ResourceNotFoundException = (function (_super) {
|
|
52
|
+
__extends(ResourceNotFoundException, _super);
|
|
53
|
+
function ResourceNotFoundException(opts) {
|
|
54
|
+
var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
|
|
55
|
+
_this.name = "ResourceNotFoundException";
|
|
56
|
+
_this.$fault = "client";
|
|
57
|
+
Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
|
|
58
|
+
return _this;
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
return ResourceNotFoundException;
|
|
61
|
+
}(__BaseException));
|
|
62
|
+
export { ResourceNotFoundException };
|
|
63
|
+
var ServiceUnavailableException = (function (_super) {
|
|
64
|
+
__extends(ServiceUnavailableException, _super);
|
|
65
|
+
function ServiceUnavailableException(opts) {
|
|
66
|
+
var _this = _super.call(this, __assign({ name: "ServiceUnavailableException", $fault: "server" }, opts)) || this;
|
|
67
|
+
_this.name = "ServiceUnavailableException";
|
|
68
|
+
_this.$fault = "server";
|
|
69
|
+
Object.setPrototypeOf(_this, ServiceUnavailableException.prototype);
|
|
70
|
+
return _this;
|
|
72
71
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
return ServiceUnavailableException;
|
|
73
|
+
}(__BaseException));
|
|
74
|
+
export { ServiceUnavailableException };
|
|
75
|
+
var ThrottlingException = (function (_super) {
|
|
76
|
+
__extends(ThrottlingException, _super);
|
|
77
|
+
function ThrottlingException(opts) {
|
|
78
|
+
var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
|
|
79
|
+
_this.name = "ThrottlingException";
|
|
80
|
+
_this.$fault = "client";
|
|
81
|
+
Object.setPrototypeOf(_this, ThrottlingException.prototype);
|
|
82
|
+
return _this;
|
|
84
83
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
return ThrottlingException;
|
|
85
|
+
}(__BaseException));
|
|
86
|
+
export { ThrottlingException };
|
|
87
|
+
var UnauthorizedException = (function (_super) {
|
|
88
|
+
__extends(UnauthorizedException, _super);
|
|
89
|
+
function UnauthorizedException(opts) {
|
|
90
|
+
var _this = _super.call(this, __assign({ name: "UnauthorizedException", $fault: "client" }, opts)) || this;
|
|
91
|
+
_this.name = "UnauthorizedException";
|
|
92
|
+
_this.$fault = "client";
|
|
93
|
+
Object.setPrototypeOf(_this, UnauthorizedException.prototype);
|
|
94
|
+
return _this;
|
|
96
95
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
return UnauthorizedException;
|
|
97
|
+
}(__BaseException));
|
|
98
|
+
export { UnauthorizedException };
|
|
99
|
+
var UnsupportedDocumentEncodingException = (function (_super) {
|
|
100
|
+
__extends(UnsupportedDocumentEncodingException, _super);
|
|
101
|
+
function UnsupportedDocumentEncodingException(opts) {
|
|
102
|
+
var _this = _super.call(this, __assign({ name: "UnsupportedDocumentEncodingException", $fault: "client" }, opts)) || this;
|
|
103
|
+
_this.name = "UnsupportedDocumentEncodingException";
|
|
104
|
+
_this.$fault = "client";
|
|
105
|
+
Object.setPrototypeOf(_this, UnsupportedDocumentEncodingException.prototype);
|
|
106
|
+
return _this;
|
|
108
107
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
return UnsupportedDocumentEncodingException;
|
|
109
|
+
}(__BaseException));
|
|
110
|
+
export { UnsupportedDocumentEncodingException };
|
|
111
|
+
var RequestEntityTooLargeException = (function (_super) {
|
|
112
|
+
__extends(RequestEntityTooLargeException, _super);
|
|
113
|
+
function RequestEntityTooLargeException(opts) {
|
|
114
|
+
var _this = _super.call(this, __assign({ name: "RequestEntityTooLargeException", $fault: "client" }, opts)) || this;
|
|
115
|
+
_this.name = "RequestEntityTooLargeException";
|
|
116
|
+
_this.$fault = "client";
|
|
117
|
+
Object.setPrototypeOf(_this, RequestEntityTooLargeException.prototype);
|
|
118
|
+
return _this;
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
125
|
-
export
|
|
126
|
-
|
|
127
|
-
});
|
|
128
|
-
export
|
|
129
|
-
|
|
130
|
-
});
|
|
131
|
-
export
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
export
|
|
135
|
-
|
|
136
|
-
});
|
|
137
|
-
export
|
|
138
|
-
...obj,
|
|
139
|
-
});
|
|
140
|
-
export const ListNamedShadowsForThingRequestFilterSensitiveLog = (obj) => ({
|
|
141
|
-
...obj,
|
|
142
|
-
});
|
|
143
|
-
export const ListNamedShadowsForThingResponseFilterSensitiveLog = (obj) => ({
|
|
144
|
-
...obj,
|
|
145
|
-
});
|
|
146
|
-
export const ListRetainedMessagesRequestFilterSensitiveLog = (obj) => ({
|
|
147
|
-
...obj,
|
|
148
|
-
});
|
|
149
|
-
export const RetainedMessageSummaryFilterSensitiveLog = (obj) => ({
|
|
150
|
-
...obj,
|
|
151
|
-
});
|
|
152
|
-
export const ListRetainedMessagesResponseFilterSensitiveLog = (obj) => ({
|
|
153
|
-
...obj,
|
|
154
|
-
});
|
|
155
|
-
export const PublishRequestFilterSensitiveLog = (obj) => ({
|
|
156
|
-
...obj,
|
|
157
|
-
});
|
|
158
|
-
export const UpdateThingShadowRequestFilterSensitiveLog = (obj) => ({
|
|
159
|
-
...obj,
|
|
160
|
-
});
|
|
161
|
-
export const UpdateThingShadowResponseFilterSensitiveLog = (obj) => ({
|
|
162
|
-
...obj,
|
|
163
|
-
});
|
|
120
|
+
return RequestEntityTooLargeException;
|
|
121
|
+
}(__BaseException));
|
|
122
|
+
export { RequestEntityTooLargeException };
|
|
123
|
+
export var DeleteThingShadowRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
124
|
+
export var DeleteThingShadowResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
125
|
+
export var GetRetainedMessageRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
126
|
+
export var GetRetainedMessageResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
127
|
+
export var GetThingShadowRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
128
|
+
export var GetThingShadowResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
129
|
+
export var ListNamedShadowsForThingRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
130
|
+
export var ListNamedShadowsForThingResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
131
|
+
export var ListRetainedMessagesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
132
|
+
export var RetainedMessageSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
133
|
+
export var ListRetainedMessagesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
134
|
+
export var PublishRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
135
|
+
export var UpdateThingShadowRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
136
|
+
export var UpdateThingShadowResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,32 +1,75 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
1
2
|
import { ListRetainedMessagesCommand, } from "../commands/ListRetainedMessagesCommand";
|
|
2
3
|
import { IoTDataPlane } from "../IoTDataPlane";
|
|
3
4
|
import { IoTDataPlaneClient } from "../IoTDataPlaneClient";
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
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 ListRetainedMessagesCommand(input)], __read(args), false))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
6
18
|
};
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
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.listRetainedMessages.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
9
32
|
};
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
while (hasNext) {
|
|
15
|
-
input.nextToken = token;
|
|
16
|
-
input["maxResults"] = config.pageSize;
|
|
17
|
-
if (config.client instanceof IoTDataPlane) {
|
|
18
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
-
}
|
|
20
|
-
else if (config.client instanceof IoTDataPlaneClient) {
|
|
21
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error("Invalid client, expected IoTDataPlane | IoTDataPlaneClient");
|
|
25
|
-
}
|
|
26
|
-
yield page;
|
|
27
|
-
const prevToken = token;
|
|
28
|
-
token = page.nextToken;
|
|
29
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
export function paginateListRetainedMessages(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
30
37
|
}
|
|
31
|
-
return
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListRetainedMessages_1() {
|
|
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 IoTDataPlane)) 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 IoTDataPlaneClient)) 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 IoTDataPlane | IoTDataPlaneClient");
|
|
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
|
+
});
|
|
32
75
|
}
|