@aws-sdk/client-ec2-instance-connect 3.489.0 → 3.495.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/EC2InstanceConnect.js +1 -15
- package/dist-cjs/EC2InstanceConnectClient.js +1 -43
- package/dist-cjs/commands/SendSSHPublicKeyCommand.js +1 -28
- package/dist-cjs/commands/SendSerialConsoleSSHPublicKeyCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -5
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +715 -10
- package/dist-cjs/models/EC2InstanceConnectServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -158
- package/dist-cjs/protocols/Aws_json1_1.js +1 -306
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +39 -39
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EC2InstanceConnectServiceException = 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 EC2InstanceConnectServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, EC2InstanceConnectServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.EC2InstanceConnectServiceException = EC2InstanceConnectServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,158 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThrottlingException = exports.ServiceException = exports.SerialConsoleSessionUnavailableException = exports.SerialConsoleSessionLimitExceededException = exports.SerialConsoleAccessDisabledException = exports.InvalidArgsException = exports.EC2InstanceUnavailableException = exports.EC2InstanceTypeInvalidException = exports.EC2InstanceStateInvalidException = exports.EC2InstanceNotFoundException = exports.AuthException = void 0;
|
|
4
|
-
const EC2InstanceConnectServiceException_1 = require("./EC2InstanceConnectServiceException");
|
|
5
|
-
class AuthException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
name: "AuthException",
|
|
9
|
-
$fault: "client",
|
|
10
|
-
...opts,
|
|
11
|
-
});
|
|
12
|
-
this.name = "AuthException";
|
|
13
|
-
this.$fault = "client";
|
|
14
|
-
Object.setPrototypeOf(this, AuthException.prototype);
|
|
15
|
-
this.Message = opts.Message;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.AuthException = AuthException;
|
|
19
|
-
class EC2InstanceNotFoundException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
20
|
-
constructor(opts) {
|
|
21
|
-
super({
|
|
22
|
-
name: "EC2InstanceNotFoundException",
|
|
23
|
-
$fault: "client",
|
|
24
|
-
...opts,
|
|
25
|
-
});
|
|
26
|
-
this.name = "EC2InstanceNotFoundException";
|
|
27
|
-
this.$fault = "client";
|
|
28
|
-
Object.setPrototypeOf(this, EC2InstanceNotFoundException.prototype);
|
|
29
|
-
this.Message = opts.Message;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.EC2InstanceNotFoundException = EC2InstanceNotFoundException;
|
|
33
|
-
class EC2InstanceStateInvalidException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "EC2InstanceStateInvalidException",
|
|
37
|
-
$fault: "client",
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
this.name = "EC2InstanceStateInvalidException";
|
|
41
|
-
this.$fault = "client";
|
|
42
|
-
Object.setPrototypeOf(this, EC2InstanceStateInvalidException.prototype);
|
|
43
|
-
this.Message = opts.Message;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.EC2InstanceStateInvalidException = EC2InstanceStateInvalidException;
|
|
47
|
-
class EC2InstanceTypeInvalidException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
48
|
-
constructor(opts) {
|
|
49
|
-
super({
|
|
50
|
-
name: "EC2InstanceTypeInvalidException",
|
|
51
|
-
$fault: "client",
|
|
52
|
-
...opts,
|
|
53
|
-
});
|
|
54
|
-
this.name = "EC2InstanceTypeInvalidException";
|
|
55
|
-
this.$fault = "client";
|
|
56
|
-
Object.setPrototypeOf(this, EC2InstanceTypeInvalidException.prototype);
|
|
57
|
-
this.Message = opts.Message;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.EC2InstanceTypeInvalidException = EC2InstanceTypeInvalidException;
|
|
61
|
-
class EC2InstanceUnavailableException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
62
|
-
constructor(opts) {
|
|
63
|
-
super({
|
|
64
|
-
name: "EC2InstanceUnavailableException",
|
|
65
|
-
$fault: "server",
|
|
66
|
-
...opts,
|
|
67
|
-
});
|
|
68
|
-
this.name = "EC2InstanceUnavailableException";
|
|
69
|
-
this.$fault = "server";
|
|
70
|
-
Object.setPrototypeOf(this, EC2InstanceUnavailableException.prototype);
|
|
71
|
-
this.Message = opts.Message;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.EC2InstanceUnavailableException = EC2InstanceUnavailableException;
|
|
75
|
-
class InvalidArgsException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
76
|
-
constructor(opts) {
|
|
77
|
-
super({
|
|
78
|
-
name: "InvalidArgsException",
|
|
79
|
-
$fault: "client",
|
|
80
|
-
...opts,
|
|
81
|
-
});
|
|
82
|
-
this.name = "InvalidArgsException";
|
|
83
|
-
this.$fault = "client";
|
|
84
|
-
Object.setPrototypeOf(this, InvalidArgsException.prototype);
|
|
85
|
-
this.Message = opts.Message;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.InvalidArgsException = InvalidArgsException;
|
|
89
|
-
class SerialConsoleAccessDisabledException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
90
|
-
constructor(opts) {
|
|
91
|
-
super({
|
|
92
|
-
name: "SerialConsoleAccessDisabledException",
|
|
93
|
-
$fault: "client",
|
|
94
|
-
...opts,
|
|
95
|
-
});
|
|
96
|
-
this.name = "SerialConsoleAccessDisabledException";
|
|
97
|
-
this.$fault = "client";
|
|
98
|
-
Object.setPrototypeOf(this, SerialConsoleAccessDisabledException.prototype);
|
|
99
|
-
this.Message = opts.Message;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.SerialConsoleAccessDisabledException = SerialConsoleAccessDisabledException;
|
|
103
|
-
class SerialConsoleSessionLimitExceededException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
104
|
-
constructor(opts) {
|
|
105
|
-
super({
|
|
106
|
-
name: "SerialConsoleSessionLimitExceededException",
|
|
107
|
-
$fault: "client",
|
|
108
|
-
...opts,
|
|
109
|
-
});
|
|
110
|
-
this.name = "SerialConsoleSessionLimitExceededException";
|
|
111
|
-
this.$fault = "client";
|
|
112
|
-
Object.setPrototypeOf(this, SerialConsoleSessionLimitExceededException.prototype);
|
|
113
|
-
this.Message = opts.Message;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
exports.SerialConsoleSessionLimitExceededException = SerialConsoleSessionLimitExceededException;
|
|
117
|
-
class SerialConsoleSessionUnavailableException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
118
|
-
constructor(opts) {
|
|
119
|
-
super({
|
|
120
|
-
name: "SerialConsoleSessionUnavailableException",
|
|
121
|
-
$fault: "server",
|
|
122
|
-
...opts,
|
|
123
|
-
});
|
|
124
|
-
this.name = "SerialConsoleSessionUnavailableException";
|
|
125
|
-
this.$fault = "server";
|
|
126
|
-
Object.setPrototypeOf(this, SerialConsoleSessionUnavailableException.prototype);
|
|
127
|
-
this.Message = opts.Message;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports.SerialConsoleSessionUnavailableException = SerialConsoleSessionUnavailableException;
|
|
131
|
-
class ServiceException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
132
|
-
constructor(opts) {
|
|
133
|
-
super({
|
|
134
|
-
name: "ServiceException",
|
|
135
|
-
$fault: "server",
|
|
136
|
-
...opts,
|
|
137
|
-
});
|
|
138
|
-
this.name = "ServiceException";
|
|
139
|
-
this.$fault = "server";
|
|
140
|
-
Object.setPrototypeOf(this, ServiceException.prototype);
|
|
141
|
-
this.Message = opts.Message;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
exports.ServiceException = ServiceException;
|
|
145
|
-
class ThrottlingException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
146
|
-
constructor(opts) {
|
|
147
|
-
super({
|
|
148
|
-
name: "ThrottlingException",
|
|
149
|
-
$fault: "client",
|
|
150
|
-
...opts,
|
|
151
|
-
});
|
|
152
|
-
this.name = "ThrottlingException";
|
|
153
|
-
this.$fault = "client";
|
|
154
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
155
|
-
this.Message = opts.Message;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
exports.ThrottlingException = ThrottlingException;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,306 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_SendSSHPublicKeyCommand = exports.de_SendSerialConsoleSSHPublicKeyCommand = exports.se_SendSSHPublicKeyCommand = exports.se_SendSerialConsoleSSHPublicKeyCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const EC2InstanceConnectServiceException_1 = require("../models/EC2InstanceConnectServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_SendSerialConsoleSSHPublicKeyCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("SendSerialConsoleSSHPublicKey");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_SendSerialConsoleSSHPublicKeyCommand = se_SendSerialConsoleSSHPublicKeyCommand;
|
|
15
|
-
const se_SendSSHPublicKeyCommand = async (input, context) => {
|
|
16
|
-
const headers = sharedHeaders("SendSSHPublicKey");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
-
};
|
|
21
|
-
exports.se_SendSSHPublicKeyCommand = se_SendSSHPublicKeyCommand;
|
|
22
|
-
const de_SendSerialConsoleSSHPublicKeyCommand = async (output, context) => {
|
|
23
|
-
if (output.statusCode >= 300) {
|
|
24
|
-
return de_SendSerialConsoleSSHPublicKeyCommandError(output, context);
|
|
25
|
-
}
|
|
26
|
-
const data = await parseBody(output.body, context);
|
|
27
|
-
let contents = {};
|
|
28
|
-
contents = (0, smithy_client_1._json)(data);
|
|
29
|
-
const response = {
|
|
30
|
-
$metadata: deserializeMetadata(output),
|
|
31
|
-
...contents,
|
|
32
|
-
};
|
|
33
|
-
return response;
|
|
34
|
-
};
|
|
35
|
-
exports.de_SendSerialConsoleSSHPublicKeyCommand = de_SendSerialConsoleSSHPublicKeyCommand;
|
|
36
|
-
const de_SendSerialConsoleSSHPublicKeyCommandError = async (output, context) => {
|
|
37
|
-
const parsedOutput = {
|
|
38
|
-
...output,
|
|
39
|
-
body: await parseErrorBody(output.body, context),
|
|
40
|
-
};
|
|
41
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
42
|
-
switch (errorCode) {
|
|
43
|
-
case "AuthException":
|
|
44
|
-
case "com.amazonaws.ec2instanceconnect#AuthException":
|
|
45
|
-
throw await de_AuthExceptionRes(parsedOutput, context);
|
|
46
|
-
case "EC2InstanceNotFoundException":
|
|
47
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException":
|
|
48
|
-
throw await de_EC2InstanceNotFoundExceptionRes(parsedOutput, context);
|
|
49
|
-
case "EC2InstanceStateInvalidException":
|
|
50
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
|
|
51
|
-
throw await de_EC2InstanceStateInvalidExceptionRes(parsedOutput, context);
|
|
52
|
-
case "EC2InstanceTypeInvalidException":
|
|
53
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException":
|
|
54
|
-
throw await de_EC2InstanceTypeInvalidExceptionRes(parsedOutput, context);
|
|
55
|
-
case "EC2InstanceUnavailableException":
|
|
56
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceUnavailableException":
|
|
57
|
-
throw await de_EC2InstanceUnavailableExceptionRes(parsedOutput, context);
|
|
58
|
-
case "InvalidArgsException":
|
|
59
|
-
case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
|
|
60
|
-
throw await de_InvalidArgsExceptionRes(parsedOutput, context);
|
|
61
|
-
case "SerialConsoleAccessDisabledException":
|
|
62
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException":
|
|
63
|
-
throw await de_SerialConsoleAccessDisabledExceptionRes(parsedOutput, context);
|
|
64
|
-
case "SerialConsoleSessionLimitExceededException":
|
|
65
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionLimitExceededException":
|
|
66
|
-
throw await de_SerialConsoleSessionLimitExceededExceptionRes(parsedOutput, context);
|
|
67
|
-
case "SerialConsoleSessionUnavailableException":
|
|
68
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException":
|
|
69
|
-
throw await de_SerialConsoleSessionUnavailableExceptionRes(parsedOutput, context);
|
|
70
|
-
case "ServiceException":
|
|
71
|
-
case "com.amazonaws.ec2instanceconnect#ServiceException":
|
|
72
|
-
throw await de_ServiceExceptionRes(parsedOutput, context);
|
|
73
|
-
case "ThrottlingException":
|
|
74
|
-
case "com.amazonaws.ec2instanceconnect#ThrottlingException":
|
|
75
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
76
|
-
default:
|
|
77
|
-
const parsedBody = parsedOutput.body;
|
|
78
|
-
return throwDefaultError({
|
|
79
|
-
output,
|
|
80
|
-
parsedBody,
|
|
81
|
-
errorCode,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
const de_SendSSHPublicKeyCommand = async (output, context) => {
|
|
86
|
-
if (output.statusCode >= 300) {
|
|
87
|
-
return de_SendSSHPublicKeyCommandError(output, context);
|
|
88
|
-
}
|
|
89
|
-
const data = await parseBody(output.body, context);
|
|
90
|
-
let contents = {};
|
|
91
|
-
contents = (0, smithy_client_1._json)(data);
|
|
92
|
-
const response = {
|
|
93
|
-
$metadata: deserializeMetadata(output),
|
|
94
|
-
...contents,
|
|
95
|
-
};
|
|
96
|
-
return response;
|
|
97
|
-
};
|
|
98
|
-
exports.de_SendSSHPublicKeyCommand = de_SendSSHPublicKeyCommand;
|
|
99
|
-
const de_SendSSHPublicKeyCommandError = async (output, context) => {
|
|
100
|
-
const parsedOutput = {
|
|
101
|
-
...output,
|
|
102
|
-
body: await parseErrorBody(output.body, context),
|
|
103
|
-
};
|
|
104
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
105
|
-
switch (errorCode) {
|
|
106
|
-
case "AuthException":
|
|
107
|
-
case "com.amazonaws.ec2instanceconnect#AuthException":
|
|
108
|
-
throw await de_AuthExceptionRes(parsedOutput, context);
|
|
109
|
-
case "EC2InstanceNotFoundException":
|
|
110
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException":
|
|
111
|
-
throw await de_EC2InstanceNotFoundExceptionRes(parsedOutput, context);
|
|
112
|
-
case "EC2InstanceStateInvalidException":
|
|
113
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
|
|
114
|
-
throw await de_EC2InstanceStateInvalidExceptionRes(parsedOutput, context);
|
|
115
|
-
case "EC2InstanceUnavailableException":
|
|
116
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceUnavailableException":
|
|
117
|
-
throw await de_EC2InstanceUnavailableExceptionRes(parsedOutput, context);
|
|
118
|
-
case "InvalidArgsException":
|
|
119
|
-
case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
|
|
120
|
-
throw await de_InvalidArgsExceptionRes(parsedOutput, context);
|
|
121
|
-
case "ServiceException":
|
|
122
|
-
case "com.amazonaws.ec2instanceconnect#ServiceException":
|
|
123
|
-
throw await de_ServiceExceptionRes(parsedOutput, context);
|
|
124
|
-
case "ThrottlingException":
|
|
125
|
-
case "com.amazonaws.ec2instanceconnect#ThrottlingException":
|
|
126
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
127
|
-
default:
|
|
128
|
-
const parsedBody = parsedOutput.body;
|
|
129
|
-
return throwDefaultError({
|
|
130
|
-
output,
|
|
131
|
-
parsedBody,
|
|
132
|
-
errorCode,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
137
|
-
const body = parsedOutput.body;
|
|
138
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
139
|
-
const exception = new models_0_1.AuthException({
|
|
140
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
141
|
-
...deserialized,
|
|
142
|
-
});
|
|
143
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
144
|
-
};
|
|
145
|
-
const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
146
|
-
const body = parsedOutput.body;
|
|
147
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
148
|
-
const exception = new models_0_1.EC2InstanceNotFoundException({
|
|
149
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
150
|
-
...deserialized,
|
|
151
|
-
});
|
|
152
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
153
|
-
};
|
|
154
|
-
const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) => {
|
|
155
|
-
const body = parsedOutput.body;
|
|
156
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
157
|
-
const exception = new models_0_1.EC2InstanceStateInvalidException({
|
|
158
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
159
|
-
...deserialized,
|
|
160
|
-
});
|
|
161
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
162
|
-
};
|
|
163
|
-
const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
164
|
-
const body = parsedOutput.body;
|
|
165
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
166
|
-
const exception = new models_0_1.EC2InstanceTypeInvalidException({
|
|
167
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
168
|
-
...deserialized,
|
|
169
|
-
});
|
|
170
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
171
|
-
};
|
|
172
|
-
const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
173
|
-
const body = parsedOutput.body;
|
|
174
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
175
|
-
const exception = new models_0_1.EC2InstanceUnavailableException({
|
|
176
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
177
|
-
...deserialized,
|
|
178
|
-
});
|
|
179
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
180
|
-
};
|
|
181
|
-
const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
182
|
-
const body = parsedOutput.body;
|
|
183
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
184
|
-
const exception = new models_0_1.InvalidArgsException({
|
|
185
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
186
|
-
...deserialized,
|
|
187
|
-
});
|
|
188
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
189
|
-
};
|
|
190
|
-
const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context) => {
|
|
191
|
-
const body = parsedOutput.body;
|
|
192
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
193
|
-
const exception = new models_0_1.SerialConsoleAccessDisabledException({
|
|
194
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
195
|
-
...deserialized,
|
|
196
|
-
});
|
|
197
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
198
|
-
};
|
|
199
|
-
const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
200
|
-
const body = parsedOutput.body;
|
|
201
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
202
|
-
const exception = new models_0_1.SerialConsoleSessionLimitExceededException({
|
|
203
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
204
|
-
...deserialized,
|
|
205
|
-
});
|
|
206
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
207
|
-
};
|
|
208
|
-
const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
209
|
-
const body = parsedOutput.body;
|
|
210
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
211
|
-
const exception = new models_0_1.SerialConsoleSessionUnavailableException({
|
|
212
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
213
|
-
...deserialized,
|
|
214
|
-
});
|
|
215
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
216
|
-
};
|
|
217
|
-
const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
218
|
-
const body = parsedOutput.body;
|
|
219
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
220
|
-
const exception = new models_0_1.ServiceException({
|
|
221
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
222
|
-
...deserialized,
|
|
223
|
-
});
|
|
224
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
225
|
-
};
|
|
226
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
227
|
-
const body = parsedOutput.body;
|
|
228
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
229
|
-
const exception = new models_0_1.ThrottlingException({
|
|
230
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
231
|
-
...deserialized,
|
|
232
|
-
});
|
|
233
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
234
|
-
};
|
|
235
|
-
const deserializeMetadata = (output) => ({
|
|
236
|
-
httpStatusCode: output.statusCode,
|
|
237
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
238
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
239
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
240
|
-
});
|
|
241
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
242
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException);
|
|
243
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
244
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
245
|
-
const contents = {
|
|
246
|
-
protocol,
|
|
247
|
-
hostname,
|
|
248
|
-
port,
|
|
249
|
-
method: "POST",
|
|
250
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
251
|
-
headers,
|
|
252
|
-
};
|
|
253
|
-
if (resolvedHostname !== undefined) {
|
|
254
|
-
contents.hostname = resolvedHostname;
|
|
255
|
-
}
|
|
256
|
-
if (body !== undefined) {
|
|
257
|
-
contents.body = body;
|
|
258
|
-
}
|
|
259
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
260
|
-
};
|
|
261
|
-
function sharedHeaders(operation) {
|
|
262
|
-
return {
|
|
263
|
-
"content-type": "application/x-amz-json-1.1",
|
|
264
|
-
"x-amz-target": `AWSEC2InstanceConnectService.${operation}`,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
268
|
-
if (encoded.length) {
|
|
269
|
-
return JSON.parse(encoded);
|
|
270
|
-
}
|
|
271
|
-
return {};
|
|
272
|
-
});
|
|
273
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
274
|
-
const value = await parseBody(errorBody, context);
|
|
275
|
-
value.message = value.message ?? value.Message;
|
|
276
|
-
return value;
|
|
277
|
-
};
|
|
278
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
279
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
280
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
281
|
-
let cleanValue = rawValue;
|
|
282
|
-
if (typeof cleanValue === "number") {
|
|
283
|
-
cleanValue = cleanValue.toString();
|
|
284
|
-
}
|
|
285
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
286
|
-
cleanValue = cleanValue.split(",")[0];
|
|
287
|
-
}
|
|
288
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
289
|
-
cleanValue = cleanValue.split(":")[0];
|
|
290
|
-
}
|
|
291
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
292
|
-
cleanValue = cleanValue.split("#")[1];
|
|
293
|
-
}
|
|
294
|
-
return cleanValue;
|
|
295
|
-
};
|
|
296
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
297
|
-
if (headerKey !== undefined) {
|
|
298
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
299
|
-
}
|
|
300
|
-
if (data.code !== undefined) {
|
|
301
|
-
return sanitizeErrorCode(data.code);
|
|
302
|
-
}
|
|
303
|
-
if (data["__type"] !== undefined) {
|
|
304
|
-
return sanitizeErrorCode(data["__type"]);
|
|
305
|
-
}
|
|
306
|
-
};
|
|
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");
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.495.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
|
-
"build:cjs": "
|
|
7
|
+
"build:cjs": "node ../../scripts/compilation/inline client-ec2-instance-connect",
|
|
8
8
|
"build:es": "tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
10
10
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -20,46 +20,46 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
27
|
-
"@aws-sdk/middleware-logger": "3.
|
|
28
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
29
|
-
"@aws-sdk/middleware-signing": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
34
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
36
|
-
"@smithy/config-resolver": "^2.0
|
|
37
|
-
"@smithy/fetch-http-handler": "^2.
|
|
38
|
-
"@smithy/hash-node": "^2.0
|
|
39
|
-
"@smithy/invalid-dependency": "^2.0
|
|
40
|
-
"@smithy/middleware-content-length": "^2.0
|
|
41
|
-
"@smithy/middleware-endpoint": "^2.
|
|
42
|
-
"@smithy/middleware-retry": "^2.0
|
|
43
|
-
"@smithy/middleware-serde": "^2.0
|
|
44
|
-
"@smithy/middleware-stack": "^2.0
|
|
45
|
-
"@smithy/node-config-provider": "^2.
|
|
46
|
-
"@smithy/node-http-handler": "^2.
|
|
47
|
-
"@smithy/protocol-http": "^3.0
|
|
48
|
-
"@smithy/smithy-client": "^2.
|
|
49
|
-
"@smithy/types": "^2.
|
|
50
|
-
"@smithy/url-parser": "^2.0
|
|
51
|
-
"@smithy/util-base64": "^2.0
|
|
52
|
-
"@smithy/util-body-length-browser": "^2.0
|
|
53
|
-
"@smithy/util-body-length-node": "^2.
|
|
54
|
-
"@smithy/util-defaults-mode-browser": "^2.0
|
|
55
|
-
"@smithy/util-defaults-mode-node": "^2.0
|
|
56
|
-
"@smithy/util-endpoints": "^1.0
|
|
57
|
-
"@smithy/util-retry": "^2.0
|
|
58
|
-
"@smithy/util-utf8": "^2.0
|
|
23
|
+
"@aws-sdk/client-sts": "3.495.0",
|
|
24
|
+
"@aws-sdk/core": "3.495.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.495.0",
|
|
26
|
+
"@aws-sdk/middleware-host-header": "3.495.0",
|
|
27
|
+
"@aws-sdk/middleware-logger": "3.495.0",
|
|
28
|
+
"@aws-sdk/middleware-recursion-detection": "3.495.0",
|
|
29
|
+
"@aws-sdk/middleware-signing": "3.495.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.495.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.495.0",
|
|
32
|
+
"@aws-sdk/types": "3.495.0",
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.495.0",
|
|
34
|
+
"@aws-sdk/util-user-agent-browser": "3.495.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.495.0",
|
|
36
|
+
"@smithy/config-resolver": "^2.1.0",
|
|
37
|
+
"@smithy/fetch-http-handler": "^2.4.0",
|
|
38
|
+
"@smithy/hash-node": "^2.1.0",
|
|
39
|
+
"@smithy/invalid-dependency": "^2.1.0",
|
|
40
|
+
"@smithy/middleware-content-length": "^2.1.0",
|
|
41
|
+
"@smithy/middleware-endpoint": "^2.4.0",
|
|
42
|
+
"@smithy/middleware-retry": "^2.1.0",
|
|
43
|
+
"@smithy/middleware-serde": "^2.1.0",
|
|
44
|
+
"@smithy/middleware-stack": "^2.1.0",
|
|
45
|
+
"@smithy/node-config-provider": "^2.2.0",
|
|
46
|
+
"@smithy/node-http-handler": "^2.3.0",
|
|
47
|
+
"@smithy/protocol-http": "^3.1.0",
|
|
48
|
+
"@smithy/smithy-client": "^2.3.0",
|
|
49
|
+
"@smithy/types": "^2.9.0",
|
|
50
|
+
"@smithy/url-parser": "^2.1.0",
|
|
51
|
+
"@smithy/util-base64": "^2.1.0",
|
|
52
|
+
"@smithy/util-body-length-browser": "^2.1.0",
|
|
53
|
+
"@smithy/util-body-length-node": "^2.2.0",
|
|
54
|
+
"@smithy/util-defaults-mode-browser": "^2.1.0",
|
|
55
|
+
"@smithy/util-defaults-mode-node": "^2.1.0",
|
|
56
|
+
"@smithy/util-endpoints": "^1.1.0",
|
|
57
|
+
"@smithy/util-retry": "^2.1.0",
|
|
58
|
+
"@smithy/util-utf8": "^2.1.0",
|
|
59
59
|
"tslib": "^2.5.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@smithy/service-client-documentation-generator": "^2.
|
|
62
|
+
"@smithy/service-client-documentation-generator": "^2.1.0",
|
|
63
63
|
"@tsconfig/node14": "1.0.3",
|
|
64
64
|
"@types/node": "^14.14.31",
|
|
65
65
|
"concurrently": "7.0.0",
|