@aws-sdk/client-s3outposts 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/S3OutpostsServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +72 -1
- package/dist-cjs/protocols/Aws_restJson1.js +61 -145
- package/dist-es/index.js +1 -0
- package/dist-es/models/S3OutpostsServiceException.js +12 -0
- package/dist-es/models/models_0.js +67 -1
- package/dist-es/protocols/Aws_restJson1.js +89 -163
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/S3OutpostsServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +37 -16
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/S3OutpostsServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +27 -16
- 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-s3outposts
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.S3OutpostsServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./S3Outposts"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./S3OutpostsClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./pagination"), exports);
|
|
10
|
+
var S3OutpostsServiceException_1 = require("./models/S3OutpostsServiceException");
|
|
11
|
+
Object.defineProperty(exports, "S3OutpostsServiceException", { enumerable: true, get: function () { return S3OutpostsServiceException_1.S3OutpostsServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.S3OutpostsServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class S3OutpostsServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, S3OutpostsServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.S3OutpostsServiceException = S3OutpostsServiceException;
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListEndpointsResult = exports.ListEndpointsRequest = exports.Endpoint = exports.EndpointStatus = exports.NetworkInterface = exports.DeleteEndpointRequest = exports.CreateEndpointResult = exports.CreateEndpointRequest = exports.EndpointAccessType = void 0;
|
|
3
|
+
exports.ListEndpointsResult = exports.ListEndpointsRequest = exports.Endpoint = exports.EndpointStatus = exports.NetworkInterface = exports.DeleteEndpointRequest = exports.ValidationException = exports.ResourceNotFoundException = exports.InternalServerException = exports.CreateEndpointResult = exports.CreateEndpointRequest = exports.EndpointAccessType = exports.ConflictException = exports.AccessDeniedException = void 0;
|
|
4
|
+
const S3OutpostsServiceException_1 = require("./S3OutpostsServiceException");
|
|
5
|
+
class AccessDeniedException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "AccessDeniedException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "AccessDeniedException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
+
this.Message = opts.Message;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
19
|
+
class ConflictException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
|
|
20
|
+
constructor(opts) {
|
|
21
|
+
super({
|
|
22
|
+
name: "ConflictException",
|
|
23
|
+
$fault: "client",
|
|
24
|
+
...opts,
|
|
25
|
+
});
|
|
26
|
+
this.name = "ConflictException";
|
|
27
|
+
this.$fault = "client";
|
|
28
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
29
|
+
this.Message = opts.Message;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ConflictException = ConflictException;
|
|
4
33
|
var EndpointAccessType;
|
|
5
34
|
(function (EndpointAccessType) {
|
|
6
35
|
EndpointAccessType["CUSTOMER_OWNED_IP"] = "CustomerOwnedIp";
|
|
@@ -18,6 +47,48 @@ var CreateEndpointResult;
|
|
|
18
47
|
...obj,
|
|
19
48
|
});
|
|
20
49
|
})(CreateEndpointResult = exports.CreateEndpointResult || (exports.CreateEndpointResult = {}));
|
|
50
|
+
class InternalServerException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
|
|
51
|
+
constructor(opts) {
|
|
52
|
+
super({
|
|
53
|
+
name: "InternalServerException",
|
|
54
|
+
$fault: "server",
|
|
55
|
+
...opts,
|
|
56
|
+
});
|
|
57
|
+
this.name = "InternalServerException";
|
|
58
|
+
this.$fault = "server";
|
|
59
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
60
|
+
this.Message = opts.Message;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.InternalServerException = InternalServerException;
|
|
64
|
+
class ResourceNotFoundException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
|
|
65
|
+
constructor(opts) {
|
|
66
|
+
super({
|
|
67
|
+
name: "ResourceNotFoundException",
|
|
68
|
+
$fault: "client",
|
|
69
|
+
...opts,
|
|
70
|
+
});
|
|
71
|
+
this.name = "ResourceNotFoundException";
|
|
72
|
+
this.$fault = "client";
|
|
73
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
74
|
+
this.Message = opts.Message;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
78
|
+
class ValidationException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
|
|
79
|
+
constructor(opts) {
|
|
80
|
+
super({
|
|
81
|
+
name: "ValidationException",
|
|
82
|
+
$fault: "client",
|
|
83
|
+
...opts,
|
|
84
|
+
});
|
|
85
|
+
this.name = "ValidationException";
|
|
86
|
+
this.$fault = "client";
|
|
87
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
88
|
+
this.Message = opts.Message;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.ValidationException = ValidationException;
|
|
21
92
|
var DeleteEndpointRequest;
|
|
22
93
|
(function (DeleteEndpointRequest) {
|
|
23
94
|
DeleteEndpointRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1ListEndpointsCommand = exports.deserializeAws_restJson1DeleteEndpointCommand = exports.deserializeAws_restJson1CreateEndpointCommand = exports.serializeAws_restJson1ListEndpointsCommand = exports.serializeAws_restJson1DeleteEndpointCommand = exports.serializeAws_restJson1CreateEndpointCommand = 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 models_0_1 = require("../models/models_0");
|
|
7
|
+
const S3OutpostsServiceException_1 = require("../models/S3OutpostsServiceException");
|
|
6
8
|
const serializeAws_restJson1CreateEndpointCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {
|
|
@@ -98,59 +100,28 @@ const deserializeAws_restJson1CreateEndpointCommandError = async (output, contex
|
|
|
98
100
|
switch (errorCode) {
|
|
99
101
|
case "AccessDeniedException":
|
|
100
102
|
case "com.amazonaws.s3outposts#AccessDeniedException":
|
|
101
|
-
|
|
102
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
103
|
-
name: errorCode,
|
|
104
|
-
$metadata: deserializeMetadata(output),
|
|
105
|
-
};
|
|
106
|
-
break;
|
|
103
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
107
104
|
case "ConflictException":
|
|
108
105
|
case "com.amazonaws.s3outposts#ConflictException":
|
|
109
|
-
|
|
110
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
111
|
-
name: errorCode,
|
|
112
|
-
$metadata: deserializeMetadata(output),
|
|
113
|
-
};
|
|
114
|
-
break;
|
|
106
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
115
107
|
case "InternalServerException":
|
|
116
108
|
case "com.amazonaws.s3outposts#InternalServerException":
|
|
117
|
-
|
|
118
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
119
|
-
name: errorCode,
|
|
120
|
-
$metadata: deserializeMetadata(output),
|
|
121
|
-
};
|
|
122
|
-
break;
|
|
109
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
123
110
|
case "ResourceNotFoundException":
|
|
124
111
|
case "com.amazonaws.s3outposts#ResourceNotFoundException":
|
|
125
|
-
|
|
126
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
127
|
-
name: errorCode,
|
|
128
|
-
$metadata: deserializeMetadata(output),
|
|
129
|
-
};
|
|
130
|
-
break;
|
|
112
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
131
113
|
case "ValidationException":
|
|
132
114
|
case "com.amazonaws.s3outposts#ValidationException":
|
|
133
|
-
|
|
134
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
135
|
-
name: errorCode,
|
|
136
|
-
$metadata: deserializeMetadata(output),
|
|
137
|
-
};
|
|
138
|
-
break;
|
|
115
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
139
116
|
default:
|
|
140
117
|
const parsedBody = parsedOutput.body;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
...parsedBody,
|
|
144
|
-
name: `${errorCode}`,
|
|
145
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
118
|
+
response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
|
|
119
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
146
120
|
$fault: "client",
|
|
147
121
|
$metadata: deserializeMetadata(output),
|
|
148
|
-
};
|
|
122
|
+
});
|
|
123
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
149
124
|
}
|
|
150
|
-
const message = response.message || response.Message || errorCode;
|
|
151
|
-
response.message = message;
|
|
152
|
-
delete response.Message;
|
|
153
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
154
125
|
};
|
|
155
126
|
const deserializeAws_restJson1DeleteEndpointCommand = async (output, context) => {
|
|
156
127
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -174,51 +145,25 @@ const deserializeAws_restJson1DeleteEndpointCommandError = async (output, contex
|
|
|
174
145
|
switch (errorCode) {
|
|
175
146
|
case "AccessDeniedException":
|
|
176
147
|
case "com.amazonaws.s3outposts#AccessDeniedException":
|
|
177
|
-
|
|
178
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
179
|
-
name: errorCode,
|
|
180
|
-
$metadata: deserializeMetadata(output),
|
|
181
|
-
};
|
|
182
|
-
break;
|
|
148
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
183
149
|
case "InternalServerException":
|
|
184
150
|
case "com.amazonaws.s3outposts#InternalServerException":
|
|
185
|
-
|
|
186
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
187
|
-
name: errorCode,
|
|
188
|
-
$metadata: deserializeMetadata(output),
|
|
189
|
-
};
|
|
190
|
-
break;
|
|
151
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
191
152
|
case "ResourceNotFoundException":
|
|
192
153
|
case "com.amazonaws.s3outposts#ResourceNotFoundException":
|
|
193
|
-
|
|
194
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
195
|
-
name: errorCode,
|
|
196
|
-
$metadata: deserializeMetadata(output),
|
|
197
|
-
};
|
|
198
|
-
break;
|
|
154
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
199
155
|
case "ValidationException":
|
|
200
156
|
case "com.amazonaws.s3outposts#ValidationException":
|
|
201
|
-
|
|
202
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
203
|
-
name: errorCode,
|
|
204
|
-
$metadata: deserializeMetadata(output),
|
|
205
|
-
};
|
|
206
|
-
break;
|
|
157
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
207
158
|
default:
|
|
208
159
|
const parsedBody = parsedOutput.body;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
...parsedBody,
|
|
212
|
-
name: `${errorCode}`,
|
|
213
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
160
|
+
response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
|
|
161
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
214
162
|
$fault: "client",
|
|
215
163
|
$metadata: deserializeMetadata(output),
|
|
216
|
-
};
|
|
164
|
+
});
|
|
165
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
217
166
|
}
|
|
218
|
-
const message = response.message || response.Message || errorCode;
|
|
219
|
-
response.message = message;
|
|
220
|
-
delete response.Message;
|
|
221
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
222
167
|
};
|
|
223
168
|
const deserializeAws_restJson1ListEndpointsCommand = async (output, context) => {
|
|
224
169
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -250,116 +195,85 @@ const deserializeAws_restJson1ListEndpointsCommandError = async (output, context
|
|
|
250
195
|
switch (errorCode) {
|
|
251
196
|
case "AccessDeniedException":
|
|
252
197
|
case "com.amazonaws.s3outposts#AccessDeniedException":
|
|
253
|
-
|
|
254
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
255
|
-
name: errorCode,
|
|
256
|
-
$metadata: deserializeMetadata(output),
|
|
257
|
-
};
|
|
258
|
-
break;
|
|
198
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
259
199
|
case "InternalServerException":
|
|
260
200
|
case "com.amazonaws.s3outposts#InternalServerException":
|
|
261
|
-
|
|
262
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
263
|
-
name: errorCode,
|
|
264
|
-
$metadata: deserializeMetadata(output),
|
|
265
|
-
};
|
|
266
|
-
break;
|
|
201
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
267
202
|
case "ResourceNotFoundException":
|
|
268
203
|
case "com.amazonaws.s3outposts#ResourceNotFoundException":
|
|
269
|
-
|
|
270
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
271
|
-
name: errorCode,
|
|
272
|
-
$metadata: deserializeMetadata(output),
|
|
273
|
-
};
|
|
274
|
-
break;
|
|
204
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
275
205
|
case "ValidationException":
|
|
276
206
|
case "com.amazonaws.s3outposts#ValidationException":
|
|
277
|
-
|
|
278
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
279
|
-
name: errorCode,
|
|
280
|
-
$metadata: deserializeMetadata(output),
|
|
281
|
-
};
|
|
282
|
-
break;
|
|
207
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
283
208
|
default:
|
|
284
209
|
const parsedBody = parsedOutput.body;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
...parsedBody,
|
|
288
|
-
name: `${errorCode}`,
|
|
289
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
210
|
+
response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
|
|
211
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
290
212
|
$fault: "client",
|
|
291
213
|
$metadata: deserializeMetadata(output),
|
|
292
|
-
};
|
|
214
|
+
});
|
|
215
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
293
216
|
}
|
|
294
|
-
const message = response.message || response.Message || errorCode;
|
|
295
|
-
response.message = message;
|
|
296
|
-
delete response.Message;
|
|
297
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
298
217
|
};
|
|
299
218
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
300
|
-
const contents = {
|
|
301
|
-
name: "AccessDeniedException",
|
|
302
|
-
$fault: "client",
|
|
303
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
304
|
-
Message: undefined,
|
|
305
|
-
};
|
|
219
|
+
const contents = {};
|
|
306
220
|
const data = parsedOutput.body;
|
|
307
221
|
if (data.Message !== undefined && data.Message !== null) {
|
|
308
222
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
309
223
|
}
|
|
310
|
-
|
|
224
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
225
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
226
|
+
...contents,
|
|
227
|
+
});
|
|
228
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
311
229
|
};
|
|
312
230
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
313
|
-
const contents = {
|
|
314
|
-
name: "ConflictException",
|
|
315
|
-
$fault: "client",
|
|
316
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
317
|
-
Message: undefined,
|
|
318
|
-
};
|
|
231
|
+
const contents = {};
|
|
319
232
|
const data = parsedOutput.body;
|
|
320
233
|
if (data.Message !== undefined && data.Message !== null) {
|
|
321
234
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
322
235
|
}
|
|
323
|
-
|
|
236
|
+
const exception = new models_0_1.ConflictException({
|
|
237
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
238
|
+
...contents,
|
|
239
|
+
});
|
|
240
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
324
241
|
};
|
|
325
242
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
326
|
-
const contents = {
|
|
327
|
-
name: "InternalServerException",
|
|
328
|
-
$fault: "server",
|
|
329
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
330
|
-
Message: undefined,
|
|
331
|
-
};
|
|
243
|
+
const contents = {};
|
|
332
244
|
const data = parsedOutput.body;
|
|
333
245
|
if (data.Message !== undefined && data.Message !== null) {
|
|
334
246
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
335
247
|
}
|
|
336
|
-
|
|
248
|
+
const exception = new models_0_1.InternalServerException({
|
|
249
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
250
|
+
...contents,
|
|
251
|
+
});
|
|
252
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
337
253
|
};
|
|
338
254
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
339
|
-
const contents = {
|
|
340
|
-
name: "ResourceNotFoundException",
|
|
341
|
-
$fault: "client",
|
|
342
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
343
|
-
Message: undefined,
|
|
344
|
-
};
|
|
255
|
+
const contents = {};
|
|
345
256
|
const data = parsedOutput.body;
|
|
346
257
|
if (data.Message !== undefined && data.Message !== null) {
|
|
347
258
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
348
259
|
}
|
|
349
|
-
|
|
260
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
261
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
262
|
+
...contents,
|
|
263
|
+
});
|
|
264
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
350
265
|
};
|
|
351
266
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
352
|
-
const contents = {
|
|
353
|
-
name: "ValidationException",
|
|
354
|
-
$fault: "client",
|
|
355
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
356
|
-
Message: undefined,
|
|
357
|
-
};
|
|
267
|
+
const contents = {};
|
|
358
268
|
const data = parsedOutput.body;
|
|
359
269
|
if (data.Message !== undefined && data.Message !== null) {
|
|
360
270
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
361
271
|
}
|
|
362
|
-
|
|
272
|
+
const exception = new models_0_1.ValidationException({
|
|
273
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
274
|
+
...contents,
|
|
275
|
+
});
|
|
276
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
363
277
|
};
|
|
364
278
|
const deserializeAws_restJson1Endpoint = (output, context) => {
|
|
365
279
|
return {
|
|
@@ -381,7 +295,7 @@ const deserializeAws_restJson1Endpoint = (output, context) => {
|
|
|
381
295
|
};
|
|
382
296
|
};
|
|
383
297
|
const deserializeAws_restJson1Endpoints = (output, context) => {
|
|
384
|
-
|
|
298
|
+
const retVal = (output || [])
|
|
385
299
|
.filter((e) => e != null)
|
|
386
300
|
.map((entry) => {
|
|
387
301
|
if (entry === null) {
|
|
@@ -389,6 +303,7 @@ const deserializeAws_restJson1Endpoints = (output, context) => {
|
|
|
389
303
|
}
|
|
390
304
|
return deserializeAws_restJson1Endpoint(entry, context);
|
|
391
305
|
});
|
|
306
|
+
return retVal;
|
|
392
307
|
};
|
|
393
308
|
const deserializeAws_restJson1NetworkInterface = (output, context) => {
|
|
394
309
|
return {
|
|
@@ -396,7 +311,7 @@ const deserializeAws_restJson1NetworkInterface = (output, context) => {
|
|
|
396
311
|
};
|
|
397
312
|
};
|
|
398
313
|
const deserializeAws_restJson1NetworkInterfaces = (output, context) => {
|
|
399
|
-
|
|
314
|
+
const retVal = (output || [])
|
|
400
315
|
.filter((e) => e != null)
|
|
401
316
|
.map((entry) => {
|
|
402
317
|
if (entry === null) {
|
|
@@ -404,6 +319,7 @@ const deserializeAws_restJson1NetworkInterfaces = (output, context) => {
|
|
|
404
319
|
}
|
|
405
320
|
return deserializeAws_restJson1NetworkInterface(entry, context);
|
|
406
321
|
});
|
|
322
|
+
return retVal;
|
|
407
323
|
};
|
|
408
324
|
const deserializeMetadata = (output) => {
|
|
409
325
|
var _a;
|
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 S3OutpostsServiceException = (function (_super) {
|
|
4
|
+
__extends(S3OutpostsServiceException, _super);
|
|
5
|
+
function S3OutpostsServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, S3OutpostsServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return S3OutpostsServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { S3OutpostsServiceException };
|
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import { S3OutpostsServiceException as __BaseException } from "./S3OutpostsServiceException";
|
|
3
|
+
var AccessDeniedException = (function (_super) {
|
|
4
|
+
__extends(AccessDeniedException, _super);
|
|
5
|
+
function AccessDeniedException(opts) {
|
|
6
|
+
var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
|
|
7
|
+
_this.name = "AccessDeniedException";
|
|
8
|
+
_this.$fault = "client";
|
|
9
|
+
Object.setPrototypeOf(_this, AccessDeniedException.prototype);
|
|
10
|
+
_this.Message = opts.Message;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
return AccessDeniedException;
|
|
14
|
+
}(__BaseException));
|
|
15
|
+
export { AccessDeniedException };
|
|
16
|
+
var ConflictException = (function (_super) {
|
|
17
|
+
__extends(ConflictException, _super);
|
|
18
|
+
function ConflictException(opts) {
|
|
19
|
+
var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
|
|
20
|
+
_this.name = "ConflictException";
|
|
21
|
+
_this.$fault = "client";
|
|
22
|
+
Object.setPrototypeOf(_this, ConflictException.prototype);
|
|
23
|
+
_this.Message = opts.Message;
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
return ConflictException;
|
|
27
|
+
}(__BaseException));
|
|
28
|
+
export { ConflictException };
|
|
2
29
|
export var EndpointAccessType;
|
|
3
30
|
(function (EndpointAccessType) {
|
|
4
31
|
EndpointAccessType["CUSTOMER_OWNED_IP"] = "CustomerOwnedIp";
|
|
@@ -12,6 +39,45 @@ export var CreateEndpointResult;
|
|
|
12
39
|
(function (CreateEndpointResult) {
|
|
13
40
|
CreateEndpointResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
14
41
|
})(CreateEndpointResult || (CreateEndpointResult = {}));
|
|
42
|
+
var InternalServerException = (function (_super) {
|
|
43
|
+
__extends(InternalServerException, _super);
|
|
44
|
+
function InternalServerException(opts) {
|
|
45
|
+
var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
|
|
46
|
+
_this.name = "InternalServerException";
|
|
47
|
+
_this.$fault = "server";
|
|
48
|
+
Object.setPrototypeOf(_this, InternalServerException.prototype);
|
|
49
|
+
_this.Message = opts.Message;
|
|
50
|
+
return _this;
|
|
51
|
+
}
|
|
52
|
+
return InternalServerException;
|
|
53
|
+
}(__BaseException));
|
|
54
|
+
export { InternalServerException };
|
|
55
|
+
var ResourceNotFoundException = (function (_super) {
|
|
56
|
+
__extends(ResourceNotFoundException, _super);
|
|
57
|
+
function ResourceNotFoundException(opts) {
|
|
58
|
+
var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
|
|
59
|
+
_this.name = "ResourceNotFoundException";
|
|
60
|
+
_this.$fault = "client";
|
|
61
|
+
Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
|
|
62
|
+
_this.Message = opts.Message;
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
return ResourceNotFoundException;
|
|
66
|
+
}(__BaseException));
|
|
67
|
+
export { ResourceNotFoundException };
|
|
68
|
+
var ValidationException = (function (_super) {
|
|
69
|
+
__extends(ValidationException, _super);
|
|
70
|
+
function ValidationException(opts) {
|
|
71
|
+
var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
|
|
72
|
+
_this.name = "ValidationException";
|
|
73
|
+
_this.$fault = "client";
|
|
74
|
+
Object.setPrototypeOf(_this, ValidationException.prototype);
|
|
75
|
+
_this.Message = opts.Message;
|
|
76
|
+
return _this;
|
|
77
|
+
}
|
|
78
|
+
return ValidationException;
|
|
79
|
+
}(__BaseException));
|
|
80
|
+
export { ValidationException };
|
|
15
81
|
export var DeleteEndpointRequest;
|
|
16
82
|
(function (DeleteEndpointRequest) {
|
|
17
83
|
DeleteEndpointRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
5
|
+
import { S3OutpostsServiceException as __BaseException } from "../models/S3OutpostsServiceException";
|
|
4
6
|
export var serializeAws_restJson1CreateEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
7
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
6
8
|
return __generator(this, function (_c) {
|
|
@@ -98,16 +100,16 @@ export var deserializeAws_restJson1CreateEndpointCommand = function (output, con
|
|
|
98
100
|
});
|
|
99
101
|
}); };
|
|
100
102
|
var deserializeAws_restJson1CreateEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
101
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
102
|
-
var
|
|
103
|
-
return __generator(this, function (
|
|
104
|
-
switch (
|
|
103
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
104
|
+
var _c;
|
|
105
|
+
return __generator(this, function (_d) {
|
|
106
|
+
switch (_d.label) {
|
|
105
107
|
case 0:
|
|
106
108
|
_a = [__assign({}, output)];
|
|
107
|
-
|
|
109
|
+
_c = {};
|
|
108
110
|
return [4, parseBody(output.body, context)];
|
|
109
111
|
case 1:
|
|
110
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
112
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
111
113
|
errorCode = "UnknownError";
|
|
112
114
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
113
115
|
_b = errorCode;
|
|
@@ -124,46 +126,24 @@ var deserializeAws_restJson1CreateEndpointCommandError = function (output, conte
|
|
|
124
126
|
case "com.amazonaws.s3outposts#ValidationException": return [3, 10];
|
|
125
127
|
}
|
|
126
128
|
return [3, 12];
|
|
127
|
-
case 2:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
case
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
case 4
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
case
|
|
137
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
138
|
-
return [3, 13];
|
|
139
|
-
case 6:
|
|
140
|
-
_e = [{}];
|
|
141
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
142
|
-
case 7:
|
|
143
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
144
|
-
return [3, 13];
|
|
145
|
-
case 8:
|
|
146
|
-
_f = [{}];
|
|
147
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
148
|
-
case 9:
|
|
149
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
150
|
-
return [3, 13];
|
|
151
|
-
case 10:
|
|
152
|
-
_g = [{}];
|
|
153
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
154
|
-
case 11:
|
|
155
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
156
|
-
return [3, 13];
|
|
129
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
130
|
+
case 3: throw _d.sent();
|
|
131
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
132
|
+
case 5: throw _d.sent();
|
|
133
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
134
|
+
case 7: throw _d.sent();
|
|
135
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
136
|
+
case 9: throw _d.sent();
|
|
137
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
138
|
+
case 11: throw _d.sent();
|
|
157
139
|
case 12:
|
|
158
140
|
parsedBody = parsedOutput.body;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
response
|
|
165
|
-
delete response.Message;
|
|
166
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
141
|
+
response = new __BaseException({
|
|
142
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
143
|
+
$fault: "client",
|
|
144
|
+
$metadata: deserializeMetadata(output),
|
|
145
|
+
});
|
|
146
|
+
throw __decorateServiceException(response, parsedBody);
|
|
167
147
|
}
|
|
168
148
|
});
|
|
169
149
|
}); };
|
|
@@ -186,16 +166,16 @@ export var deserializeAws_restJson1DeleteEndpointCommand = function (output, con
|
|
|
186
166
|
});
|
|
187
167
|
}); };
|
|
188
168
|
var deserializeAws_restJson1DeleteEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
189
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
190
|
-
var
|
|
191
|
-
return __generator(this, function (
|
|
192
|
-
switch (
|
|
169
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
170
|
+
var _c;
|
|
171
|
+
return __generator(this, function (_d) {
|
|
172
|
+
switch (_d.label) {
|
|
193
173
|
case 0:
|
|
194
174
|
_a = [__assign({}, output)];
|
|
195
|
-
|
|
175
|
+
_c = {};
|
|
196
176
|
return [4, parseBody(output.body, context)];
|
|
197
177
|
case 1:
|
|
198
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
178
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
199
179
|
errorCode = "UnknownError";
|
|
200
180
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
201
181
|
_b = errorCode;
|
|
@@ -210,40 +190,22 @@ var deserializeAws_restJson1DeleteEndpointCommandError = function (output, conte
|
|
|
210
190
|
case "com.amazonaws.s3outposts#ValidationException": return [3, 8];
|
|
211
191
|
}
|
|
212
192
|
return [3, 10];
|
|
213
|
-
case 2:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
case
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
case 4
|
|
220
|
-
|
|
221
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
222
|
-
case 5:
|
|
223
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
224
|
-
return [3, 11];
|
|
225
|
-
case 6:
|
|
226
|
-
_e = [{}];
|
|
227
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
228
|
-
case 7:
|
|
229
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
230
|
-
return [3, 11];
|
|
231
|
-
case 8:
|
|
232
|
-
_f = [{}];
|
|
233
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
234
|
-
case 9:
|
|
235
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
236
|
-
return [3, 11];
|
|
193
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
194
|
+
case 3: throw _d.sent();
|
|
195
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
196
|
+
case 5: throw _d.sent();
|
|
197
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
198
|
+
case 7: throw _d.sent();
|
|
199
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
200
|
+
case 9: throw _d.sent();
|
|
237
201
|
case 10:
|
|
238
202
|
parsedBody = parsedOutput.body;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
response
|
|
245
|
-
delete response.Message;
|
|
246
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
203
|
+
response = new __BaseException({
|
|
204
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
205
|
+
$fault: "client",
|
|
206
|
+
$metadata: deserializeMetadata(output),
|
|
207
|
+
});
|
|
208
|
+
throw __decorateServiceException(response, parsedBody);
|
|
247
209
|
}
|
|
248
210
|
});
|
|
249
211
|
}); };
|
|
@@ -276,16 +238,16 @@ export var deserializeAws_restJson1ListEndpointsCommand = function (output, cont
|
|
|
276
238
|
});
|
|
277
239
|
}); };
|
|
278
240
|
var deserializeAws_restJson1ListEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
279
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
280
|
-
var
|
|
281
|
-
return __generator(this, function (
|
|
282
|
-
switch (
|
|
241
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
242
|
+
var _c;
|
|
243
|
+
return __generator(this, function (_d) {
|
|
244
|
+
switch (_d.label) {
|
|
283
245
|
case 0:
|
|
284
246
|
_a = [__assign({}, output)];
|
|
285
|
-
|
|
247
|
+
_c = {};
|
|
286
248
|
return [4, parseBody(output.body, context)];
|
|
287
249
|
case 1:
|
|
288
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
250
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
289
251
|
errorCode = "UnknownError";
|
|
290
252
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
291
253
|
_b = errorCode;
|
|
@@ -300,121 +262,83 @@ var deserializeAws_restJson1ListEndpointsCommandError = function (output, contex
|
|
|
300
262
|
case "com.amazonaws.s3outposts#ValidationException": return [3, 8];
|
|
301
263
|
}
|
|
302
264
|
return [3, 10];
|
|
303
|
-
case 2:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
case
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
case 4
|
|
310
|
-
|
|
311
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
312
|
-
case 5:
|
|
313
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
314
|
-
return [3, 11];
|
|
315
|
-
case 6:
|
|
316
|
-
_e = [{}];
|
|
317
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
318
|
-
case 7:
|
|
319
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
320
|
-
return [3, 11];
|
|
321
|
-
case 8:
|
|
322
|
-
_f = [{}];
|
|
323
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
324
|
-
case 9:
|
|
325
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
326
|
-
return [3, 11];
|
|
265
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
266
|
+
case 3: throw _d.sent();
|
|
267
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
268
|
+
case 5: throw _d.sent();
|
|
269
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
270
|
+
case 7: throw _d.sent();
|
|
271
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
272
|
+
case 9: throw _d.sent();
|
|
327
273
|
case 10:
|
|
328
274
|
parsedBody = parsedOutput.body;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
response
|
|
335
|
-
delete response.Message;
|
|
336
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
275
|
+
response = new __BaseException({
|
|
276
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
277
|
+
$fault: "client",
|
|
278
|
+
$metadata: deserializeMetadata(output),
|
|
279
|
+
});
|
|
280
|
+
throw __decorateServiceException(response, parsedBody);
|
|
337
281
|
}
|
|
338
282
|
});
|
|
339
283
|
}); };
|
|
340
284
|
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
341
|
-
var contents, data;
|
|
285
|
+
var contents, data, exception;
|
|
342
286
|
return __generator(this, function (_a) {
|
|
343
|
-
contents = {
|
|
344
|
-
name: "AccessDeniedException",
|
|
345
|
-
$fault: "client",
|
|
346
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
347
|
-
Message: undefined,
|
|
348
|
-
};
|
|
287
|
+
contents = {};
|
|
349
288
|
data = parsedOutput.body;
|
|
350
289
|
if (data.Message !== undefined && data.Message !== null) {
|
|
351
290
|
contents.Message = __expectString(data.Message);
|
|
352
291
|
}
|
|
353
|
-
|
|
292
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
293
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
354
294
|
});
|
|
355
295
|
}); };
|
|
356
296
|
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
357
|
-
var contents, data;
|
|
297
|
+
var contents, data, exception;
|
|
358
298
|
return __generator(this, function (_a) {
|
|
359
|
-
contents = {
|
|
360
|
-
name: "ConflictException",
|
|
361
|
-
$fault: "client",
|
|
362
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
363
|
-
Message: undefined,
|
|
364
|
-
};
|
|
299
|
+
contents = {};
|
|
365
300
|
data = parsedOutput.body;
|
|
366
301
|
if (data.Message !== undefined && data.Message !== null) {
|
|
367
302
|
contents.Message = __expectString(data.Message);
|
|
368
303
|
}
|
|
369
|
-
|
|
304
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
305
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
370
306
|
});
|
|
371
307
|
}); };
|
|
372
308
|
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
373
|
-
var contents, data;
|
|
309
|
+
var contents, data, exception;
|
|
374
310
|
return __generator(this, function (_a) {
|
|
375
|
-
contents = {
|
|
376
|
-
name: "InternalServerException",
|
|
377
|
-
$fault: "server",
|
|
378
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
379
|
-
Message: undefined,
|
|
380
|
-
};
|
|
311
|
+
contents = {};
|
|
381
312
|
data = parsedOutput.body;
|
|
382
313
|
if (data.Message !== undefined && data.Message !== null) {
|
|
383
314
|
contents.Message = __expectString(data.Message);
|
|
384
315
|
}
|
|
385
|
-
|
|
316
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
317
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
386
318
|
});
|
|
387
319
|
}); };
|
|
388
320
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
389
|
-
var contents, data;
|
|
321
|
+
var contents, data, exception;
|
|
390
322
|
return __generator(this, function (_a) {
|
|
391
|
-
contents = {
|
|
392
|
-
name: "ResourceNotFoundException",
|
|
393
|
-
$fault: "client",
|
|
394
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
395
|
-
Message: undefined,
|
|
396
|
-
};
|
|
323
|
+
contents = {};
|
|
397
324
|
data = parsedOutput.body;
|
|
398
325
|
if (data.Message !== undefined && data.Message !== null) {
|
|
399
326
|
contents.Message = __expectString(data.Message);
|
|
400
327
|
}
|
|
401
|
-
|
|
328
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
329
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
402
330
|
});
|
|
403
331
|
}); };
|
|
404
332
|
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
405
|
-
var contents, data;
|
|
333
|
+
var contents, data, exception;
|
|
406
334
|
return __generator(this, function (_a) {
|
|
407
|
-
contents = {
|
|
408
|
-
name: "ValidationException",
|
|
409
|
-
$fault: "client",
|
|
410
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
411
|
-
Message: undefined,
|
|
412
|
-
};
|
|
335
|
+
contents = {};
|
|
413
336
|
data = parsedOutput.body;
|
|
414
337
|
if (data.Message !== undefined && data.Message !== null) {
|
|
415
338
|
contents.Message = __expectString(data.Message);
|
|
416
339
|
}
|
|
417
|
-
|
|
340
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
341
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
418
342
|
});
|
|
419
343
|
}); };
|
|
420
344
|
var deserializeAws_restJson1Endpoint = function (output, context) {
|
|
@@ -437,7 +361,7 @@ var deserializeAws_restJson1Endpoint = function (output, context) {
|
|
|
437
361
|
};
|
|
438
362
|
};
|
|
439
363
|
var deserializeAws_restJson1Endpoints = function (output, context) {
|
|
440
|
-
|
|
364
|
+
var retVal = (output || [])
|
|
441
365
|
.filter(function (e) { return e != null; })
|
|
442
366
|
.map(function (entry) {
|
|
443
367
|
if (entry === null) {
|
|
@@ -445,6 +369,7 @@ var deserializeAws_restJson1Endpoints = function (output, context) {
|
|
|
445
369
|
}
|
|
446
370
|
return deserializeAws_restJson1Endpoint(entry, context);
|
|
447
371
|
});
|
|
372
|
+
return retVal;
|
|
448
373
|
};
|
|
449
374
|
var deserializeAws_restJson1NetworkInterface = function (output, context) {
|
|
450
375
|
return {
|
|
@@ -452,7 +377,7 @@ var deserializeAws_restJson1NetworkInterface = function (output, context) {
|
|
|
452
377
|
};
|
|
453
378
|
};
|
|
454
379
|
var deserializeAws_restJson1NetworkInterfaces = function (output, context) {
|
|
455
|
-
|
|
380
|
+
var retVal = (output || [])
|
|
456
381
|
.filter(function (e) { return e != null; })
|
|
457
382
|
.map(function (entry) {
|
|
458
383
|
if (entry === null) {
|
|
@@ -460,6 +385,7 @@ var deserializeAws_restJson1NetworkInterfaces = function (output, context) {
|
|
|
460
385
|
}
|
|
461
386
|
return deserializeAws_restJson1NetworkInterface(entry, context);
|
|
462
387
|
});
|
|
388
|
+
return retVal;
|
|
463
389
|
};
|
|
464
390
|
var deserializeMetadata = function (output) {
|
|
465
391
|
var _a;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
|
|
2
|
+
/**
|
|
3
|
+
* Base exception class for all service exceptions from S3Outposts service.
|
|
4
|
+
*/
|
|
5
|
+
export declare class S3OutpostsServiceException extends __ServiceException {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
constructor(options: __ServiceExceptionOptions);
|
|
10
|
+
}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { S3OutpostsServiceException as __BaseException } from "./S3OutpostsServiceException";
|
|
2
3
|
/**
|
|
3
4
|
* <p>Access was denied for this action.</p>
|
|
4
5
|
*/
|
|
5
|
-
export
|
|
6
|
-
name: "AccessDeniedException";
|
|
7
|
-
$fault: "client";
|
|
6
|
+
export declare class AccessDeniedException extends __BaseException {
|
|
7
|
+
readonly name: "AccessDeniedException";
|
|
8
|
+
readonly $fault: "client";
|
|
8
9
|
Message?: string;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* <p>There was a conflict with this action, and it could not be completed.</p>
|
|
12
17
|
*/
|
|
13
|
-
export
|
|
14
|
-
name: "ConflictException";
|
|
15
|
-
$fault: "client";
|
|
18
|
+
export declare class ConflictException extends __BaseException {
|
|
19
|
+
readonly name: "ConflictException";
|
|
20
|
+
readonly $fault: "client";
|
|
16
21
|
Message?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
|
|
17
26
|
}
|
|
18
27
|
export declare enum EndpointAccessType {
|
|
19
28
|
CUSTOMER_OWNED_IP = "CustomerOwnedIp",
|
|
@@ -66,26 +75,38 @@ export declare namespace CreateEndpointResult {
|
|
|
66
75
|
/**
|
|
67
76
|
* <p>There was an exception with the internal server.</p>
|
|
68
77
|
*/
|
|
69
|
-
export
|
|
70
|
-
name: "InternalServerException";
|
|
71
|
-
$fault: "server";
|
|
78
|
+
export declare class InternalServerException extends __BaseException {
|
|
79
|
+
readonly name: "InternalServerException";
|
|
80
|
+
readonly $fault: "server";
|
|
72
81
|
Message?: string;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
|
|
73
86
|
}
|
|
74
87
|
/**
|
|
75
88
|
* <p>The requested resource was not found.</p>
|
|
76
89
|
*/
|
|
77
|
-
export
|
|
78
|
-
name: "ResourceNotFoundException";
|
|
79
|
-
$fault: "client";
|
|
90
|
+
export declare class ResourceNotFoundException extends __BaseException {
|
|
91
|
+
readonly name: "ResourceNotFoundException";
|
|
92
|
+
readonly $fault: "client";
|
|
80
93
|
Message?: string;
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
81
98
|
}
|
|
82
99
|
/**
|
|
83
100
|
* <p>There was an exception validating this data.</p>
|
|
84
101
|
*/
|
|
85
|
-
export
|
|
86
|
-
name: "ValidationException";
|
|
87
|
-
$fault: "client";
|
|
102
|
+
export declare class ValidationException extends __BaseException {
|
|
103
|
+
readonly name: "ValidationException";
|
|
104
|
+
readonly $fault: "client";
|
|
88
105
|
Message?: string;
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
89
110
|
}
|
|
90
111
|
export interface DeleteEndpointRequest {
|
|
91
112
|
/**
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
|
|
2
|
+
|
|
3
|
+
export declare class S3OutpostsServiceException extends __ServiceException {
|
|
4
|
+
|
|
5
|
+
constructor(options: __ServiceExceptionOptions);
|
|
6
|
+
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { S3OutpostsServiceException as __BaseException } from "./S3OutpostsServiceException";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
name: "AccessDeniedException";
|
|
5
|
-
$fault: "client";
|
|
4
|
+
export declare class AccessDeniedException extends __BaseException {
|
|
5
|
+
readonly name: "AccessDeniedException";
|
|
6
|
+
readonly $fault: "client";
|
|
6
7
|
Message?: string;
|
|
8
|
+
|
|
9
|
+
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
|
|
7
10
|
}
|
|
8
11
|
|
|
9
|
-
export
|
|
10
|
-
name: "ConflictException";
|
|
11
|
-
$fault: "client";
|
|
12
|
+
export declare class ConflictException extends __BaseException {
|
|
13
|
+
readonly name: "ConflictException";
|
|
14
|
+
readonly $fault: "client";
|
|
12
15
|
Message?: string;
|
|
16
|
+
|
|
17
|
+
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
|
|
13
18
|
}
|
|
14
19
|
export declare enum EndpointAccessType {
|
|
15
20
|
CUSTOMER_OWNED_IP = "CustomerOwnedIp",
|
|
@@ -40,22 +45,28 @@ export declare namespace CreateEndpointResult {
|
|
|
40
45
|
const filterSensitiveLog: (obj: CreateEndpointResult) => any;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
|
-
export
|
|
44
|
-
name: "InternalServerException";
|
|
45
|
-
$fault: "server";
|
|
48
|
+
export declare class InternalServerException extends __BaseException {
|
|
49
|
+
readonly name: "InternalServerException";
|
|
50
|
+
readonly $fault: "server";
|
|
46
51
|
Message?: string;
|
|
52
|
+
|
|
53
|
+
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
|
|
47
54
|
}
|
|
48
55
|
|
|
49
|
-
export
|
|
50
|
-
name: "ResourceNotFoundException";
|
|
51
|
-
$fault: "client";
|
|
56
|
+
export declare class ResourceNotFoundException extends __BaseException {
|
|
57
|
+
readonly name: "ResourceNotFoundException";
|
|
58
|
+
readonly $fault: "client";
|
|
52
59
|
Message?: string;
|
|
60
|
+
|
|
61
|
+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
53
62
|
}
|
|
54
63
|
|
|
55
|
-
export
|
|
56
|
-
name: "ValidationException";
|
|
57
|
-
$fault: "client";
|
|
64
|
+
export declare class ValidationException extends __BaseException {
|
|
65
|
+
readonly name: "ValidationException";
|
|
66
|
+
readonly $fault: "client";
|
|
58
67
|
Message?: string;
|
|
68
|
+
|
|
69
|
+
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
59
70
|
}
|
|
60
71
|
export interface DeleteEndpointRequest {
|
|
61
72
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-s3outposts",
|
|
3
3
|
"description": "AWS SDK for JavaScript S3outposts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.53.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",
|
|
@@ -18,34 +18,34 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
-
"@aws-sdk/config-resolver": "3.
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
25
|
-
"@aws-sdk/hash-node": "3.
|
|
26
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
27
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
28
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
29
|
-
"@aws-sdk/middleware-logger": "3.
|
|
30
|
-
"@aws-sdk/middleware-retry": "3.
|
|
31
|
-
"@aws-sdk/middleware-serde": "3.
|
|
32
|
-
"@aws-sdk/middleware-signing": "3.
|
|
33
|
-
"@aws-sdk/middleware-stack": "3.
|
|
34
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
35
|
-
"@aws-sdk/node-config-provider": "3.
|
|
36
|
-
"@aws-sdk/node-http-handler": "3.
|
|
37
|
-
"@aws-sdk/protocol-http": "3.
|
|
38
|
-
"@aws-sdk/smithy-client": "3.
|
|
39
|
-
"@aws-sdk/types": "3.
|
|
40
|
-
"@aws-sdk/url-parser": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.53.0",
|
|
22
|
+
"@aws-sdk/config-resolver": "3.53.0",
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.53.0",
|
|
24
|
+
"@aws-sdk/fetch-http-handler": "3.53.0",
|
|
25
|
+
"@aws-sdk/hash-node": "3.53.0",
|
|
26
|
+
"@aws-sdk/invalid-dependency": "3.53.0",
|
|
27
|
+
"@aws-sdk/middleware-content-length": "3.53.0",
|
|
28
|
+
"@aws-sdk/middleware-host-header": "3.53.0",
|
|
29
|
+
"@aws-sdk/middleware-logger": "3.53.0",
|
|
30
|
+
"@aws-sdk/middleware-retry": "3.53.0",
|
|
31
|
+
"@aws-sdk/middleware-serde": "3.53.0",
|
|
32
|
+
"@aws-sdk/middleware-signing": "3.53.0",
|
|
33
|
+
"@aws-sdk/middleware-stack": "3.53.0",
|
|
34
|
+
"@aws-sdk/middleware-user-agent": "3.53.0",
|
|
35
|
+
"@aws-sdk/node-config-provider": "3.53.0",
|
|
36
|
+
"@aws-sdk/node-http-handler": "3.53.0",
|
|
37
|
+
"@aws-sdk/protocol-http": "3.53.0",
|
|
38
|
+
"@aws-sdk/smithy-client": "3.53.0",
|
|
39
|
+
"@aws-sdk/types": "3.53.0",
|
|
40
|
+
"@aws-sdk/url-parser": "3.53.0",
|
|
41
41
|
"@aws-sdk/util-base64-browser": "3.52.0",
|
|
42
42
|
"@aws-sdk/util-base64-node": "3.52.0",
|
|
43
43
|
"@aws-sdk/util-body-length-browser": "3.52.0",
|
|
44
44
|
"@aws-sdk/util-body-length-node": "3.52.0",
|
|
45
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
46
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
47
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
48
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
45
|
+
"@aws-sdk/util-defaults-mode-browser": "3.53.0",
|
|
46
|
+
"@aws-sdk/util-defaults-mode-node": "3.53.0",
|
|
47
|
+
"@aws-sdk/util-user-agent-browser": "3.53.0",
|
|
48
|
+
"@aws-sdk/util-user-agent-node": "3.53.0",
|
|
49
49
|
"@aws-sdk/util-utf8-browser": "3.52.0",
|
|
50
50
|
"@aws-sdk/util-utf8-node": "3.52.0",
|
|
51
51
|
"tslib": "^2.3.0"
|