@aws-sdk/client-s3outposts 3.183.0 → 3.186.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 +19 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/S3Outposts.js +25 -18
- package/dist-es/S3OutpostsClient.js +28 -22
- package/dist-es/commands/CreateEndpointCommand.js +28 -21
- package/dist-es/commands/DeleteEndpointCommand.js +29 -22
- package/dist-es/commands/ListEndpointsCommand.js +28 -21
- package/dist-es/commands/ListSharedEndpointsCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/S3OutpostsServiceException.js +10 -5
- package/dist-es/models/models_0.js +70 -87
- package/dist-es/pagination/ListEndpointsPaginator.js +68 -25
- package/dist-es/pagination/ListSharedEndpointsPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +481 -341
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,328 +1,450 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
4
5
|
import { S3OutpostsServiceException as __BaseException } from "../models/S3OutpostsServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
export var serializeAws_restJson1CreateEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/CreateEndpoint";
|
|
17
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.AccessType != null && { AccessType: input.AccessType })), (input.CustomerOwnedIpv4Pool != null && { CustomerOwnedIpv4Pool: input.CustomerOwnedIpv4Pool })), (input.OutpostId != null && { OutpostId: input.OutpostId })), (input.SecurityGroupId != null && { SecurityGroupId: input.SecurityGroupId })), (input.SubnetId != null && { SubnetId: input.SubnetId })));
|
|
18
|
+
return [2, new __HttpRequest({
|
|
19
|
+
protocol: protocol,
|
|
20
|
+
hostname: hostname,
|
|
21
|
+
port: port,
|
|
22
|
+
method: "POST",
|
|
23
|
+
headers: headers,
|
|
24
|
+
path: resolvedPath,
|
|
25
|
+
body: body,
|
|
26
|
+
})];
|
|
27
|
+
}
|
|
18
28
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
}); };
|
|
30
|
+
export var serializeAws_restJson1DeleteEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
31
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
32
|
+
return __generator(this, function (_c) {
|
|
33
|
+
switch (_c.label) {
|
|
34
|
+
case 0: return [4, context.endpoint()];
|
|
35
|
+
case 1:
|
|
36
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
37
|
+
headers = {};
|
|
38
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/DeleteEndpoint";
|
|
39
|
+
query = map({
|
|
40
|
+
endpointId: [, input.EndpointId],
|
|
41
|
+
outpostId: [, input.OutpostId],
|
|
42
|
+
});
|
|
43
|
+
return [2, new __HttpRequest({
|
|
44
|
+
protocol: protocol,
|
|
45
|
+
hostname: hostname,
|
|
46
|
+
port: port,
|
|
47
|
+
method: "DELETE",
|
|
48
|
+
headers: headers,
|
|
49
|
+
path: resolvedPath,
|
|
50
|
+
query: query,
|
|
51
|
+
body: body,
|
|
52
|
+
})];
|
|
53
|
+
}
|
|
27
54
|
});
|
|
28
|
-
};
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
55
|
+
}); };
|
|
56
|
+
export var serializeAws_restJson1ListEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
58
|
+
return __generator(this, function (_c) {
|
|
59
|
+
switch (_c.label) {
|
|
60
|
+
case 0: return [4, context.endpoint()];
|
|
61
|
+
case 1:
|
|
62
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
63
|
+
headers = {};
|
|
64
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/ListEndpoints";
|
|
65
|
+
query = map({
|
|
66
|
+
nextToken: [, input.NextToken],
|
|
67
|
+
maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
68
|
+
});
|
|
69
|
+
return [2, new __HttpRequest({
|
|
70
|
+
protocol: protocol,
|
|
71
|
+
hostname: hostname,
|
|
72
|
+
port: port,
|
|
73
|
+
method: "GET",
|
|
74
|
+
headers: headers,
|
|
75
|
+
path: resolvedPath,
|
|
76
|
+
query: query,
|
|
77
|
+
body: body,
|
|
78
|
+
})];
|
|
79
|
+
}
|
|
36
80
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
81
|
+
}); };
|
|
82
|
+
export var serializeAws_restJson1ListSharedEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
84
|
+
return __generator(this, function (_c) {
|
|
85
|
+
switch (_c.label) {
|
|
86
|
+
case 0: return [4, context.endpoint()];
|
|
87
|
+
case 1:
|
|
88
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
89
|
+
headers = {};
|
|
90
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/ListSharedEndpoints";
|
|
91
|
+
query = map({
|
|
92
|
+
nextToken: [, input.NextToken],
|
|
93
|
+
maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
94
|
+
outpostId: [, input.OutpostId],
|
|
95
|
+
});
|
|
96
|
+
return [2, new __HttpRequest({
|
|
97
|
+
protocol: protocol,
|
|
98
|
+
hostname: hostname,
|
|
99
|
+
port: port,
|
|
100
|
+
method: "GET",
|
|
101
|
+
headers: headers,
|
|
102
|
+
path: resolvedPath,
|
|
103
|
+
query: query,
|
|
104
|
+
body: body,
|
|
105
|
+
})];
|
|
106
|
+
}
|
|
47
107
|
});
|
|
48
|
-
};
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
108
|
+
}); };
|
|
109
|
+
export var deserializeAws_restJson1CreateEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
110
|
+
var contents, data, _a, _b;
|
|
111
|
+
return __generator(this, function (_c) {
|
|
112
|
+
switch (_c.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
115
|
+
return [2, deserializeAws_restJson1CreateEndpointCommandError(output, context)];
|
|
116
|
+
}
|
|
117
|
+
contents = map({
|
|
118
|
+
$metadata: deserializeMetadata(output),
|
|
119
|
+
});
|
|
120
|
+
_a = __expectNonNull;
|
|
121
|
+
_b = __expectObject;
|
|
122
|
+
return [4, parseBody(output.body, context)];
|
|
123
|
+
case 1:
|
|
124
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
125
|
+
if (data.EndpointArn != null) {
|
|
126
|
+
contents.EndpointArn = __expectString(data.EndpointArn);
|
|
127
|
+
}
|
|
128
|
+
return [2, contents];
|
|
129
|
+
}
|
|
56
130
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
131
|
+
}); };
|
|
132
|
+
var deserializeAws_restJson1CreateEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
133
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
134
|
+
var _c;
|
|
135
|
+
return __generator(this, function (_d) {
|
|
136
|
+
switch (_d.label) {
|
|
137
|
+
case 0:
|
|
138
|
+
_a = [__assign({}, output)];
|
|
139
|
+
_c = {};
|
|
140
|
+
return [4, parseErrorBody(output.body, context)];
|
|
141
|
+
case 1:
|
|
142
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
143
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
144
|
+
_b = errorCode;
|
|
145
|
+
switch (_b) {
|
|
146
|
+
case "AccessDeniedException": return [3, 2];
|
|
147
|
+
case "com.amazonaws.s3outposts#AccessDeniedException": return [3, 2];
|
|
148
|
+
case "ConflictException": return [3, 4];
|
|
149
|
+
case "com.amazonaws.s3outposts#ConflictException": return [3, 4];
|
|
150
|
+
case "InternalServerException": return [3, 6];
|
|
151
|
+
case "com.amazonaws.s3outposts#InternalServerException": return [3, 6];
|
|
152
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
153
|
+
case "com.amazonaws.s3outposts#ResourceNotFoundException": return [3, 8];
|
|
154
|
+
case "ValidationException": return [3, 10];
|
|
155
|
+
case "com.amazonaws.s3outposts#ValidationException": return [3, 10];
|
|
156
|
+
}
|
|
157
|
+
return [3, 12];
|
|
158
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
159
|
+
case 3: throw _d.sent();
|
|
160
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
161
|
+
case 5: throw _d.sent();
|
|
162
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
163
|
+
case 7: throw _d.sent();
|
|
164
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
165
|
+
case 9: throw _d.sent();
|
|
166
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
167
|
+
case 11: throw _d.sent();
|
|
168
|
+
case 12:
|
|
169
|
+
parsedBody = parsedOutput.body;
|
|
170
|
+
throwDefaultError({
|
|
171
|
+
output: output,
|
|
172
|
+
parsedBody: parsedBody,
|
|
173
|
+
exceptionCtor: __BaseException,
|
|
174
|
+
errorCode: errorCode,
|
|
175
|
+
});
|
|
176
|
+
_d.label = 13;
|
|
177
|
+
case 13: return [2];
|
|
178
|
+
}
|
|
67
179
|
});
|
|
68
|
-
};
|
|
69
|
-
export
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
180
|
+
}); };
|
|
181
|
+
export var deserializeAws_restJson1DeleteEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
|
+
var contents;
|
|
183
|
+
return __generator(this, function (_a) {
|
|
184
|
+
switch (_a.label) {
|
|
185
|
+
case 0:
|
|
186
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
187
|
+
return [2, deserializeAws_restJson1DeleteEndpointCommandError(output, context)];
|
|
188
|
+
}
|
|
189
|
+
contents = map({
|
|
190
|
+
$metadata: deserializeMetadata(output),
|
|
191
|
+
});
|
|
192
|
+
return [4, collectBody(output.body, context)];
|
|
193
|
+
case 1:
|
|
194
|
+
_a.sent();
|
|
195
|
+
return [2, contents];
|
|
196
|
+
}
|
|
77
197
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
198
|
+
}); };
|
|
199
|
+
var deserializeAws_restJson1DeleteEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
200
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
201
|
+
var _c;
|
|
202
|
+
return __generator(this, function (_d) {
|
|
203
|
+
switch (_d.label) {
|
|
204
|
+
case 0:
|
|
205
|
+
_a = [__assign({}, output)];
|
|
206
|
+
_c = {};
|
|
207
|
+
return [4, parseErrorBody(output.body, context)];
|
|
208
|
+
case 1:
|
|
209
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
210
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
211
|
+
_b = errorCode;
|
|
212
|
+
switch (_b) {
|
|
213
|
+
case "AccessDeniedException": return [3, 2];
|
|
214
|
+
case "com.amazonaws.s3outposts#AccessDeniedException": return [3, 2];
|
|
215
|
+
case "InternalServerException": return [3, 4];
|
|
216
|
+
case "com.amazonaws.s3outposts#InternalServerException": return [3, 4];
|
|
217
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
218
|
+
case "com.amazonaws.s3outposts#ResourceNotFoundException": return [3, 6];
|
|
219
|
+
case "ValidationException": return [3, 8];
|
|
220
|
+
case "com.amazonaws.s3outposts#ValidationException": return [3, 8];
|
|
221
|
+
}
|
|
222
|
+
return [3, 10];
|
|
223
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
224
|
+
case 3: throw _d.sent();
|
|
225
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
226
|
+
case 5: throw _d.sent();
|
|
227
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
228
|
+
case 7: throw _d.sent();
|
|
229
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
230
|
+
case 9: throw _d.sent();
|
|
231
|
+
case 10:
|
|
232
|
+
parsedBody = parsedOutput.body;
|
|
233
|
+
throwDefaultError({
|
|
234
|
+
output: output,
|
|
235
|
+
parsedBody: parsedBody,
|
|
236
|
+
exceptionCtor: __BaseException,
|
|
237
|
+
errorCode: errorCode,
|
|
238
|
+
});
|
|
239
|
+
_d.label = 11;
|
|
240
|
+
case 11: return [2];
|
|
241
|
+
}
|
|
88
242
|
});
|
|
89
|
-
};
|
|
90
|
-
export
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
243
|
+
}); };
|
|
244
|
+
export var deserializeAws_restJson1ListEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
245
|
+
var contents, data, _a, _b;
|
|
246
|
+
return __generator(this, function (_c) {
|
|
247
|
+
switch (_c.label) {
|
|
248
|
+
case 0:
|
|
249
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
250
|
+
return [2, deserializeAws_restJson1ListEndpointsCommandError(output, context)];
|
|
251
|
+
}
|
|
252
|
+
contents = map({
|
|
253
|
+
$metadata: deserializeMetadata(output),
|
|
254
|
+
});
|
|
255
|
+
_a = __expectNonNull;
|
|
256
|
+
_b = __expectObject;
|
|
257
|
+
return [4, parseBody(output.body, context)];
|
|
258
|
+
case 1:
|
|
259
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
260
|
+
if (data.Endpoints != null) {
|
|
261
|
+
contents.Endpoints = deserializeAws_restJson1Endpoints(data.Endpoints, context);
|
|
262
|
+
}
|
|
263
|
+
if (data.NextToken != null) {
|
|
264
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
265
|
+
}
|
|
266
|
+
return [2, contents];
|
|
267
|
+
}
|
|
96
268
|
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
269
|
+
}); };
|
|
270
|
+
var deserializeAws_restJson1ListEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
271
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
272
|
+
var _c;
|
|
273
|
+
return __generator(this, function (_d) {
|
|
274
|
+
switch (_d.label) {
|
|
275
|
+
case 0:
|
|
276
|
+
_a = [__assign({}, output)];
|
|
277
|
+
_c = {};
|
|
278
|
+
return [4, parseErrorBody(output.body, context)];
|
|
279
|
+
case 1:
|
|
280
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
281
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
282
|
+
_b = errorCode;
|
|
283
|
+
switch (_b) {
|
|
284
|
+
case "AccessDeniedException": return [3, 2];
|
|
285
|
+
case "com.amazonaws.s3outposts#AccessDeniedException": return [3, 2];
|
|
286
|
+
case "InternalServerException": return [3, 4];
|
|
287
|
+
case "com.amazonaws.s3outposts#InternalServerException": return [3, 4];
|
|
288
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
289
|
+
case "com.amazonaws.s3outposts#ResourceNotFoundException": return [3, 6];
|
|
290
|
+
case "ValidationException": return [3, 8];
|
|
291
|
+
case "com.amazonaws.s3outposts#ValidationException": return [3, 8];
|
|
292
|
+
}
|
|
293
|
+
return [3, 10];
|
|
294
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
295
|
+
case 3: throw _d.sent();
|
|
296
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
297
|
+
case 5: throw _d.sent();
|
|
298
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
299
|
+
case 7: throw _d.sent();
|
|
300
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
301
|
+
case 9: throw _d.sent();
|
|
302
|
+
case 10:
|
|
303
|
+
parsedBody = parsedOutput.body;
|
|
304
|
+
throwDefaultError({
|
|
305
|
+
output: output,
|
|
306
|
+
parsedBody: parsedBody,
|
|
307
|
+
exceptionCtor: __BaseException,
|
|
308
|
+
errorCode: errorCode,
|
|
309
|
+
});
|
|
310
|
+
_d.label = 11;
|
|
311
|
+
case 11: return [2];
|
|
312
|
+
}
|
|
141
313
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
output,
|
|
168
|
-
parsedBody,
|
|
169
|
-
exceptionCtor: __BaseException,
|
|
170
|
-
errorCode,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
export const deserializeAws_restJson1ListEndpointsCommand = async (output, context) => {
|
|
175
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
176
|
-
return deserializeAws_restJson1ListEndpointsCommandError(output, context);
|
|
177
|
-
}
|
|
178
|
-
const contents = map({
|
|
179
|
-
$metadata: deserializeMetadata(output),
|
|
314
|
+
}); };
|
|
315
|
+
export var deserializeAws_restJson1ListSharedEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
316
|
+
var contents, data, _a, _b;
|
|
317
|
+
return __generator(this, function (_c) {
|
|
318
|
+
switch (_c.label) {
|
|
319
|
+
case 0:
|
|
320
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
321
|
+
return [2, deserializeAws_restJson1ListSharedEndpointsCommandError(output, context)];
|
|
322
|
+
}
|
|
323
|
+
contents = map({
|
|
324
|
+
$metadata: deserializeMetadata(output),
|
|
325
|
+
});
|
|
326
|
+
_a = __expectNonNull;
|
|
327
|
+
_b = __expectObject;
|
|
328
|
+
return [4, parseBody(output.body, context)];
|
|
329
|
+
case 1:
|
|
330
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
331
|
+
if (data.Endpoints != null) {
|
|
332
|
+
contents.Endpoints = deserializeAws_restJson1Endpoints(data.Endpoints, context);
|
|
333
|
+
}
|
|
334
|
+
if (data.NextToken != null) {
|
|
335
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
336
|
+
}
|
|
337
|
+
return [2, contents];
|
|
338
|
+
}
|
|
180
339
|
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
340
|
+
}); };
|
|
341
|
+
var deserializeAws_restJson1ListSharedEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
342
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
343
|
+
var _c;
|
|
344
|
+
return __generator(this, function (_d) {
|
|
345
|
+
switch (_d.label) {
|
|
346
|
+
case 0:
|
|
347
|
+
_a = [__assign({}, output)];
|
|
348
|
+
_c = {};
|
|
349
|
+
return [4, parseErrorBody(output.body, context)];
|
|
350
|
+
case 1:
|
|
351
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
352
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
353
|
+
_b = errorCode;
|
|
354
|
+
switch (_b) {
|
|
355
|
+
case "AccessDeniedException": return [3, 2];
|
|
356
|
+
case "com.amazonaws.s3outposts#AccessDeniedException": return [3, 2];
|
|
357
|
+
case "InternalServerException": return [3, 4];
|
|
358
|
+
case "com.amazonaws.s3outposts#InternalServerException": return [3, 4];
|
|
359
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
360
|
+
case "com.amazonaws.s3outposts#ResourceNotFoundException": return [3, 6];
|
|
361
|
+
case "ValidationException": return [3, 8];
|
|
362
|
+
case "com.amazonaws.s3outposts#ValidationException": return [3, 8];
|
|
363
|
+
}
|
|
364
|
+
return [3, 10];
|
|
365
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
366
|
+
case 3: throw _d.sent();
|
|
367
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
368
|
+
case 5: throw _d.sent();
|
|
369
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
370
|
+
case 7: throw _d.sent();
|
|
371
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
372
|
+
case 9: throw _d.sent();
|
|
373
|
+
case 10:
|
|
374
|
+
parsedBody = parsedOutput.body;
|
|
375
|
+
throwDefaultError({
|
|
376
|
+
output: output,
|
|
377
|
+
parsedBody: parsedBody,
|
|
378
|
+
exceptionCtor: __BaseException,
|
|
379
|
+
errorCode: errorCode,
|
|
380
|
+
});
|
|
381
|
+
_d.label = 11;
|
|
382
|
+
case 11: return [2];
|
|
383
|
+
}
|
|
225
384
|
});
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
contents
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
body: await parseErrorBody(output.body, context),
|
|
239
|
-
};
|
|
240
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
241
|
-
switch (errorCode) {
|
|
242
|
-
case "AccessDeniedException":
|
|
243
|
-
case "com.amazonaws.s3outposts#AccessDeniedException":
|
|
244
|
-
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
245
|
-
case "InternalServerException":
|
|
246
|
-
case "com.amazonaws.s3outposts#InternalServerException":
|
|
247
|
-
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
248
|
-
case "ResourceNotFoundException":
|
|
249
|
-
case "com.amazonaws.s3outposts#ResourceNotFoundException":
|
|
250
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
251
|
-
case "ValidationException":
|
|
252
|
-
case "com.amazonaws.s3outposts#ValidationException":
|
|
253
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
254
|
-
default:
|
|
255
|
-
const parsedBody = parsedOutput.body;
|
|
256
|
-
throwDefaultError({
|
|
257
|
-
output,
|
|
258
|
-
parsedBody,
|
|
259
|
-
exceptionCtor: __BaseException,
|
|
260
|
-
errorCode,
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
const map = __map;
|
|
265
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
266
|
-
const contents = map({});
|
|
267
|
-
const data = parsedOutput.body;
|
|
268
|
-
if (data.Message != null) {
|
|
269
|
-
contents.Message = __expectString(data.Message);
|
|
270
|
-
}
|
|
271
|
-
const exception = new AccessDeniedException({
|
|
272
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
273
|
-
...contents,
|
|
385
|
+
}); };
|
|
386
|
+
var map = __map;
|
|
387
|
+
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
388
|
+
var contents, data, exception;
|
|
389
|
+
return __generator(this, function (_a) {
|
|
390
|
+
contents = map({});
|
|
391
|
+
data = parsedOutput.body;
|
|
392
|
+
if (data.Message != null) {
|
|
393
|
+
contents.Message = __expectString(data.Message);
|
|
394
|
+
}
|
|
395
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
396
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
274
397
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
285
|
-
|
|
398
|
+
}); };
|
|
399
|
+
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
400
|
+
var contents, data, exception;
|
|
401
|
+
return __generator(this, function (_a) {
|
|
402
|
+
contents = map({});
|
|
403
|
+
data = parsedOutput.body;
|
|
404
|
+
if (data.Message != null) {
|
|
405
|
+
contents.Message = __expectString(data.Message);
|
|
406
|
+
}
|
|
407
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
408
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
286
409
|
});
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
297
|
-
|
|
410
|
+
}); };
|
|
411
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
412
|
+
var contents, data, exception;
|
|
413
|
+
return __generator(this, function (_a) {
|
|
414
|
+
contents = map({});
|
|
415
|
+
data = parsedOutput.body;
|
|
416
|
+
if (data.Message != null) {
|
|
417
|
+
contents.Message = __expectString(data.Message);
|
|
418
|
+
}
|
|
419
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
420
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
298
421
|
});
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
309
|
-
|
|
422
|
+
}); };
|
|
423
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
424
|
+
var contents, data, exception;
|
|
425
|
+
return __generator(this, function (_a) {
|
|
426
|
+
contents = map({});
|
|
427
|
+
data = parsedOutput.body;
|
|
428
|
+
if (data.Message != null) {
|
|
429
|
+
contents.Message = __expectString(data.Message);
|
|
430
|
+
}
|
|
431
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
432
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
310
433
|
});
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
321
|
-
|
|
434
|
+
}); };
|
|
435
|
+
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
436
|
+
var contents, data, exception;
|
|
437
|
+
return __generator(this, function (_a) {
|
|
438
|
+
contents = map({});
|
|
439
|
+
data = parsedOutput.body;
|
|
440
|
+
if (data.Message != null) {
|
|
441
|
+
contents.Message = __expectString(data.Message);
|
|
442
|
+
}
|
|
443
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
444
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
322
445
|
});
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
const deserializeAws_restJson1Endpoint = (output, context) => {
|
|
446
|
+
}); };
|
|
447
|
+
var deserializeAws_restJson1Endpoint = function (output, context) {
|
|
326
448
|
return {
|
|
327
449
|
AccessType: __expectString(output.AccessType),
|
|
328
450
|
CidrBlock: __expectString(output.CidrBlock),
|
|
@@ -341,10 +463,10 @@ const deserializeAws_restJson1Endpoint = (output, context) => {
|
|
|
341
463
|
VpcId: __expectString(output.VpcId),
|
|
342
464
|
};
|
|
343
465
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
.filter((e)
|
|
347
|
-
.map((entry)
|
|
466
|
+
var deserializeAws_restJson1Endpoints = function (output, context) {
|
|
467
|
+
var retVal = (output || [])
|
|
468
|
+
.filter(function (e) { return e != null; })
|
|
469
|
+
.map(function (entry) {
|
|
348
470
|
if (entry === null) {
|
|
349
471
|
return null;
|
|
350
472
|
}
|
|
@@ -352,15 +474,15 @@ const deserializeAws_restJson1Endpoints = (output, context) => {
|
|
|
352
474
|
});
|
|
353
475
|
return retVal;
|
|
354
476
|
};
|
|
355
|
-
|
|
477
|
+
var deserializeAws_restJson1NetworkInterface = function (output, context) {
|
|
356
478
|
return {
|
|
357
479
|
NetworkInterfaceId: __expectString(output.NetworkInterfaceId),
|
|
358
480
|
};
|
|
359
481
|
};
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
.filter((e)
|
|
363
|
-
.map((entry)
|
|
482
|
+
var deserializeAws_restJson1NetworkInterfaces = function (output, context) {
|
|
483
|
+
var retVal = (output || [])
|
|
484
|
+
.filter(function (e) { return e != null; })
|
|
485
|
+
.map(function (entry) {
|
|
364
486
|
if (entry === null) {
|
|
365
487
|
return null;
|
|
366
488
|
}
|
|
@@ -368,39 +490,57 @@ const deserializeAws_restJson1NetworkInterfaces = (output, context) => {
|
|
|
368
490
|
});
|
|
369
491
|
return retVal;
|
|
370
492
|
};
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
493
|
+
var deserializeMetadata = function (output) {
|
|
494
|
+
var _a, _b;
|
|
495
|
+
return ({
|
|
496
|
+
httpStatusCode: output.statusCode,
|
|
497
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
498
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
499
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
var collectBody = function (streamBody, context) {
|
|
503
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
378
504
|
if (streamBody instanceof Uint8Array) {
|
|
379
505
|
return Promise.resolve(streamBody);
|
|
380
506
|
}
|
|
381
507
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
382
508
|
};
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
509
|
+
var collectBodyString = function (streamBody, context) {
|
|
510
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
511
|
+
};
|
|
512
|
+
var isSerializableHeaderValue = function (value) {
|
|
513
|
+
return value !== undefined &&
|
|
514
|
+
value !== null &&
|
|
515
|
+
value !== "" &&
|
|
516
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
517
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
518
|
+
};
|
|
519
|
+
var parseBody = function (streamBody, context) {
|
|
520
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
521
|
+
if (encoded.length) {
|
|
522
|
+
return JSON.parse(encoded);
|
|
523
|
+
}
|
|
524
|
+
return {};
|
|
525
|
+
});
|
|
399
526
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
527
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
528
|
+
var value;
|
|
529
|
+
var _a;
|
|
530
|
+
return __generator(this, function (_b) {
|
|
531
|
+
switch (_b.label) {
|
|
532
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
533
|
+
case 1:
|
|
534
|
+
value = _b.sent();
|
|
535
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
536
|
+
return [2, value];
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}); };
|
|
540
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
541
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
542
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
543
|
+
var cleanValue = rawValue;
|
|
404
544
|
if (typeof cleanValue === "number") {
|
|
405
545
|
cleanValue = cleanValue.toString();
|
|
406
546
|
}
|
|
@@ -415,7 +555,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
415
555
|
}
|
|
416
556
|
return cleanValue;
|
|
417
557
|
};
|
|
418
|
-
|
|
558
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
419
559
|
if (headerKey !== undefined) {
|
|
420
560
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
421
561
|
}
|