@aws-sdk/client-ec2-instance-connect 3.52.0 → 3.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/EC2InstanceConnectServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +142 -1
- package/dist-cjs/protocols/Aws_json1_1.js +56 -166
- package/dist-es/index.js +1 -0
- package/dist-es/models/EC2InstanceConnectServiceException.js +12 -0
- package/dist-es/models/models_0.js +132 -1
- package/dist-es/protocols/Aws_json1_1.js +89 -155
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/EC2InstanceConnectServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +72 -31
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/EC2InstanceConnectServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +52 -31
- package/package.json +25 -25
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-ec2-instance-connect
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EC2InstanceConnectServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./EC2InstanceConnect"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./EC2InstanceConnectClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
9
|
+
var EC2InstanceConnectServiceException_1 = require("./models/EC2InstanceConnectServiceException");
|
|
10
|
+
Object.defineProperty(exports, "EC2InstanceConnectServiceException", { enumerable: true, get: function () { return EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EC2InstanceConnectServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class EC2InstanceConnectServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, EC2InstanceConnectServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.EC2InstanceConnectServiceException = EC2InstanceConnectServiceException;
|
|
@@ -1,6 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SendSSHPublicKeyResponse = exports.SendSSHPublicKeyRequest = exports.SendSerialConsoleSSHPublicKeyResponse = exports.SendSerialConsoleSSHPublicKeyRequest = void 0;
|
|
3
|
+
exports.SendSSHPublicKeyResponse = exports.SendSSHPublicKeyRequest = exports.ThrottlingException = exports.ServiceException = exports.SerialConsoleSessionUnavailableException = exports.SerialConsoleSessionLimitExceededException = exports.SerialConsoleAccessDisabledException = exports.SendSerialConsoleSSHPublicKeyResponse = exports.SendSerialConsoleSSHPublicKeyRequest = exports.InvalidArgsException = 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 InvalidArgsException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
62
|
+
constructor(opts) {
|
|
63
|
+
super({
|
|
64
|
+
name: "InvalidArgsException",
|
|
65
|
+
$fault: "client",
|
|
66
|
+
...opts,
|
|
67
|
+
});
|
|
68
|
+
this.name = "InvalidArgsException";
|
|
69
|
+
this.$fault = "client";
|
|
70
|
+
Object.setPrototypeOf(this, InvalidArgsException.prototype);
|
|
71
|
+
this.Message = opts.Message;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.InvalidArgsException = InvalidArgsException;
|
|
4
75
|
var SendSerialConsoleSSHPublicKeyRequest;
|
|
5
76
|
(function (SendSerialConsoleSSHPublicKeyRequest) {
|
|
6
77
|
SendSerialConsoleSSHPublicKeyRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -13,6 +84,76 @@ var SendSerialConsoleSSHPublicKeyResponse;
|
|
|
13
84
|
...obj,
|
|
14
85
|
});
|
|
15
86
|
})(SendSerialConsoleSSHPublicKeyResponse = exports.SendSerialConsoleSSHPublicKeyResponse || (exports.SendSerialConsoleSSHPublicKeyResponse = {}));
|
|
87
|
+
class SerialConsoleAccessDisabledException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
88
|
+
constructor(opts) {
|
|
89
|
+
super({
|
|
90
|
+
name: "SerialConsoleAccessDisabledException",
|
|
91
|
+
$fault: "client",
|
|
92
|
+
...opts,
|
|
93
|
+
});
|
|
94
|
+
this.name = "SerialConsoleAccessDisabledException";
|
|
95
|
+
this.$fault = "client";
|
|
96
|
+
Object.setPrototypeOf(this, SerialConsoleAccessDisabledException.prototype);
|
|
97
|
+
this.Message = opts.Message;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.SerialConsoleAccessDisabledException = SerialConsoleAccessDisabledException;
|
|
101
|
+
class SerialConsoleSessionLimitExceededException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
102
|
+
constructor(opts) {
|
|
103
|
+
super({
|
|
104
|
+
name: "SerialConsoleSessionLimitExceededException",
|
|
105
|
+
$fault: "client",
|
|
106
|
+
...opts,
|
|
107
|
+
});
|
|
108
|
+
this.name = "SerialConsoleSessionLimitExceededException";
|
|
109
|
+
this.$fault = "client";
|
|
110
|
+
Object.setPrototypeOf(this, SerialConsoleSessionLimitExceededException.prototype);
|
|
111
|
+
this.Message = opts.Message;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.SerialConsoleSessionLimitExceededException = SerialConsoleSessionLimitExceededException;
|
|
115
|
+
class SerialConsoleSessionUnavailableException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
116
|
+
constructor(opts) {
|
|
117
|
+
super({
|
|
118
|
+
name: "SerialConsoleSessionUnavailableException",
|
|
119
|
+
$fault: "server",
|
|
120
|
+
...opts,
|
|
121
|
+
});
|
|
122
|
+
this.name = "SerialConsoleSessionUnavailableException";
|
|
123
|
+
this.$fault = "server";
|
|
124
|
+
Object.setPrototypeOf(this, SerialConsoleSessionUnavailableException.prototype);
|
|
125
|
+
this.Message = opts.Message;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.SerialConsoleSessionUnavailableException = SerialConsoleSessionUnavailableException;
|
|
129
|
+
class ServiceException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
130
|
+
constructor(opts) {
|
|
131
|
+
super({
|
|
132
|
+
name: "ServiceException",
|
|
133
|
+
$fault: "server",
|
|
134
|
+
...opts,
|
|
135
|
+
});
|
|
136
|
+
this.name = "ServiceException";
|
|
137
|
+
this.$fault = "server";
|
|
138
|
+
Object.setPrototypeOf(this, ServiceException.prototype);
|
|
139
|
+
this.Message = opts.Message;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
exports.ServiceException = ServiceException;
|
|
143
|
+
class ThrottlingException extends EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException {
|
|
144
|
+
constructor(opts) {
|
|
145
|
+
super({
|
|
146
|
+
name: "ThrottlingException",
|
|
147
|
+
$fault: "client",
|
|
148
|
+
...opts,
|
|
149
|
+
});
|
|
150
|
+
this.name = "ThrottlingException";
|
|
151
|
+
this.$fault = "client";
|
|
152
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
153
|
+
this.Message = opts.Message;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.ThrottlingException = ThrottlingException;
|
|
16
157
|
var SendSSHPublicKeyRequest;
|
|
17
158
|
(function (SendSSHPublicKeyRequest) {
|
|
18
159
|
SendSSHPublicKeyRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_json1_1SendSSHPublicKeyCommand = exports.deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommand = exports.serializeAws_json1_1SendSSHPublicKeyCommand = exports.serializeAws_json1_1SendSerialConsoleSSHPublicKeyCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const EC2InstanceConnectServiceException_1 = require("../models/EC2InstanceConnectServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
6
8
|
const serializeAws_json1_1SendSerialConsoleSSHPublicKeyCommand = async (input, context) => {
|
|
7
9
|
const headers = {
|
|
8
10
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -48,99 +50,43 @@ const deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommandError = async (o
|
|
|
48
50
|
switch (errorCode) {
|
|
49
51
|
case "AuthException":
|
|
50
52
|
case "com.amazonaws.ec2instanceconnect#AuthException":
|
|
51
|
-
|
|
52
|
-
...(await deserializeAws_json1_1AuthExceptionResponse(parsedOutput, context)),
|
|
53
|
-
name: errorCode,
|
|
54
|
-
$metadata: deserializeMetadata(output),
|
|
55
|
-
};
|
|
56
|
-
break;
|
|
53
|
+
throw await deserializeAws_json1_1AuthExceptionResponse(parsedOutput, context);
|
|
57
54
|
case "EC2InstanceNotFoundException":
|
|
58
55
|
case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException":
|
|
59
|
-
|
|
60
|
-
...(await deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse(parsedOutput, context)),
|
|
61
|
-
name: errorCode,
|
|
62
|
-
$metadata: deserializeMetadata(output),
|
|
63
|
-
};
|
|
64
|
-
break;
|
|
56
|
+
throw await deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse(parsedOutput, context);
|
|
65
57
|
case "EC2InstanceStateInvalidException":
|
|
66
58
|
case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
|
|
67
|
-
|
|
68
|
-
...(await deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context)),
|
|
69
|
-
name: errorCode,
|
|
70
|
-
$metadata: deserializeMetadata(output),
|
|
71
|
-
};
|
|
72
|
-
break;
|
|
59
|
+
throw await deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context);
|
|
73
60
|
case "EC2InstanceTypeInvalidException":
|
|
74
61
|
case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException":
|
|
75
|
-
|
|
76
|
-
...(await deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse(parsedOutput, context)),
|
|
77
|
-
name: errorCode,
|
|
78
|
-
$metadata: deserializeMetadata(output),
|
|
79
|
-
};
|
|
80
|
-
break;
|
|
62
|
+
throw await deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse(parsedOutput, context);
|
|
81
63
|
case "InvalidArgsException":
|
|
82
64
|
case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
|
|
83
|
-
|
|
84
|
-
...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
|
|
85
|
-
name: errorCode,
|
|
86
|
-
$metadata: deserializeMetadata(output),
|
|
87
|
-
};
|
|
88
|
-
break;
|
|
65
|
+
throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
|
|
89
66
|
case "SerialConsoleAccessDisabledException":
|
|
90
67
|
case "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException":
|
|
91
|
-
|
|
92
|
-
...(await deserializeAws_json1_1SerialConsoleAccessDisabledExceptionResponse(parsedOutput, context)),
|
|
93
|
-
name: errorCode,
|
|
94
|
-
$metadata: deserializeMetadata(output),
|
|
95
|
-
};
|
|
96
|
-
break;
|
|
68
|
+
throw await deserializeAws_json1_1SerialConsoleAccessDisabledExceptionResponse(parsedOutput, context);
|
|
97
69
|
case "SerialConsoleSessionLimitExceededException":
|
|
98
70
|
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionLimitExceededException":
|
|
99
|
-
|
|
100
|
-
...(await deserializeAws_json1_1SerialConsoleSessionLimitExceededExceptionResponse(parsedOutput, context)),
|
|
101
|
-
name: errorCode,
|
|
102
|
-
$metadata: deserializeMetadata(output),
|
|
103
|
-
};
|
|
104
|
-
break;
|
|
71
|
+
throw await deserializeAws_json1_1SerialConsoleSessionLimitExceededExceptionResponse(parsedOutput, context);
|
|
105
72
|
case "SerialConsoleSessionUnavailableException":
|
|
106
73
|
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException":
|
|
107
|
-
|
|
108
|
-
...(await deserializeAws_json1_1SerialConsoleSessionUnavailableExceptionResponse(parsedOutput, context)),
|
|
109
|
-
name: errorCode,
|
|
110
|
-
$metadata: deserializeMetadata(output),
|
|
111
|
-
};
|
|
112
|
-
break;
|
|
74
|
+
throw await deserializeAws_json1_1SerialConsoleSessionUnavailableExceptionResponse(parsedOutput, context);
|
|
113
75
|
case "ServiceException":
|
|
114
76
|
case "com.amazonaws.ec2instanceconnect#ServiceException":
|
|
115
|
-
|
|
116
|
-
...(await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)),
|
|
117
|
-
name: errorCode,
|
|
118
|
-
$metadata: deserializeMetadata(output),
|
|
119
|
-
};
|
|
120
|
-
break;
|
|
77
|
+
throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
|
|
121
78
|
case "ThrottlingException":
|
|
122
79
|
case "com.amazonaws.ec2instanceconnect#ThrottlingException":
|
|
123
|
-
|
|
124
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
125
|
-
name: errorCode,
|
|
126
|
-
$metadata: deserializeMetadata(output),
|
|
127
|
-
};
|
|
128
|
-
break;
|
|
80
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
129
81
|
default:
|
|
130
82
|
const parsedBody = parsedOutput.body;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
...parsedBody,
|
|
134
|
-
name: `${errorCode}`,
|
|
135
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
83
|
+
response = new EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException({
|
|
84
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
136
85
|
$fault: "client",
|
|
137
86
|
$metadata: deserializeMetadata(output),
|
|
138
|
-
};
|
|
87
|
+
});
|
|
88
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
139
89
|
}
|
|
140
|
-
const message = response.message || response.Message || errorCode;
|
|
141
|
-
response.message = message;
|
|
142
|
-
delete response.Message;
|
|
143
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
144
90
|
};
|
|
145
91
|
const deserializeAws_json1_1SendSSHPublicKeyCommand = async (output, context) => {
|
|
146
92
|
if (output.statusCode >= 300) {
|
|
@@ -167,177 +113,121 @@ const deserializeAws_json1_1SendSSHPublicKeyCommandError = async (output, contex
|
|
|
167
113
|
switch (errorCode) {
|
|
168
114
|
case "AuthException":
|
|
169
115
|
case "com.amazonaws.ec2instanceconnect#AuthException":
|
|
170
|
-
|
|
171
|
-
...(await deserializeAws_json1_1AuthExceptionResponse(parsedOutput, context)),
|
|
172
|
-
name: errorCode,
|
|
173
|
-
$metadata: deserializeMetadata(output),
|
|
174
|
-
};
|
|
175
|
-
break;
|
|
116
|
+
throw await deserializeAws_json1_1AuthExceptionResponse(parsedOutput, context);
|
|
176
117
|
case "EC2InstanceNotFoundException":
|
|
177
118
|
case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException":
|
|
178
|
-
|
|
179
|
-
...(await deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse(parsedOutput, context)),
|
|
180
|
-
name: errorCode,
|
|
181
|
-
$metadata: deserializeMetadata(output),
|
|
182
|
-
};
|
|
183
|
-
break;
|
|
119
|
+
throw await deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse(parsedOutput, context);
|
|
184
120
|
case "EC2InstanceStateInvalidException":
|
|
185
121
|
case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
|
|
186
|
-
|
|
187
|
-
...(await deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context)),
|
|
188
|
-
name: errorCode,
|
|
189
|
-
$metadata: deserializeMetadata(output),
|
|
190
|
-
};
|
|
191
|
-
break;
|
|
122
|
+
throw await deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context);
|
|
192
123
|
case "InvalidArgsException":
|
|
193
124
|
case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
|
|
194
|
-
|
|
195
|
-
...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
|
|
196
|
-
name: errorCode,
|
|
197
|
-
$metadata: deserializeMetadata(output),
|
|
198
|
-
};
|
|
199
|
-
break;
|
|
125
|
+
throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
|
|
200
126
|
case "ServiceException":
|
|
201
127
|
case "com.amazonaws.ec2instanceconnect#ServiceException":
|
|
202
|
-
|
|
203
|
-
...(await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)),
|
|
204
|
-
name: errorCode,
|
|
205
|
-
$metadata: deserializeMetadata(output),
|
|
206
|
-
};
|
|
207
|
-
break;
|
|
128
|
+
throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
|
|
208
129
|
case "ThrottlingException":
|
|
209
130
|
case "com.amazonaws.ec2instanceconnect#ThrottlingException":
|
|
210
|
-
|
|
211
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
212
|
-
name: errorCode,
|
|
213
|
-
$metadata: deserializeMetadata(output),
|
|
214
|
-
};
|
|
215
|
-
break;
|
|
131
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
216
132
|
default:
|
|
217
133
|
const parsedBody = parsedOutput.body;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
...parsedBody,
|
|
221
|
-
name: `${errorCode}`,
|
|
222
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
134
|
+
response = new EC2InstanceConnectServiceException_1.EC2InstanceConnectServiceException({
|
|
135
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
223
136
|
$fault: "client",
|
|
224
137
|
$metadata: deserializeMetadata(output),
|
|
225
|
-
};
|
|
138
|
+
});
|
|
139
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
226
140
|
}
|
|
227
|
-
const message = response.message || response.Message || errorCode;
|
|
228
|
-
response.message = message;
|
|
229
|
-
delete response.Message;
|
|
230
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
231
141
|
};
|
|
232
142
|
const deserializeAws_json1_1AuthExceptionResponse = async (parsedOutput, context) => {
|
|
233
143
|
const body = parsedOutput.body;
|
|
234
144
|
const deserialized = deserializeAws_json1_1AuthException(body, context);
|
|
235
|
-
const
|
|
236
|
-
name: "AuthException",
|
|
237
|
-
$fault: "client",
|
|
145
|
+
const exception = new models_0_1.AuthException({
|
|
238
146
|
$metadata: deserializeMetadata(parsedOutput),
|
|
239
147
|
...deserialized,
|
|
240
|
-
};
|
|
241
|
-
return
|
|
148
|
+
});
|
|
149
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
242
150
|
};
|
|
243
151
|
const deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
244
152
|
const body = parsedOutput.body;
|
|
245
153
|
const deserialized = deserializeAws_json1_1EC2InstanceNotFoundException(body, context);
|
|
246
|
-
const
|
|
247
|
-
name: "EC2InstanceNotFoundException",
|
|
248
|
-
$fault: "client",
|
|
154
|
+
const exception = new models_0_1.EC2InstanceNotFoundException({
|
|
249
155
|
$metadata: deserializeMetadata(parsedOutput),
|
|
250
156
|
...deserialized,
|
|
251
|
-
};
|
|
252
|
-
return
|
|
157
|
+
});
|
|
158
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
253
159
|
};
|
|
254
160
|
const deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse = async (parsedOutput, context) => {
|
|
255
161
|
const body = parsedOutput.body;
|
|
256
162
|
const deserialized = deserializeAws_json1_1EC2InstanceStateInvalidException(body, context);
|
|
257
|
-
const
|
|
258
|
-
name: "EC2InstanceStateInvalidException",
|
|
259
|
-
$fault: "client",
|
|
163
|
+
const exception = new models_0_1.EC2InstanceStateInvalidException({
|
|
260
164
|
$metadata: deserializeMetadata(parsedOutput),
|
|
261
165
|
...deserialized,
|
|
262
|
-
};
|
|
263
|
-
return
|
|
166
|
+
});
|
|
167
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
264
168
|
};
|
|
265
169
|
const deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse = async (parsedOutput, context) => {
|
|
266
170
|
const body = parsedOutput.body;
|
|
267
171
|
const deserialized = deserializeAws_json1_1EC2InstanceTypeInvalidException(body, context);
|
|
268
|
-
const
|
|
269
|
-
name: "EC2InstanceTypeInvalidException",
|
|
270
|
-
$fault: "client",
|
|
172
|
+
const exception = new models_0_1.EC2InstanceTypeInvalidException({
|
|
271
173
|
$metadata: deserializeMetadata(parsedOutput),
|
|
272
174
|
...deserialized,
|
|
273
|
-
};
|
|
274
|
-
return
|
|
175
|
+
});
|
|
176
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
275
177
|
};
|
|
276
178
|
const deserializeAws_json1_1InvalidArgsExceptionResponse = async (parsedOutput, context) => {
|
|
277
179
|
const body = parsedOutput.body;
|
|
278
180
|
const deserialized = deserializeAws_json1_1InvalidArgsException(body, context);
|
|
279
|
-
const
|
|
280
|
-
name: "InvalidArgsException",
|
|
281
|
-
$fault: "client",
|
|
181
|
+
const exception = new models_0_1.InvalidArgsException({
|
|
282
182
|
$metadata: deserializeMetadata(parsedOutput),
|
|
283
183
|
...deserialized,
|
|
284
|
-
};
|
|
285
|
-
return
|
|
184
|
+
});
|
|
185
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
286
186
|
};
|
|
287
187
|
const deserializeAws_json1_1SerialConsoleAccessDisabledExceptionResponse = async (parsedOutput, context) => {
|
|
288
188
|
const body = parsedOutput.body;
|
|
289
189
|
const deserialized = deserializeAws_json1_1SerialConsoleAccessDisabledException(body, context);
|
|
290
|
-
const
|
|
291
|
-
name: "SerialConsoleAccessDisabledException",
|
|
292
|
-
$fault: "client",
|
|
190
|
+
const exception = new models_0_1.SerialConsoleAccessDisabledException({
|
|
293
191
|
$metadata: deserializeMetadata(parsedOutput),
|
|
294
192
|
...deserialized,
|
|
295
|
-
};
|
|
296
|
-
return
|
|
193
|
+
});
|
|
194
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
297
195
|
};
|
|
298
196
|
const deserializeAws_json1_1SerialConsoleSessionLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
299
197
|
const body = parsedOutput.body;
|
|
300
198
|
const deserialized = deserializeAws_json1_1SerialConsoleSessionLimitExceededException(body, context);
|
|
301
|
-
const
|
|
302
|
-
name: "SerialConsoleSessionLimitExceededException",
|
|
303
|
-
$fault: "client",
|
|
199
|
+
const exception = new models_0_1.SerialConsoleSessionLimitExceededException({
|
|
304
200
|
$metadata: deserializeMetadata(parsedOutput),
|
|
305
201
|
...deserialized,
|
|
306
|
-
};
|
|
307
|
-
return
|
|
202
|
+
});
|
|
203
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
308
204
|
};
|
|
309
205
|
const deserializeAws_json1_1SerialConsoleSessionUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
310
206
|
const body = parsedOutput.body;
|
|
311
207
|
const deserialized = deserializeAws_json1_1SerialConsoleSessionUnavailableException(body, context);
|
|
312
|
-
const
|
|
313
|
-
name: "SerialConsoleSessionUnavailableException",
|
|
314
|
-
$fault: "server",
|
|
208
|
+
const exception = new models_0_1.SerialConsoleSessionUnavailableException({
|
|
315
209
|
$metadata: deserializeMetadata(parsedOutput),
|
|
316
210
|
...deserialized,
|
|
317
|
-
};
|
|
318
|
-
return
|
|
211
|
+
});
|
|
212
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
319
213
|
};
|
|
320
214
|
const deserializeAws_json1_1ServiceExceptionResponse = async (parsedOutput, context) => {
|
|
321
215
|
const body = parsedOutput.body;
|
|
322
216
|
const deserialized = deserializeAws_json1_1ServiceException(body, context);
|
|
323
|
-
const
|
|
324
|
-
name: "ServiceException",
|
|
325
|
-
$fault: "server",
|
|
217
|
+
const exception = new models_0_1.ServiceException({
|
|
326
218
|
$metadata: deserializeMetadata(parsedOutput),
|
|
327
219
|
...deserialized,
|
|
328
|
-
};
|
|
329
|
-
return
|
|
220
|
+
});
|
|
221
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
330
222
|
};
|
|
331
223
|
const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
332
224
|
const body = parsedOutput.body;
|
|
333
225
|
const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
|
|
334
|
-
const
|
|
335
|
-
name: "ThrottlingException",
|
|
336
|
-
$fault: "client",
|
|
226
|
+
const exception = new models_0_1.ThrottlingException({
|
|
337
227
|
$metadata: deserializeMetadata(parsedOutput),
|
|
338
228
|
...deserialized,
|
|
339
|
-
};
|
|
340
|
-
return
|
|
229
|
+
});
|
|
230
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
341
231
|
};
|
|
342
232
|
const serializeAws_json1_1SendSerialConsoleSSHPublicKeyRequest = (input, context) => {
|
|
343
233
|
return {
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var EC2InstanceConnectServiceException = (function (_super) {
|
|
4
|
+
__extends(EC2InstanceConnectServiceException, _super);
|
|
5
|
+
function EC2InstanceConnectServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, EC2InstanceConnectServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return EC2InstanceConnectServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { EC2InstanceConnectServiceException };
|