@aws-sdk/client-ec2-instance-connect 3.310.0 → 3.315.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/protocols/Aws_json1_1.js +28 -111
- package/dist-es/protocols/Aws_json1_1.js +29 -112
- package/package.json +6 -6
|
@@ -6,22 +6,16 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
|
6
6
|
const EC2InstanceConnectServiceException_1 = require("../models/EC2InstanceConnectServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_SendSerialConsoleSSHPublicKeyCommand = async (input, context) => {
|
|
9
|
-
const headers =
|
|
10
|
-
"content-type": "application/x-amz-json-1.1",
|
|
11
|
-
"x-amz-target": "AWSEC2InstanceConnectService.SendSerialConsoleSSHPublicKey",
|
|
12
|
-
};
|
|
9
|
+
const headers = sharedHeaders("SendSerialConsoleSSHPublicKey");
|
|
13
10
|
let body;
|
|
14
|
-
body = JSON.stringify(
|
|
11
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
15
12
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
16
13
|
};
|
|
17
14
|
exports.se_SendSerialConsoleSSHPublicKeyCommand = se_SendSerialConsoleSSHPublicKeyCommand;
|
|
18
15
|
const se_SendSSHPublicKeyCommand = async (input, context) => {
|
|
19
|
-
const headers =
|
|
20
|
-
"content-type": "application/x-amz-json-1.1",
|
|
21
|
-
"x-amz-target": "AWSEC2InstanceConnectService.SendSSHPublicKey",
|
|
22
|
-
};
|
|
16
|
+
const headers = sharedHeaders("SendSSHPublicKey");
|
|
23
17
|
let body;
|
|
24
|
-
body = JSON.stringify(
|
|
18
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
25
19
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
26
20
|
};
|
|
27
21
|
exports.se_SendSSHPublicKeyCommand = se_SendSSHPublicKeyCommand;
|
|
@@ -31,12 +25,12 @@ const de_SendSerialConsoleSSHPublicKeyCommand = async (output, context) => {
|
|
|
31
25
|
}
|
|
32
26
|
const data = await parseBody(output.body, context);
|
|
33
27
|
let contents = {};
|
|
34
|
-
contents =
|
|
28
|
+
contents = (0, smithy_client_1._json)(data);
|
|
35
29
|
const response = {
|
|
36
30
|
$metadata: deserializeMetadata(output),
|
|
37
31
|
...contents,
|
|
38
32
|
};
|
|
39
|
-
return
|
|
33
|
+
return response;
|
|
40
34
|
};
|
|
41
35
|
exports.de_SendSerialConsoleSSHPublicKeyCommand = de_SendSerialConsoleSSHPublicKeyCommand;
|
|
42
36
|
const de_SendSerialConsoleSSHPublicKeyCommandError = async (output, context) => {
|
|
@@ -81,10 +75,9 @@ const de_SendSerialConsoleSSHPublicKeyCommandError = async (output, context) =>
|
|
|
81
75
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
82
76
|
default:
|
|
83
77
|
const parsedBody = parsedOutput.body;
|
|
84
|
-
|
|
78
|
+
return throwDefaultError({
|
|
85
79
|
output,
|
|
86
80
|
parsedBody,
|
|
87
|
-
exceptionCtor: EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException,
|
|
88
81
|
errorCode,
|
|
89
82
|
});
|
|
90
83
|
}
|
|
@@ -95,12 +88,12 @@ const de_SendSSHPublicKeyCommand = async (output, context) => {
|
|
|
95
88
|
}
|
|
96
89
|
const data = await parseBody(output.body, context);
|
|
97
90
|
let contents = {};
|
|
98
|
-
contents =
|
|
91
|
+
contents = (0, smithy_client_1._json)(data);
|
|
99
92
|
const response = {
|
|
100
93
|
$metadata: deserializeMetadata(output),
|
|
101
94
|
...contents,
|
|
102
95
|
};
|
|
103
|
-
return
|
|
96
|
+
return response;
|
|
104
97
|
};
|
|
105
98
|
exports.de_SendSSHPublicKeyCommand = de_SendSSHPublicKeyCommand;
|
|
106
99
|
const de_SendSSHPublicKeyCommandError = async (output, context) => {
|
|
@@ -133,17 +126,16 @@ const de_SendSSHPublicKeyCommandError = async (output, context) => {
|
|
|
133
126
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
134
127
|
default:
|
|
135
128
|
const parsedBody = parsedOutput.body;
|
|
136
|
-
|
|
129
|
+
return throwDefaultError({
|
|
137
130
|
output,
|
|
138
131
|
parsedBody,
|
|
139
|
-
exceptionCtor: EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException,
|
|
140
132
|
errorCode,
|
|
141
133
|
});
|
|
142
134
|
}
|
|
143
135
|
};
|
|
144
136
|
const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
145
137
|
const body = parsedOutput.body;
|
|
146
|
-
const deserialized =
|
|
138
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
147
139
|
const exception = new models_0_1.AuthException({
|
|
148
140
|
$metadata: deserializeMetadata(parsedOutput),
|
|
149
141
|
...deserialized,
|
|
@@ -152,7 +144,7 @@ const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
|
152
144
|
};
|
|
153
145
|
const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
154
146
|
const body = parsedOutput.body;
|
|
155
|
-
const deserialized =
|
|
147
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
156
148
|
const exception = new models_0_1.EC2InstanceNotFoundException({
|
|
157
149
|
$metadata: deserializeMetadata(parsedOutput),
|
|
158
150
|
...deserialized,
|
|
@@ -161,7 +153,7 @@ const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
161
153
|
};
|
|
162
154
|
const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) => {
|
|
163
155
|
const body = parsedOutput.body;
|
|
164
|
-
const deserialized =
|
|
156
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
165
157
|
const exception = new models_0_1.EC2InstanceStateInvalidException({
|
|
166
158
|
$metadata: deserializeMetadata(parsedOutput),
|
|
167
159
|
...deserialized,
|
|
@@ -170,7 +162,7 @@ const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) =>
|
|
|
170
162
|
};
|
|
171
163
|
const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
172
164
|
const body = parsedOutput.body;
|
|
173
|
-
const deserialized =
|
|
165
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
174
166
|
const exception = new models_0_1.EC2InstanceTypeInvalidException({
|
|
175
167
|
$metadata: deserializeMetadata(parsedOutput),
|
|
176
168
|
...deserialized,
|
|
@@ -179,7 +171,7 @@ const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
|
179
171
|
};
|
|
180
172
|
const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
181
173
|
const body = parsedOutput.body;
|
|
182
|
-
const deserialized =
|
|
174
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
183
175
|
const exception = new models_0_1.EC2InstanceUnavailableException({
|
|
184
176
|
$metadata: deserializeMetadata(parsedOutput),
|
|
185
177
|
...deserialized,
|
|
@@ -188,7 +180,7 @@ const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
|
188
180
|
};
|
|
189
181
|
const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
190
182
|
const body = parsedOutput.body;
|
|
191
|
-
const deserialized =
|
|
183
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
192
184
|
const exception = new models_0_1.InvalidArgsException({
|
|
193
185
|
$metadata: deserializeMetadata(parsedOutput),
|
|
194
186
|
...deserialized,
|
|
@@ -197,7 +189,7 @@ const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
|
197
189
|
};
|
|
198
190
|
const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context) => {
|
|
199
191
|
const body = parsedOutput.body;
|
|
200
|
-
const deserialized =
|
|
192
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
201
193
|
const exception = new models_0_1.SerialConsoleAccessDisabledException({
|
|
202
194
|
$metadata: deserializeMetadata(parsedOutput),
|
|
203
195
|
...deserialized,
|
|
@@ -206,7 +198,7 @@ const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context)
|
|
|
206
198
|
};
|
|
207
199
|
const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
208
200
|
const body = parsedOutput.body;
|
|
209
|
-
const deserialized =
|
|
201
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
210
202
|
const exception = new models_0_1.SerialConsoleSessionLimitExceededException({
|
|
211
203
|
$metadata: deserializeMetadata(parsedOutput),
|
|
212
204
|
...deserialized,
|
|
@@ -215,7 +207,7 @@ const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, co
|
|
|
215
207
|
};
|
|
216
208
|
const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
217
209
|
const body = parsedOutput.body;
|
|
218
|
-
const deserialized =
|
|
210
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
219
211
|
const exception = new models_0_1.SerialConsoleSessionUnavailableException({
|
|
220
212
|
$metadata: deserializeMetadata(parsedOutput),
|
|
221
213
|
...deserialized,
|
|
@@ -224,7 +216,7 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, cont
|
|
|
224
216
|
};
|
|
225
217
|
const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
226
218
|
const body = parsedOutput.body;
|
|
227
|
-
const deserialized =
|
|
219
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
228
220
|
const exception = new models_0_1.ServiceException({
|
|
229
221
|
$metadata: deserializeMetadata(parsedOutput),
|
|
230
222
|
...deserialized,
|
|
@@ -233,95 +225,13 @@ const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
233
225
|
};
|
|
234
226
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
235
227
|
const body = parsedOutput.body;
|
|
236
|
-
const deserialized =
|
|
228
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
237
229
|
const exception = new models_0_1.ThrottlingException({
|
|
238
230
|
$metadata: deserializeMetadata(parsedOutput),
|
|
239
231
|
...deserialized,
|
|
240
232
|
});
|
|
241
233
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
242
234
|
};
|
|
243
|
-
const se_SendSerialConsoleSSHPublicKeyRequest = (input, context) => {
|
|
244
|
-
return {
|
|
245
|
-
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
246
|
-
...(input.SSHPublicKey != null && { SSHPublicKey: input.SSHPublicKey }),
|
|
247
|
-
...(input.SerialPort != null && { SerialPort: input.SerialPort }),
|
|
248
|
-
};
|
|
249
|
-
};
|
|
250
|
-
const se_SendSSHPublicKeyRequest = (input, context) => {
|
|
251
|
-
return {
|
|
252
|
-
...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
|
|
253
|
-
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
254
|
-
...(input.InstanceOSUser != null && { InstanceOSUser: input.InstanceOSUser }),
|
|
255
|
-
...(input.SSHPublicKey != null && { SSHPublicKey: input.SSHPublicKey }),
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
const de_AuthException = (output, context) => {
|
|
259
|
-
return {
|
|
260
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
const de_EC2InstanceNotFoundException = (output, context) => {
|
|
264
|
-
return {
|
|
265
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
const de_EC2InstanceStateInvalidException = (output, context) => {
|
|
269
|
-
return {
|
|
270
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
const de_EC2InstanceTypeInvalidException = (output, context) => {
|
|
274
|
-
return {
|
|
275
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
const de_EC2InstanceUnavailableException = (output, context) => {
|
|
279
|
-
return {
|
|
280
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
const de_InvalidArgsException = (output, context) => {
|
|
284
|
-
return {
|
|
285
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
const de_SendSerialConsoleSSHPublicKeyResponse = (output, context) => {
|
|
289
|
-
return {
|
|
290
|
-
RequestId: (0, smithy_client_1.expectString)(output.RequestId),
|
|
291
|
-
Success: (0, smithy_client_1.expectBoolean)(output.Success),
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
const de_SendSSHPublicKeyResponse = (output, context) => {
|
|
295
|
-
return {
|
|
296
|
-
RequestId: (0, smithy_client_1.expectString)(output.RequestId),
|
|
297
|
-
Success: (0, smithy_client_1.expectBoolean)(output.Success),
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
const de_SerialConsoleAccessDisabledException = (output, context) => {
|
|
301
|
-
return {
|
|
302
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
303
|
-
};
|
|
304
|
-
};
|
|
305
|
-
const de_SerialConsoleSessionLimitExceededException = (output, context) => {
|
|
306
|
-
return {
|
|
307
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
const de_SerialConsoleSessionUnavailableException = (output, context) => {
|
|
311
|
-
return {
|
|
312
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
const de_ServiceException = (output, context) => {
|
|
316
|
-
return {
|
|
317
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
318
|
-
};
|
|
319
|
-
};
|
|
320
|
-
const de_ThrottlingException = (output, context) => {
|
|
321
|
-
return {
|
|
322
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
235
|
const deserializeMetadata = (output) => ({
|
|
326
236
|
httpStatusCode: output.statusCode,
|
|
327
237
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -335,6 +245,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
335
245
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
336
246
|
};
|
|
337
247
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
248
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException);
|
|
338
249
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
339
250
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
340
251
|
const contents = {
|
|
@@ -353,6 +264,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
353
264
|
}
|
|
354
265
|
return new protocol_http_1.HttpRequest(contents);
|
|
355
266
|
};
|
|
267
|
+
function sharedHeaders(operation) {
|
|
268
|
+
return {
|
|
269
|
+
"content-type": "application/x-amz-json-1.1",
|
|
270
|
+
"x-amz-target": `AWSEC2InstanceConnectService.${operation}`,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
356
273
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
357
274
|
if (encoded.length) {
|
|
358
275
|
return JSON.parse(encoded);
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { EC2InstanceConnectServiceException as __BaseException } from "../models/EC2InstanceConnectServiceException";
|
|
4
4
|
import { AuthException, EC2InstanceNotFoundException, EC2InstanceStateInvalidException, EC2InstanceTypeInvalidException, EC2InstanceUnavailableException, InvalidArgsException, SerialConsoleAccessDisabledException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, ServiceException, ThrottlingException, } from "../models/models_0";
|
|
5
5
|
export const se_SendSerialConsoleSSHPublicKeyCommand = async (input, context) => {
|
|
6
|
-
const headers =
|
|
7
|
-
"content-type": "application/x-amz-json-1.1",
|
|
8
|
-
"x-amz-target": "AWSEC2InstanceConnectService.SendSerialConsoleSSHPublicKey",
|
|
9
|
-
};
|
|
6
|
+
const headers = sharedHeaders("SendSerialConsoleSSHPublicKey");
|
|
10
7
|
let body;
|
|
11
|
-
body = JSON.stringify(
|
|
8
|
+
body = JSON.stringify(_json(input));
|
|
12
9
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
10
|
};
|
|
14
11
|
export const se_SendSSHPublicKeyCommand = async (input, context) => {
|
|
15
|
-
const headers =
|
|
16
|
-
"content-type": "application/x-amz-json-1.1",
|
|
17
|
-
"x-amz-target": "AWSEC2InstanceConnectService.SendSSHPublicKey",
|
|
18
|
-
};
|
|
12
|
+
const headers = sharedHeaders("SendSSHPublicKey");
|
|
19
13
|
let body;
|
|
20
|
-
body = JSON.stringify(
|
|
14
|
+
body = JSON.stringify(_json(input));
|
|
21
15
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
16
|
};
|
|
23
17
|
export const de_SendSerialConsoleSSHPublicKeyCommand = async (output, context) => {
|
|
@@ -26,12 +20,12 @@ export const de_SendSerialConsoleSSHPublicKeyCommand = async (output, context) =
|
|
|
26
20
|
}
|
|
27
21
|
const data = await parseBody(output.body, context);
|
|
28
22
|
let contents = {};
|
|
29
|
-
contents =
|
|
23
|
+
contents = _json(data);
|
|
30
24
|
const response = {
|
|
31
25
|
$metadata: deserializeMetadata(output),
|
|
32
26
|
...contents,
|
|
33
27
|
};
|
|
34
|
-
return
|
|
28
|
+
return response;
|
|
35
29
|
};
|
|
36
30
|
const de_SendSerialConsoleSSHPublicKeyCommandError = async (output, context) => {
|
|
37
31
|
const parsedOutput = {
|
|
@@ -75,10 +69,9 @@ const de_SendSerialConsoleSSHPublicKeyCommandError = async (output, context) =>
|
|
|
75
69
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
76
70
|
default:
|
|
77
71
|
const parsedBody = parsedOutput.body;
|
|
78
|
-
throwDefaultError({
|
|
72
|
+
return throwDefaultError({
|
|
79
73
|
output,
|
|
80
74
|
parsedBody,
|
|
81
|
-
exceptionCtor: __BaseException,
|
|
82
75
|
errorCode,
|
|
83
76
|
});
|
|
84
77
|
}
|
|
@@ -89,12 +82,12 @@ export const de_SendSSHPublicKeyCommand = async (output, context) => {
|
|
|
89
82
|
}
|
|
90
83
|
const data = await parseBody(output.body, context);
|
|
91
84
|
let contents = {};
|
|
92
|
-
contents =
|
|
85
|
+
contents = _json(data);
|
|
93
86
|
const response = {
|
|
94
87
|
$metadata: deserializeMetadata(output),
|
|
95
88
|
...contents,
|
|
96
89
|
};
|
|
97
|
-
return
|
|
90
|
+
return response;
|
|
98
91
|
};
|
|
99
92
|
const de_SendSSHPublicKeyCommandError = async (output, context) => {
|
|
100
93
|
const parsedOutput = {
|
|
@@ -126,17 +119,16 @@ const de_SendSSHPublicKeyCommandError = async (output, context) => {
|
|
|
126
119
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
127
120
|
default:
|
|
128
121
|
const parsedBody = parsedOutput.body;
|
|
129
|
-
throwDefaultError({
|
|
122
|
+
return throwDefaultError({
|
|
130
123
|
output,
|
|
131
124
|
parsedBody,
|
|
132
|
-
exceptionCtor: __BaseException,
|
|
133
125
|
errorCode,
|
|
134
126
|
});
|
|
135
127
|
}
|
|
136
128
|
};
|
|
137
129
|
const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
138
130
|
const body = parsedOutput.body;
|
|
139
|
-
const deserialized =
|
|
131
|
+
const deserialized = _json(body);
|
|
140
132
|
const exception = new AuthException({
|
|
141
133
|
$metadata: deserializeMetadata(parsedOutput),
|
|
142
134
|
...deserialized,
|
|
@@ -145,7 +137,7 @@ const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
|
145
137
|
};
|
|
146
138
|
const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
147
139
|
const body = parsedOutput.body;
|
|
148
|
-
const deserialized =
|
|
140
|
+
const deserialized = _json(body);
|
|
149
141
|
const exception = new EC2InstanceNotFoundException({
|
|
150
142
|
$metadata: deserializeMetadata(parsedOutput),
|
|
151
143
|
...deserialized,
|
|
@@ -154,7 +146,7 @@ const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
154
146
|
};
|
|
155
147
|
const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) => {
|
|
156
148
|
const body = parsedOutput.body;
|
|
157
|
-
const deserialized =
|
|
149
|
+
const deserialized = _json(body);
|
|
158
150
|
const exception = new EC2InstanceStateInvalidException({
|
|
159
151
|
$metadata: deserializeMetadata(parsedOutput),
|
|
160
152
|
...deserialized,
|
|
@@ -163,7 +155,7 @@ const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) =>
|
|
|
163
155
|
};
|
|
164
156
|
const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
165
157
|
const body = parsedOutput.body;
|
|
166
|
-
const deserialized =
|
|
158
|
+
const deserialized = _json(body);
|
|
167
159
|
const exception = new EC2InstanceTypeInvalidException({
|
|
168
160
|
$metadata: deserializeMetadata(parsedOutput),
|
|
169
161
|
...deserialized,
|
|
@@ -172,7 +164,7 @@ const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
|
172
164
|
};
|
|
173
165
|
const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
174
166
|
const body = parsedOutput.body;
|
|
175
|
-
const deserialized =
|
|
167
|
+
const deserialized = _json(body);
|
|
176
168
|
const exception = new EC2InstanceUnavailableException({
|
|
177
169
|
$metadata: deserializeMetadata(parsedOutput),
|
|
178
170
|
...deserialized,
|
|
@@ -181,7 +173,7 @@ const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
|
181
173
|
};
|
|
182
174
|
const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
183
175
|
const body = parsedOutput.body;
|
|
184
|
-
const deserialized =
|
|
176
|
+
const deserialized = _json(body);
|
|
185
177
|
const exception = new InvalidArgsException({
|
|
186
178
|
$metadata: deserializeMetadata(parsedOutput),
|
|
187
179
|
...deserialized,
|
|
@@ -190,7 +182,7 @@ const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
|
190
182
|
};
|
|
191
183
|
const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context) => {
|
|
192
184
|
const body = parsedOutput.body;
|
|
193
|
-
const deserialized =
|
|
185
|
+
const deserialized = _json(body);
|
|
194
186
|
const exception = new SerialConsoleAccessDisabledException({
|
|
195
187
|
$metadata: deserializeMetadata(parsedOutput),
|
|
196
188
|
...deserialized,
|
|
@@ -199,7 +191,7 @@ const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context)
|
|
|
199
191
|
};
|
|
200
192
|
const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
201
193
|
const body = parsedOutput.body;
|
|
202
|
-
const deserialized =
|
|
194
|
+
const deserialized = _json(body);
|
|
203
195
|
const exception = new SerialConsoleSessionLimitExceededException({
|
|
204
196
|
$metadata: deserializeMetadata(parsedOutput),
|
|
205
197
|
...deserialized,
|
|
@@ -208,7 +200,7 @@ const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, co
|
|
|
208
200
|
};
|
|
209
201
|
const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
210
202
|
const body = parsedOutput.body;
|
|
211
|
-
const deserialized =
|
|
203
|
+
const deserialized = _json(body);
|
|
212
204
|
const exception = new SerialConsoleSessionUnavailableException({
|
|
213
205
|
$metadata: deserializeMetadata(parsedOutput),
|
|
214
206
|
...deserialized,
|
|
@@ -217,7 +209,7 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, cont
|
|
|
217
209
|
};
|
|
218
210
|
const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
219
211
|
const body = parsedOutput.body;
|
|
220
|
-
const deserialized =
|
|
212
|
+
const deserialized = _json(body);
|
|
221
213
|
const exception = new ServiceException({
|
|
222
214
|
$metadata: deserializeMetadata(parsedOutput),
|
|
223
215
|
...deserialized,
|
|
@@ -226,95 +218,13 @@ const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
226
218
|
};
|
|
227
219
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
228
220
|
const body = parsedOutput.body;
|
|
229
|
-
const deserialized =
|
|
221
|
+
const deserialized = _json(body);
|
|
230
222
|
const exception = new ThrottlingException({
|
|
231
223
|
$metadata: deserializeMetadata(parsedOutput),
|
|
232
224
|
...deserialized,
|
|
233
225
|
});
|
|
234
226
|
return __decorateServiceException(exception, body);
|
|
235
227
|
};
|
|
236
|
-
const se_SendSerialConsoleSSHPublicKeyRequest = (input, context) => {
|
|
237
|
-
return {
|
|
238
|
-
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
239
|
-
...(input.SSHPublicKey != null && { SSHPublicKey: input.SSHPublicKey }),
|
|
240
|
-
...(input.SerialPort != null && { SerialPort: input.SerialPort }),
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
const se_SendSSHPublicKeyRequest = (input, context) => {
|
|
244
|
-
return {
|
|
245
|
-
...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
|
|
246
|
-
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
247
|
-
...(input.InstanceOSUser != null && { InstanceOSUser: input.InstanceOSUser }),
|
|
248
|
-
...(input.SSHPublicKey != null && { SSHPublicKey: input.SSHPublicKey }),
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
const de_AuthException = (output, context) => {
|
|
252
|
-
return {
|
|
253
|
-
Message: __expectString(output.Message),
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
const de_EC2InstanceNotFoundException = (output, context) => {
|
|
257
|
-
return {
|
|
258
|
-
Message: __expectString(output.Message),
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
const de_EC2InstanceStateInvalidException = (output, context) => {
|
|
262
|
-
return {
|
|
263
|
-
Message: __expectString(output.Message),
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
|
-
const de_EC2InstanceTypeInvalidException = (output, context) => {
|
|
267
|
-
return {
|
|
268
|
-
Message: __expectString(output.Message),
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
const de_EC2InstanceUnavailableException = (output, context) => {
|
|
272
|
-
return {
|
|
273
|
-
Message: __expectString(output.Message),
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
const de_InvalidArgsException = (output, context) => {
|
|
277
|
-
return {
|
|
278
|
-
Message: __expectString(output.Message),
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
const de_SendSerialConsoleSSHPublicKeyResponse = (output, context) => {
|
|
282
|
-
return {
|
|
283
|
-
RequestId: __expectString(output.RequestId),
|
|
284
|
-
Success: __expectBoolean(output.Success),
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
const de_SendSSHPublicKeyResponse = (output, context) => {
|
|
288
|
-
return {
|
|
289
|
-
RequestId: __expectString(output.RequestId),
|
|
290
|
-
Success: __expectBoolean(output.Success),
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
|
-
const de_SerialConsoleAccessDisabledException = (output, context) => {
|
|
294
|
-
return {
|
|
295
|
-
Message: __expectString(output.Message),
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
const de_SerialConsoleSessionLimitExceededException = (output, context) => {
|
|
299
|
-
return {
|
|
300
|
-
Message: __expectString(output.Message),
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
const de_SerialConsoleSessionUnavailableException = (output, context) => {
|
|
304
|
-
return {
|
|
305
|
-
Message: __expectString(output.Message),
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
const de_ServiceException = (output, context) => {
|
|
309
|
-
return {
|
|
310
|
-
Message: __expectString(output.Message),
|
|
311
|
-
};
|
|
312
|
-
};
|
|
313
|
-
const de_ThrottlingException = (output, context) => {
|
|
314
|
-
return {
|
|
315
|
-
Message: __expectString(output.Message),
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
228
|
const deserializeMetadata = (output) => ({
|
|
319
229
|
httpStatusCode: output.statusCode,
|
|
320
230
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -328,6 +238,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
328
238
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
329
239
|
};
|
|
330
240
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
241
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
331
242
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
332
243
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
333
244
|
const contents = {
|
|
@@ -346,6 +257,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
346
257
|
}
|
|
347
258
|
return new __HttpRequest(contents);
|
|
348
259
|
};
|
|
260
|
+
function sharedHeaders(operation) {
|
|
261
|
+
return {
|
|
262
|
+
"content-type": "application/x-amz-json-1.1",
|
|
263
|
+
"x-amz-target": `AWSEC2InstanceConnectService.${operation}`,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
349
266
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
350
267
|
if (encoded.length) {
|
|
351
268
|
return JSON.parse(encoded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ec2-instance-connect",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ec2 Instance Connect Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|