@aws-sdk/client-iotsecuretunneling 3.490.0 → 3.496.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/dist-cjs/IoTSecureTunneling.js +1 -27
- package/dist-cjs/IoTSecureTunnelingClient.js +1 -43
- package/dist-cjs/commands/CloseTunnelCommand.js +1 -28
- package/dist-cjs/commands/DescribeTunnelCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ListTunnelsCommand.js +1 -28
- package/dist-cjs/commands/OpenTunnelCommand.js +1 -29
- package/dist-cjs/commands/RotateTunnelAccessTokenCommand.js +1 -29
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -11
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +836 -11
- package/dist-cjs/models/IoTSecureTunnelingServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -56
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListTunnelsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -5
- package/dist-cjs/protocols/Aws_json1_1.js +1 -461
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IoTSecureTunnelingServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class IoTSecureTunnelingServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, IoTSecureTunnelingServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.IoTSecureTunnelingServiceException = IoTSecureTunnelingServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,56 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RotateTunnelAccessTokenResponseFilterSensitiveLog = exports.OpenTunnelResponseFilterSensitiveLog = exports.LimitExceededException = exports.TunnelStatus = exports.ConnectionStatus = exports.ResourceNotFoundException = exports.ClientMode = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
const IoTSecureTunnelingServiceException_1 = require("./IoTSecureTunnelingServiceException");
|
|
6
|
-
exports.ClientMode = {
|
|
7
|
-
ALL: "ALL",
|
|
8
|
-
DESTINATION: "DESTINATION",
|
|
9
|
-
SOURCE: "SOURCE",
|
|
10
|
-
};
|
|
11
|
-
class ResourceNotFoundException extends IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException {
|
|
12
|
-
constructor(opts) {
|
|
13
|
-
super({
|
|
14
|
-
name: "ResourceNotFoundException",
|
|
15
|
-
$fault: "client",
|
|
16
|
-
...opts,
|
|
17
|
-
});
|
|
18
|
-
this.name = "ResourceNotFoundException";
|
|
19
|
-
this.$fault = "client";
|
|
20
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
24
|
-
exports.ConnectionStatus = {
|
|
25
|
-
CONNECTED: "CONNECTED",
|
|
26
|
-
DISCONNECTED: "DISCONNECTED",
|
|
27
|
-
};
|
|
28
|
-
exports.TunnelStatus = {
|
|
29
|
-
CLOSED: "CLOSED",
|
|
30
|
-
OPEN: "OPEN",
|
|
31
|
-
};
|
|
32
|
-
class LimitExceededException extends IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException {
|
|
33
|
-
constructor(opts) {
|
|
34
|
-
super({
|
|
35
|
-
name: "LimitExceededException",
|
|
36
|
-
$fault: "client",
|
|
37
|
-
...opts,
|
|
38
|
-
});
|
|
39
|
-
this.name = "LimitExceededException";
|
|
40
|
-
this.$fault = "client";
|
|
41
|
-
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.LimitExceededException = LimitExceededException;
|
|
45
|
-
const OpenTunnelResponseFilterSensitiveLog = (obj) => ({
|
|
46
|
-
...obj,
|
|
47
|
-
...(obj.sourceAccessToken && { sourceAccessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
48
|
-
...(obj.destinationAccessToken && { destinationAccessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
49
|
-
});
|
|
50
|
-
exports.OpenTunnelResponseFilterSensitiveLog = OpenTunnelResponseFilterSensitiveLog;
|
|
51
|
-
const RotateTunnelAccessTokenResponseFilterSensitiveLog = (obj) => ({
|
|
52
|
-
...obj,
|
|
53
|
-
...(obj.sourceAccessToken && { sourceAccessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
54
|
-
...(obj.destinationAccessToken && { destinationAccessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
55
|
-
});
|
|
56
|
-
exports.RotateTunnelAccessTokenResponseFilterSensitiveLog = RotateTunnelAccessTokenResponseFilterSensitiveLog;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateListTunnels = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const ListTunnelsCommand_1 = require("../commands/ListTunnelsCommand");
|
|
6
|
-
const IoTSecureTunnelingClient_1 = require("../IoTSecureTunnelingClient");
|
|
7
|
-
exports.paginateListTunnels = (0, core_1.createPaginator)(IoTSecureTunnelingClient_1.IoTSecureTunnelingClient, ListTunnelsCommand_1.ListTunnelsCommand, "nextToken", "nextToken", "maxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./ListTunnelsPaginator"), exports);
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,461 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RotateTunnelAccessTokenCommand = exports.de_OpenTunnelCommand = exports.de_ListTunnelsCommand = exports.de_ListTagsForResourceCommand = exports.de_DescribeTunnelCommand = exports.de_CloseTunnelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RotateTunnelAccessTokenCommand = exports.se_OpenTunnelCommand = exports.se_ListTunnelsCommand = exports.se_ListTagsForResourceCommand = exports.se_DescribeTunnelCommand = exports.se_CloseTunnelCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const IoTSecureTunnelingServiceException_1 = require("../models/IoTSecureTunnelingServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CloseTunnelCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("CloseTunnel");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_CloseTunnelCommand = se_CloseTunnelCommand;
|
|
15
|
-
const se_DescribeTunnelCommand = async (input, context) => {
|
|
16
|
-
const headers = sharedHeaders("DescribeTunnel");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
-
};
|
|
21
|
-
exports.se_DescribeTunnelCommand = se_DescribeTunnelCommand;
|
|
22
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
23
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
24
|
-
let body;
|
|
25
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
|
-
};
|
|
28
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
29
|
-
const se_ListTunnelsCommand = async (input, context) => {
|
|
30
|
-
const headers = sharedHeaders("ListTunnels");
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
-
};
|
|
35
|
-
exports.se_ListTunnelsCommand = se_ListTunnelsCommand;
|
|
36
|
-
const se_OpenTunnelCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("OpenTunnel");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
exports.se_OpenTunnelCommand = se_OpenTunnelCommand;
|
|
43
|
-
const se_RotateTunnelAccessTokenCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("RotateTunnelAccessToken");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
exports.se_RotateTunnelAccessTokenCommand = se_RotateTunnelAccessTokenCommand;
|
|
50
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
51
|
-
const headers = sharedHeaders("TagResource");
|
|
52
|
-
let body;
|
|
53
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
54
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
55
|
-
};
|
|
56
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
57
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
58
|
-
const headers = sharedHeaders("UntagResource");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
61
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
62
|
-
};
|
|
63
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
64
|
-
const de_CloseTunnelCommand = async (output, context) => {
|
|
65
|
-
if (output.statusCode >= 300) {
|
|
66
|
-
return de_CloseTunnelCommandError(output, context);
|
|
67
|
-
}
|
|
68
|
-
const data = await parseBody(output.body, context);
|
|
69
|
-
let contents = {};
|
|
70
|
-
contents = (0, smithy_client_1._json)(data);
|
|
71
|
-
const response = {
|
|
72
|
-
$metadata: deserializeMetadata(output),
|
|
73
|
-
...contents,
|
|
74
|
-
};
|
|
75
|
-
return response;
|
|
76
|
-
};
|
|
77
|
-
exports.de_CloseTunnelCommand = de_CloseTunnelCommand;
|
|
78
|
-
const de_CloseTunnelCommandError = async (output, context) => {
|
|
79
|
-
const parsedOutput = {
|
|
80
|
-
...output,
|
|
81
|
-
body: await parseErrorBody(output.body, context),
|
|
82
|
-
};
|
|
83
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
84
|
-
switch (errorCode) {
|
|
85
|
-
case "ResourceNotFoundException":
|
|
86
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
87
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
88
|
-
default:
|
|
89
|
-
const parsedBody = parsedOutput.body;
|
|
90
|
-
return throwDefaultError({
|
|
91
|
-
output,
|
|
92
|
-
parsedBody,
|
|
93
|
-
errorCode,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
const de_DescribeTunnelCommand = async (output, context) => {
|
|
98
|
-
if (output.statusCode >= 300) {
|
|
99
|
-
return de_DescribeTunnelCommandError(output, context);
|
|
100
|
-
}
|
|
101
|
-
const data = await parseBody(output.body, context);
|
|
102
|
-
let contents = {};
|
|
103
|
-
contents = de_DescribeTunnelResponse(data, context);
|
|
104
|
-
const response = {
|
|
105
|
-
$metadata: deserializeMetadata(output),
|
|
106
|
-
...contents,
|
|
107
|
-
};
|
|
108
|
-
return response;
|
|
109
|
-
};
|
|
110
|
-
exports.de_DescribeTunnelCommand = de_DescribeTunnelCommand;
|
|
111
|
-
const de_DescribeTunnelCommandError = async (output, context) => {
|
|
112
|
-
const parsedOutput = {
|
|
113
|
-
...output,
|
|
114
|
-
body: await parseErrorBody(output.body, context),
|
|
115
|
-
};
|
|
116
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
117
|
-
switch (errorCode) {
|
|
118
|
-
case "ResourceNotFoundException":
|
|
119
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
120
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
121
|
-
default:
|
|
122
|
-
const parsedBody = parsedOutput.body;
|
|
123
|
-
return throwDefaultError({
|
|
124
|
-
output,
|
|
125
|
-
parsedBody,
|
|
126
|
-
errorCode,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
131
|
-
if (output.statusCode >= 300) {
|
|
132
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
133
|
-
}
|
|
134
|
-
const data = await parseBody(output.body, context);
|
|
135
|
-
let contents = {};
|
|
136
|
-
contents = (0, smithy_client_1._json)(data);
|
|
137
|
-
const response = {
|
|
138
|
-
$metadata: deserializeMetadata(output),
|
|
139
|
-
...contents,
|
|
140
|
-
};
|
|
141
|
-
return response;
|
|
142
|
-
};
|
|
143
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
144
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
145
|
-
const parsedOutput = {
|
|
146
|
-
...output,
|
|
147
|
-
body: await parseErrorBody(output.body, context),
|
|
148
|
-
};
|
|
149
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
150
|
-
switch (errorCode) {
|
|
151
|
-
case "ResourceNotFoundException":
|
|
152
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
153
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
154
|
-
default:
|
|
155
|
-
const parsedBody = parsedOutput.body;
|
|
156
|
-
return throwDefaultError({
|
|
157
|
-
output,
|
|
158
|
-
parsedBody,
|
|
159
|
-
errorCode,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
const de_ListTunnelsCommand = async (output, context) => {
|
|
164
|
-
if (output.statusCode >= 300) {
|
|
165
|
-
return de_ListTunnelsCommandError(output, context);
|
|
166
|
-
}
|
|
167
|
-
const data = await parseBody(output.body, context);
|
|
168
|
-
let contents = {};
|
|
169
|
-
contents = de_ListTunnelsResponse(data, context);
|
|
170
|
-
const response = {
|
|
171
|
-
$metadata: deserializeMetadata(output),
|
|
172
|
-
...contents,
|
|
173
|
-
};
|
|
174
|
-
return response;
|
|
175
|
-
};
|
|
176
|
-
exports.de_ListTunnelsCommand = de_ListTunnelsCommand;
|
|
177
|
-
const de_ListTunnelsCommandError = async (output, context) => {
|
|
178
|
-
const parsedOutput = {
|
|
179
|
-
...output,
|
|
180
|
-
body: await parseErrorBody(output.body, context),
|
|
181
|
-
};
|
|
182
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
183
|
-
const parsedBody = parsedOutput.body;
|
|
184
|
-
return throwDefaultError({
|
|
185
|
-
output,
|
|
186
|
-
parsedBody,
|
|
187
|
-
errorCode,
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
const de_OpenTunnelCommand = async (output, context) => {
|
|
191
|
-
if (output.statusCode >= 300) {
|
|
192
|
-
return de_OpenTunnelCommandError(output, context);
|
|
193
|
-
}
|
|
194
|
-
const data = await parseBody(output.body, context);
|
|
195
|
-
let contents = {};
|
|
196
|
-
contents = (0, smithy_client_1._json)(data);
|
|
197
|
-
const response = {
|
|
198
|
-
$metadata: deserializeMetadata(output),
|
|
199
|
-
...contents,
|
|
200
|
-
};
|
|
201
|
-
return response;
|
|
202
|
-
};
|
|
203
|
-
exports.de_OpenTunnelCommand = de_OpenTunnelCommand;
|
|
204
|
-
const de_OpenTunnelCommandError = async (output, context) => {
|
|
205
|
-
const parsedOutput = {
|
|
206
|
-
...output,
|
|
207
|
-
body: await parseErrorBody(output.body, context),
|
|
208
|
-
};
|
|
209
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
210
|
-
switch (errorCode) {
|
|
211
|
-
case "LimitExceededException":
|
|
212
|
-
case "com.amazonaws.iotsecuretunneling#LimitExceededException":
|
|
213
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
214
|
-
default:
|
|
215
|
-
const parsedBody = parsedOutput.body;
|
|
216
|
-
return throwDefaultError({
|
|
217
|
-
output,
|
|
218
|
-
parsedBody,
|
|
219
|
-
errorCode,
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
const de_RotateTunnelAccessTokenCommand = async (output, context) => {
|
|
224
|
-
if (output.statusCode >= 300) {
|
|
225
|
-
return de_RotateTunnelAccessTokenCommandError(output, context);
|
|
226
|
-
}
|
|
227
|
-
const data = await parseBody(output.body, context);
|
|
228
|
-
let contents = {};
|
|
229
|
-
contents = (0, smithy_client_1._json)(data);
|
|
230
|
-
const response = {
|
|
231
|
-
$metadata: deserializeMetadata(output),
|
|
232
|
-
...contents,
|
|
233
|
-
};
|
|
234
|
-
return response;
|
|
235
|
-
};
|
|
236
|
-
exports.de_RotateTunnelAccessTokenCommand = de_RotateTunnelAccessTokenCommand;
|
|
237
|
-
const de_RotateTunnelAccessTokenCommandError = async (output, context) => {
|
|
238
|
-
const parsedOutput = {
|
|
239
|
-
...output,
|
|
240
|
-
body: await parseErrorBody(output.body, context),
|
|
241
|
-
};
|
|
242
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
243
|
-
switch (errorCode) {
|
|
244
|
-
case "ResourceNotFoundException":
|
|
245
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
246
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
247
|
-
default:
|
|
248
|
-
const parsedBody = parsedOutput.body;
|
|
249
|
-
return throwDefaultError({
|
|
250
|
-
output,
|
|
251
|
-
parsedBody,
|
|
252
|
-
errorCode,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
257
|
-
if (output.statusCode >= 300) {
|
|
258
|
-
return de_TagResourceCommandError(output, context);
|
|
259
|
-
}
|
|
260
|
-
const data = await parseBody(output.body, context);
|
|
261
|
-
let contents = {};
|
|
262
|
-
contents = (0, smithy_client_1._json)(data);
|
|
263
|
-
const response = {
|
|
264
|
-
$metadata: deserializeMetadata(output),
|
|
265
|
-
...contents,
|
|
266
|
-
};
|
|
267
|
-
return response;
|
|
268
|
-
};
|
|
269
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
270
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
271
|
-
const parsedOutput = {
|
|
272
|
-
...output,
|
|
273
|
-
body: await parseErrorBody(output.body, context),
|
|
274
|
-
};
|
|
275
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
276
|
-
switch (errorCode) {
|
|
277
|
-
case "ResourceNotFoundException":
|
|
278
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
279
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
280
|
-
default:
|
|
281
|
-
const parsedBody = parsedOutput.body;
|
|
282
|
-
return throwDefaultError({
|
|
283
|
-
output,
|
|
284
|
-
parsedBody,
|
|
285
|
-
errorCode,
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
290
|
-
if (output.statusCode >= 300) {
|
|
291
|
-
return de_UntagResourceCommandError(output, context);
|
|
292
|
-
}
|
|
293
|
-
const data = await parseBody(output.body, context);
|
|
294
|
-
let contents = {};
|
|
295
|
-
contents = (0, smithy_client_1._json)(data);
|
|
296
|
-
const response = {
|
|
297
|
-
$metadata: deserializeMetadata(output),
|
|
298
|
-
...contents,
|
|
299
|
-
};
|
|
300
|
-
return response;
|
|
301
|
-
};
|
|
302
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
303
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
304
|
-
const parsedOutput = {
|
|
305
|
-
...output,
|
|
306
|
-
body: await parseErrorBody(output.body, context),
|
|
307
|
-
};
|
|
308
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
309
|
-
switch (errorCode) {
|
|
310
|
-
case "ResourceNotFoundException":
|
|
311
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
312
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
313
|
-
default:
|
|
314
|
-
const parsedBody = parsedOutput.body;
|
|
315
|
-
return throwDefaultError({
|
|
316
|
-
output,
|
|
317
|
-
parsedBody,
|
|
318
|
-
errorCode,
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
323
|
-
const body = parsedOutput.body;
|
|
324
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
325
|
-
const exception = new models_0_1.LimitExceededException({
|
|
326
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
327
|
-
...deserialized,
|
|
328
|
-
});
|
|
329
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
330
|
-
};
|
|
331
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
332
|
-
const body = parsedOutput.body;
|
|
333
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
334
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
335
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
336
|
-
...deserialized,
|
|
337
|
-
});
|
|
338
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
339
|
-
};
|
|
340
|
-
const de_ConnectionState = (output, context) => {
|
|
341
|
-
return (0, smithy_client_1.take)(output, {
|
|
342
|
-
lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
343
|
-
status: smithy_client_1.expectString,
|
|
344
|
-
});
|
|
345
|
-
};
|
|
346
|
-
const de_DescribeTunnelResponse = (output, context) => {
|
|
347
|
-
return (0, smithy_client_1.take)(output, {
|
|
348
|
-
tunnel: (_) => de_Tunnel(_, context),
|
|
349
|
-
});
|
|
350
|
-
};
|
|
351
|
-
const de_ListTunnelsResponse = (output, context) => {
|
|
352
|
-
return (0, smithy_client_1.take)(output, {
|
|
353
|
-
nextToken: smithy_client_1.expectString,
|
|
354
|
-
tunnelSummaries: (_) => de_TunnelSummaryList(_, context),
|
|
355
|
-
});
|
|
356
|
-
};
|
|
357
|
-
const de_Tunnel = (output, context) => {
|
|
358
|
-
return (0, smithy_client_1.take)(output, {
|
|
359
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
360
|
-
description: smithy_client_1.expectString,
|
|
361
|
-
destinationConfig: smithy_client_1._json,
|
|
362
|
-
destinationConnectionState: (_) => de_ConnectionState(_, context),
|
|
363
|
-
lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
364
|
-
sourceConnectionState: (_) => de_ConnectionState(_, context),
|
|
365
|
-
status: smithy_client_1.expectString,
|
|
366
|
-
tags: smithy_client_1._json,
|
|
367
|
-
timeoutConfig: smithy_client_1._json,
|
|
368
|
-
tunnelArn: smithy_client_1.expectString,
|
|
369
|
-
tunnelId: smithy_client_1.expectString,
|
|
370
|
-
});
|
|
371
|
-
};
|
|
372
|
-
const de_TunnelSummary = (output, context) => {
|
|
373
|
-
return (0, smithy_client_1.take)(output, {
|
|
374
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
375
|
-
description: smithy_client_1.expectString,
|
|
376
|
-
lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
377
|
-
status: smithy_client_1.expectString,
|
|
378
|
-
tunnelArn: smithy_client_1.expectString,
|
|
379
|
-
tunnelId: smithy_client_1.expectString,
|
|
380
|
-
});
|
|
381
|
-
};
|
|
382
|
-
const de_TunnelSummaryList = (output, context) => {
|
|
383
|
-
const retVal = (output || [])
|
|
384
|
-
.filter((e) => e != null)
|
|
385
|
-
.map((entry) => {
|
|
386
|
-
return de_TunnelSummary(entry, context);
|
|
387
|
-
});
|
|
388
|
-
return retVal;
|
|
389
|
-
};
|
|
390
|
-
const deserializeMetadata = (output) => ({
|
|
391
|
-
httpStatusCode: output.statusCode,
|
|
392
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
393
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
394
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
395
|
-
});
|
|
396
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
397
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException);
|
|
398
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
399
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
400
|
-
const contents = {
|
|
401
|
-
protocol,
|
|
402
|
-
hostname,
|
|
403
|
-
port,
|
|
404
|
-
method: "POST",
|
|
405
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
406
|
-
headers,
|
|
407
|
-
};
|
|
408
|
-
if (resolvedHostname !== undefined) {
|
|
409
|
-
contents.hostname = resolvedHostname;
|
|
410
|
-
}
|
|
411
|
-
if (body !== undefined) {
|
|
412
|
-
contents.body = body;
|
|
413
|
-
}
|
|
414
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
415
|
-
};
|
|
416
|
-
function sharedHeaders(operation) {
|
|
417
|
-
return {
|
|
418
|
-
"content-type": "application/x-amz-json-1.1",
|
|
419
|
-
"x-amz-target": `IoTSecuredTunneling.${operation}`,
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
423
|
-
if (encoded.length) {
|
|
424
|
-
return JSON.parse(encoded);
|
|
425
|
-
}
|
|
426
|
-
return {};
|
|
427
|
-
});
|
|
428
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
429
|
-
const value = await parseBody(errorBody, context);
|
|
430
|
-
value.message = value.message ?? value.Message;
|
|
431
|
-
return value;
|
|
432
|
-
};
|
|
433
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
434
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
435
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
436
|
-
let cleanValue = rawValue;
|
|
437
|
-
if (typeof cleanValue === "number") {
|
|
438
|
-
cleanValue = cleanValue.toString();
|
|
439
|
-
}
|
|
440
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
441
|
-
cleanValue = cleanValue.split(",")[0];
|
|
442
|
-
}
|
|
443
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
444
|
-
cleanValue = cleanValue.split(":")[0];
|
|
445
|
-
}
|
|
446
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
447
|
-
cleanValue = cleanValue.split("#")[1];
|
|
448
|
-
}
|
|
449
|
-
return cleanValue;
|
|
450
|
-
};
|
|
451
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
452
|
-
if (headerKey !== undefined) {
|
|
453
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
454
|
-
}
|
|
455
|
-
if (data.code !== undefined) {
|
|
456
|
-
return sanitizeErrorCode(data.code);
|
|
457
|
-
}
|
|
458
|
-
if (data["__type"] !== undefined) {
|
|
459
|
-
return sanitizeErrorCode(data["__type"]);
|
|
460
|
-
}
|
|
461
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|