@aws-sdk/client-ec2-instance-connect 3.927.0 → 3.929.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/index.js +277 -281
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/EC2InstanceConnectClient.js +2 -0
- package/dist-es/commands/SendSSHPublicKeyCommand.js +3 -9
- package/dist-es/commands/SendSerialConsoleSSHPublicKeyCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +235 -0
- package/dist-types/EC2InstanceConnectClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +20 -0
- package/dist-types/ts3.4/EC2InstanceConnectClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +24 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_json1_1.js +0 -235
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -20
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -29
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { EC2InstanceConnectServiceException as __BaseException } from "../models/EC2InstanceConnectServiceException";
|
|
5
|
-
import { AuthException, EC2InstanceNotFoundException, EC2InstanceStateInvalidException, EC2InstanceTypeInvalidException, EC2InstanceUnavailableException, InvalidArgsException, SerialConsoleAccessDisabledException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, SerialConsoleSessionUnsupportedException, ServiceException, ThrottlingException, } from "../models/models_0";
|
|
6
|
-
export const se_SendSerialConsoleSSHPublicKeyCommand = async (input, context) => {
|
|
7
|
-
const headers = sharedHeaders("SendSerialConsoleSSHPublicKey");
|
|
8
|
-
let body;
|
|
9
|
-
body = JSON.stringify(_json(input));
|
|
10
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
-
};
|
|
12
|
-
export const se_SendSSHPublicKeyCommand = async (input, context) => {
|
|
13
|
-
const headers = sharedHeaders("SendSSHPublicKey");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify(_json(input));
|
|
16
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
|
-
};
|
|
18
|
-
export const de_SendSerialConsoleSSHPublicKeyCommand = async (output, context) => {
|
|
19
|
-
if (output.statusCode >= 300) {
|
|
20
|
-
return de_CommandError(output, context);
|
|
21
|
-
}
|
|
22
|
-
const data = await parseBody(output.body, context);
|
|
23
|
-
let contents = {};
|
|
24
|
-
contents = _json(data);
|
|
25
|
-
const response = {
|
|
26
|
-
$metadata: deserializeMetadata(output),
|
|
27
|
-
...contents,
|
|
28
|
-
};
|
|
29
|
-
return response;
|
|
30
|
-
};
|
|
31
|
-
export const de_SendSSHPublicKeyCommand = async (output, context) => {
|
|
32
|
-
if (output.statusCode >= 300) {
|
|
33
|
-
return de_CommandError(output, context);
|
|
34
|
-
}
|
|
35
|
-
const data = await parseBody(output.body, context);
|
|
36
|
-
let contents = {};
|
|
37
|
-
contents = _json(data);
|
|
38
|
-
const response = {
|
|
39
|
-
$metadata: deserializeMetadata(output),
|
|
40
|
-
...contents,
|
|
41
|
-
};
|
|
42
|
-
return response;
|
|
43
|
-
};
|
|
44
|
-
const de_CommandError = async (output, context) => {
|
|
45
|
-
const parsedOutput = {
|
|
46
|
-
...output,
|
|
47
|
-
body: await parseErrorBody(output.body, context),
|
|
48
|
-
};
|
|
49
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
50
|
-
switch (errorCode) {
|
|
51
|
-
case "AuthException":
|
|
52
|
-
case "com.amazonaws.ec2instanceconnect#AuthException":
|
|
53
|
-
throw await de_AuthExceptionRes(parsedOutput, context);
|
|
54
|
-
case "EC2InstanceNotFoundException":
|
|
55
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException":
|
|
56
|
-
throw await de_EC2InstanceNotFoundExceptionRes(parsedOutput, context);
|
|
57
|
-
case "EC2InstanceStateInvalidException":
|
|
58
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
|
|
59
|
-
throw await de_EC2InstanceStateInvalidExceptionRes(parsedOutput, context);
|
|
60
|
-
case "EC2InstanceTypeInvalidException":
|
|
61
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException":
|
|
62
|
-
throw await de_EC2InstanceTypeInvalidExceptionRes(parsedOutput, context);
|
|
63
|
-
case "EC2InstanceUnavailableException":
|
|
64
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceUnavailableException":
|
|
65
|
-
throw await de_EC2InstanceUnavailableExceptionRes(parsedOutput, context);
|
|
66
|
-
case "InvalidArgsException":
|
|
67
|
-
case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
|
|
68
|
-
throw await de_InvalidArgsExceptionRes(parsedOutput, context);
|
|
69
|
-
case "SerialConsoleAccessDisabledException":
|
|
70
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException":
|
|
71
|
-
throw await de_SerialConsoleAccessDisabledExceptionRes(parsedOutput, context);
|
|
72
|
-
case "SerialConsoleSessionLimitExceededException":
|
|
73
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionLimitExceededException":
|
|
74
|
-
throw await de_SerialConsoleSessionLimitExceededExceptionRes(parsedOutput, context);
|
|
75
|
-
case "SerialConsoleSessionUnavailableException":
|
|
76
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException":
|
|
77
|
-
throw await de_SerialConsoleSessionUnavailableExceptionRes(parsedOutput, context);
|
|
78
|
-
case "SerialConsoleSessionUnsupportedException":
|
|
79
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException":
|
|
80
|
-
throw await de_SerialConsoleSessionUnsupportedExceptionRes(parsedOutput, context);
|
|
81
|
-
case "ServiceException":
|
|
82
|
-
case "com.amazonaws.ec2instanceconnect#ServiceException":
|
|
83
|
-
throw await de_ServiceExceptionRes(parsedOutput, context);
|
|
84
|
-
case "ThrottlingException":
|
|
85
|
-
case "com.amazonaws.ec2instanceconnect#ThrottlingException":
|
|
86
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
87
|
-
default:
|
|
88
|
-
const parsedBody = parsedOutput.body;
|
|
89
|
-
return throwDefaultError({
|
|
90
|
-
output,
|
|
91
|
-
parsedBody,
|
|
92
|
-
errorCode,
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
97
|
-
const body = parsedOutput.body;
|
|
98
|
-
const deserialized = _json(body);
|
|
99
|
-
const exception = new AuthException({
|
|
100
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
101
|
-
...deserialized,
|
|
102
|
-
});
|
|
103
|
-
return __decorateServiceException(exception, body);
|
|
104
|
-
};
|
|
105
|
-
const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
106
|
-
const body = parsedOutput.body;
|
|
107
|
-
const deserialized = _json(body);
|
|
108
|
-
const exception = new EC2InstanceNotFoundException({
|
|
109
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
110
|
-
...deserialized,
|
|
111
|
-
});
|
|
112
|
-
return __decorateServiceException(exception, body);
|
|
113
|
-
};
|
|
114
|
-
const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) => {
|
|
115
|
-
const body = parsedOutput.body;
|
|
116
|
-
const deserialized = _json(body);
|
|
117
|
-
const exception = new EC2InstanceStateInvalidException({
|
|
118
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
119
|
-
...deserialized,
|
|
120
|
-
});
|
|
121
|
-
return __decorateServiceException(exception, body);
|
|
122
|
-
};
|
|
123
|
-
const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
124
|
-
const body = parsedOutput.body;
|
|
125
|
-
const deserialized = _json(body);
|
|
126
|
-
const exception = new EC2InstanceTypeInvalidException({
|
|
127
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
128
|
-
...deserialized,
|
|
129
|
-
});
|
|
130
|
-
return __decorateServiceException(exception, body);
|
|
131
|
-
};
|
|
132
|
-
const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
133
|
-
const body = parsedOutput.body;
|
|
134
|
-
const deserialized = _json(body);
|
|
135
|
-
const exception = new EC2InstanceUnavailableException({
|
|
136
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
137
|
-
...deserialized,
|
|
138
|
-
});
|
|
139
|
-
return __decorateServiceException(exception, body);
|
|
140
|
-
};
|
|
141
|
-
const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
142
|
-
const body = parsedOutput.body;
|
|
143
|
-
const deserialized = _json(body);
|
|
144
|
-
const exception = new InvalidArgsException({
|
|
145
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
146
|
-
...deserialized,
|
|
147
|
-
});
|
|
148
|
-
return __decorateServiceException(exception, body);
|
|
149
|
-
};
|
|
150
|
-
const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context) => {
|
|
151
|
-
const body = parsedOutput.body;
|
|
152
|
-
const deserialized = _json(body);
|
|
153
|
-
const exception = new SerialConsoleAccessDisabledException({
|
|
154
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
155
|
-
...deserialized,
|
|
156
|
-
});
|
|
157
|
-
return __decorateServiceException(exception, body);
|
|
158
|
-
};
|
|
159
|
-
const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
160
|
-
const body = parsedOutput.body;
|
|
161
|
-
const deserialized = _json(body);
|
|
162
|
-
const exception = new SerialConsoleSessionLimitExceededException({
|
|
163
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
164
|
-
...deserialized,
|
|
165
|
-
});
|
|
166
|
-
return __decorateServiceException(exception, body);
|
|
167
|
-
};
|
|
168
|
-
const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
169
|
-
const body = parsedOutput.body;
|
|
170
|
-
const deserialized = _json(body);
|
|
171
|
-
const exception = new SerialConsoleSessionUnavailableException({
|
|
172
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
173
|
-
...deserialized,
|
|
174
|
-
});
|
|
175
|
-
return __decorateServiceException(exception, body);
|
|
176
|
-
};
|
|
177
|
-
const de_SerialConsoleSessionUnsupportedExceptionRes = async (parsedOutput, context) => {
|
|
178
|
-
const body = parsedOutput.body;
|
|
179
|
-
const deserialized = _json(body);
|
|
180
|
-
const exception = new SerialConsoleSessionUnsupportedException({
|
|
181
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
182
|
-
...deserialized,
|
|
183
|
-
});
|
|
184
|
-
return __decorateServiceException(exception, body);
|
|
185
|
-
};
|
|
186
|
-
const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
187
|
-
const body = parsedOutput.body;
|
|
188
|
-
const deserialized = _json(body);
|
|
189
|
-
const exception = new ServiceException({
|
|
190
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
191
|
-
...deserialized,
|
|
192
|
-
});
|
|
193
|
-
return __decorateServiceException(exception, body);
|
|
194
|
-
};
|
|
195
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
196
|
-
const body = parsedOutput.body;
|
|
197
|
-
const deserialized = _json(body);
|
|
198
|
-
const exception = new ThrottlingException({
|
|
199
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
200
|
-
...deserialized,
|
|
201
|
-
});
|
|
202
|
-
return __decorateServiceException(exception, body);
|
|
203
|
-
};
|
|
204
|
-
const deserializeMetadata = (output) => ({
|
|
205
|
-
httpStatusCode: output.statusCode,
|
|
206
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
207
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
208
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
209
|
-
});
|
|
210
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
211
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
212
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
213
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
214
|
-
const contents = {
|
|
215
|
-
protocol,
|
|
216
|
-
hostname,
|
|
217
|
-
port,
|
|
218
|
-
method: "POST",
|
|
219
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
220
|
-
headers,
|
|
221
|
-
};
|
|
222
|
-
if (resolvedHostname !== undefined) {
|
|
223
|
-
contents.hostname = resolvedHostname;
|
|
224
|
-
}
|
|
225
|
-
if (body !== undefined) {
|
|
226
|
-
contents.body = body;
|
|
227
|
-
}
|
|
228
|
-
return new __HttpRequest(contents);
|
|
229
|
-
};
|
|
230
|
-
function sharedHeaders(operation) {
|
|
231
|
-
return {
|
|
232
|
-
"content-type": "application/x-amz-json-1.1",
|
|
233
|
-
"x-amz-target": `AWSEC2InstanceConnectService.${operation}`,
|
|
234
|
-
};
|
|
235
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { SendSerialConsoleSSHPublicKeyCommandInput, SendSerialConsoleSSHPublicKeyCommandOutput } from "../commands/SendSerialConsoleSSHPublicKeyCommand";
|
|
4
|
-
import { SendSSHPublicKeyCommandInput, SendSSHPublicKeyCommandOutput } from "../commands/SendSSHPublicKeyCommand";
|
|
5
|
-
/**
|
|
6
|
-
* serializeAws_json1_1SendSerialConsoleSSHPublicKeyCommand
|
|
7
|
-
*/
|
|
8
|
-
export declare const se_SendSerialConsoleSSHPublicKeyCommand: (input: SendSerialConsoleSSHPublicKeyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
9
|
-
/**
|
|
10
|
-
* serializeAws_json1_1SendSSHPublicKeyCommand
|
|
11
|
-
*/
|
|
12
|
-
export declare const se_SendSSHPublicKeyCommand: (input: SendSSHPublicKeyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
13
|
-
/**
|
|
14
|
-
* deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommand
|
|
15
|
-
*/
|
|
16
|
-
export declare const de_SendSerialConsoleSSHPublicKeyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SendSerialConsoleSSHPublicKeyCommandOutput>;
|
|
17
|
-
/**
|
|
18
|
-
* deserializeAws_json1_1SendSSHPublicKeyCommand
|
|
19
|
-
*/
|
|
20
|
-
export declare const de_SendSSHPublicKeyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SendSSHPublicKeyCommandOutput>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpRequest as __HttpRequest,
|
|
3
|
-
HttpResponse as __HttpResponse,
|
|
4
|
-
} from "@smithy/protocol-http";
|
|
5
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
6
|
-
import {
|
|
7
|
-
SendSerialConsoleSSHPublicKeyCommandInput,
|
|
8
|
-
SendSerialConsoleSSHPublicKeyCommandOutput,
|
|
9
|
-
} from "../commands/SendSerialConsoleSSHPublicKeyCommand";
|
|
10
|
-
import {
|
|
11
|
-
SendSSHPublicKeyCommandInput,
|
|
12
|
-
SendSSHPublicKeyCommandOutput,
|
|
13
|
-
} from "../commands/SendSSHPublicKeyCommand";
|
|
14
|
-
export declare const se_SendSerialConsoleSSHPublicKeyCommand: (
|
|
15
|
-
input: SendSerialConsoleSSHPublicKeyCommandInput,
|
|
16
|
-
context: __SerdeContext
|
|
17
|
-
) => Promise<__HttpRequest>;
|
|
18
|
-
export declare const se_SendSSHPublicKeyCommand: (
|
|
19
|
-
input: SendSSHPublicKeyCommandInput,
|
|
20
|
-
context: __SerdeContext
|
|
21
|
-
) => Promise<__HttpRequest>;
|
|
22
|
-
export declare const de_SendSerialConsoleSSHPublicKeyCommand: (
|
|
23
|
-
output: __HttpResponse,
|
|
24
|
-
context: __SerdeContext
|
|
25
|
-
) => Promise<SendSerialConsoleSSHPublicKeyCommandOutput>;
|
|
26
|
-
export declare const de_SendSSHPublicKeyCommand: (
|
|
27
|
-
output: __HttpResponse,
|
|
28
|
-
context: __SerdeContext
|
|
29
|
-
) => Promise<SendSSHPublicKeyCommandOutput>;
|