@aws-sdk/client-s3outposts 3.312.0 → 3.316.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/S3Outposts.js
CHANGED
|
@@ -1,82 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.S3Outposts = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const CreateEndpointCommand_1 = require("./commands/CreateEndpointCommand");
|
|
5
6
|
const DeleteEndpointCommand_1 = require("./commands/DeleteEndpointCommand");
|
|
6
7
|
const ListEndpointsCommand_1 = require("./commands/ListEndpointsCommand");
|
|
7
8
|
const ListOutpostsWithS3Command_1 = require("./commands/ListOutpostsWithS3Command");
|
|
8
9
|
const ListSharedEndpointsCommand_1 = require("./commands/ListSharedEndpointsCommand");
|
|
9
10
|
const S3OutpostsClient_1 = require("./S3OutpostsClient");
|
|
11
|
+
const commands = {
|
|
12
|
+
CreateEndpointCommand: CreateEndpointCommand_1.CreateEndpointCommand,
|
|
13
|
+
DeleteEndpointCommand: DeleteEndpointCommand_1.DeleteEndpointCommand,
|
|
14
|
+
ListEndpointsCommand: ListEndpointsCommand_1.ListEndpointsCommand,
|
|
15
|
+
ListOutpostsWithS3Command: ListOutpostsWithS3Command_1.ListOutpostsWithS3Command,
|
|
16
|
+
ListSharedEndpointsCommand: ListSharedEndpointsCommand_1.ListSharedEndpointsCommand,
|
|
17
|
+
};
|
|
10
18
|
class S3Outposts extends S3OutpostsClient_1.S3OutpostsClient {
|
|
11
|
-
createEndpoint(args, optionsOrCb, cb) {
|
|
12
|
-
const command = new CreateEndpointCommand_1.CreateEndpointCommand(args);
|
|
13
|
-
if (typeof optionsOrCb === "function") {
|
|
14
|
-
this.send(command, optionsOrCb);
|
|
15
|
-
}
|
|
16
|
-
else if (typeof cb === "function") {
|
|
17
|
-
if (typeof optionsOrCb !== "object")
|
|
18
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
19
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return this.send(command, optionsOrCb);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
deleteEndpoint(args, optionsOrCb, cb) {
|
|
26
|
-
const command = new DeleteEndpointCommand_1.DeleteEndpointCommand(args);
|
|
27
|
-
if (typeof optionsOrCb === "function") {
|
|
28
|
-
this.send(command, optionsOrCb);
|
|
29
|
-
}
|
|
30
|
-
else if (typeof cb === "function") {
|
|
31
|
-
if (typeof optionsOrCb !== "object")
|
|
32
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
33
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return this.send(command, optionsOrCb);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
listEndpoints(args, optionsOrCb, cb) {
|
|
40
|
-
const command = new ListEndpointsCommand_1.ListEndpointsCommand(args);
|
|
41
|
-
if (typeof optionsOrCb === "function") {
|
|
42
|
-
this.send(command, optionsOrCb);
|
|
43
|
-
}
|
|
44
|
-
else if (typeof cb === "function") {
|
|
45
|
-
if (typeof optionsOrCb !== "object")
|
|
46
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
47
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return this.send(command, optionsOrCb);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
listOutpostsWithS3(args, optionsOrCb, cb) {
|
|
54
|
-
const command = new ListOutpostsWithS3Command_1.ListOutpostsWithS3Command(args);
|
|
55
|
-
if (typeof optionsOrCb === "function") {
|
|
56
|
-
this.send(command, optionsOrCb);
|
|
57
|
-
}
|
|
58
|
-
else if (typeof cb === "function") {
|
|
59
|
-
if (typeof optionsOrCb !== "object")
|
|
60
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
61
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
return this.send(command, optionsOrCb);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
listSharedEndpoints(args, optionsOrCb, cb) {
|
|
68
|
-
const command = new ListSharedEndpointsCommand_1.ListSharedEndpointsCommand(args);
|
|
69
|
-
if (typeof optionsOrCb === "function") {
|
|
70
|
-
this.send(command, optionsOrCb);
|
|
71
|
-
}
|
|
72
|
-
else if (typeof cb === "function") {
|
|
73
|
-
if (typeof optionsOrCb !== "object")
|
|
74
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
75
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
return this.send(command, optionsOrCb);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
19
|
}
|
|
82
20
|
exports.S3Outposts = S3Outposts;
|
|
21
|
+
(0, smithy_client_1.createAggregatedClient)(commands, S3Outposts);
|
|
@@ -12,13 +12,13 @@ const se_CreateEndpointCommand = async (input, context) => {
|
|
|
12
12
|
};
|
|
13
13
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/CreateEndpoint";
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
AccessType: [],
|
|
17
|
+
CustomerOwnedIpv4Pool: [],
|
|
18
|
+
OutpostId: [],
|
|
19
|
+
SecurityGroupId: [],
|
|
20
|
+
SubnetId: [],
|
|
21
|
+
}));
|
|
22
22
|
return new protocol_http_1.HttpRequest({
|
|
23
23
|
protocol,
|
|
24
24
|
hostname,
|
|
@@ -34,7 +34,7 @@ const se_DeleteEndpointCommand = async (input, context) => {
|
|
|
34
34
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
35
|
const headers = {};
|
|
36
36
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/DeleteEndpoint";
|
|
37
|
-
const query = map({
|
|
37
|
+
const query = (0, smithy_client_1.map)({
|
|
38
38
|
endpointId: [, (0, smithy_client_1.expectNonNull)(input.EndpointId, `EndpointId`)],
|
|
39
39
|
outpostId: [, (0, smithy_client_1.expectNonNull)(input.OutpostId, `OutpostId`)],
|
|
40
40
|
});
|
|
@@ -55,7 +55,7 @@ const se_ListEndpointsCommand = async (input, context) => {
|
|
|
55
55
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
56
56
|
const headers = {};
|
|
57
57
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/ListEndpoints";
|
|
58
|
-
const query = map({
|
|
58
|
+
const query = (0, smithy_client_1.map)({
|
|
59
59
|
nextToken: [, input.NextToken],
|
|
60
60
|
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
61
61
|
});
|
|
@@ -76,7 +76,7 @@ const se_ListOutpostsWithS3Command = async (input, context) => {
|
|
|
76
76
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
77
77
|
const headers = {};
|
|
78
78
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/ListOutpostsWithS3";
|
|
79
|
-
const query = map({
|
|
79
|
+
const query = (0, smithy_client_1.map)({
|
|
80
80
|
nextToken: [, input.NextToken],
|
|
81
81
|
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
82
82
|
});
|
|
@@ -97,7 +97,7 @@ const se_ListSharedEndpointsCommand = async (input, context) => {
|
|
|
97
97
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
98
98
|
const headers = {};
|
|
99
99
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/ListSharedEndpoints";
|
|
100
|
-
const query = map({
|
|
100
|
+
const query = (0, smithy_client_1.map)({
|
|
101
101
|
nextToken: [, input.NextToken],
|
|
102
102
|
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
103
103
|
outpostId: [, (0, smithy_client_1.expectNonNull)(input.OutpostId, `OutpostId`)],
|
|
@@ -119,13 +119,14 @@ const de_CreateEndpointCommand = async (output, context) => {
|
|
|
119
119
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
120
120
|
return de_CreateEndpointCommandError(output, context);
|
|
121
121
|
}
|
|
122
|
-
const contents = map({
|
|
122
|
+
const contents = (0, smithy_client_1.map)({
|
|
123
123
|
$metadata: deserializeMetadata(output),
|
|
124
124
|
});
|
|
125
125
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
126
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
127
|
+
EndpointArn: smithy_client_1.expectString,
|
|
128
|
+
});
|
|
129
|
+
Object.assign(contents, doc);
|
|
129
130
|
return contents;
|
|
130
131
|
};
|
|
131
132
|
exports.de_CreateEndpointCommand = de_CreateEndpointCommand;
|
|
@@ -159,10 +160,9 @@ const de_CreateEndpointCommandError = async (output, context) => {
|
|
|
159
160
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
160
161
|
default:
|
|
161
162
|
const parsedBody = parsedOutput.body;
|
|
162
|
-
|
|
163
|
+
return throwDefaultError({
|
|
163
164
|
output,
|
|
164
165
|
parsedBody,
|
|
165
|
-
exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
|
|
166
166
|
errorCode,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
@@ -171,7 +171,7 @@ const de_DeleteEndpointCommand = async (output, context) => {
|
|
|
171
171
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
172
172
|
return de_DeleteEndpointCommandError(output, context);
|
|
173
173
|
}
|
|
174
|
-
const contents = map({
|
|
174
|
+
const contents = (0, smithy_client_1.map)({
|
|
175
175
|
$metadata: deserializeMetadata(output),
|
|
176
176
|
});
|
|
177
177
|
await collectBody(output.body, context);
|
|
@@ -205,10 +205,9 @@ const de_DeleteEndpointCommandError = async (output, context) => {
|
|
|
205
205
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
206
206
|
default:
|
|
207
207
|
const parsedBody = parsedOutput.body;
|
|
208
|
-
|
|
208
|
+
return throwDefaultError({
|
|
209
209
|
output,
|
|
210
210
|
parsedBody,
|
|
211
|
-
exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
|
|
212
211
|
errorCode,
|
|
213
212
|
});
|
|
214
213
|
}
|
|
@@ -217,16 +216,15 @@ const de_ListEndpointsCommand = async (output, context) => {
|
|
|
217
216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
218
217
|
return de_ListEndpointsCommandError(output, context);
|
|
219
218
|
}
|
|
220
|
-
const contents = map({
|
|
219
|
+
const contents = (0, smithy_client_1.map)({
|
|
221
220
|
$metadata: deserializeMetadata(output),
|
|
222
221
|
});
|
|
223
222
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
223
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
224
|
+
Endpoints: (_) => de_Endpoints(_, context),
|
|
225
|
+
NextToken: smithy_client_1.expectString,
|
|
226
|
+
});
|
|
227
|
+
Object.assign(contents, doc);
|
|
230
228
|
return contents;
|
|
231
229
|
};
|
|
232
230
|
exports.de_ListEndpointsCommand = de_ListEndpointsCommand;
|
|
@@ -254,10 +252,9 @@ const de_ListEndpointsCommandError = async (output, context) => {
|
|
|
254
252
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
255
253
|
default:
|
|
256
254
|
const parsedBody = parsedOutput.body;
|
|
257
|
-
|
|
255
|
+
return throwDefaultError({
|
|
258
256
|
output,
|
|
259
257
|
parsedBody,
|
|
260
|
-
exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
|
|
261
258
|
errorCode,
|
|
262
259
|
});
|
|
263
260
|
}
|
|
@@ -266,16 +263,15 @@ const de_ListOutpostsWithS3Command = async (output, context) => {
|
|
|
266
263
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
267
264
|
return de_ListOutpostsWithS3CommandError(output, context);
|
|
268
265
|
}
|
|
269
|
-
const contents = map({
|
|
266
|
+
const contents = (0, smithy_client_1.map)({
|
|
270
267
|
$metadata: deserializeMetadata(output),
|
|
271
268
|
});
|
|
272
269
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
270
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
271
|
+
NextToken: smithy_client_1.expectString,
|
|
272
|
+
Outposts: smithy_client_1._json,
|
|
273
|
+
});
|
|
274
|
+
Object.assign(contents, doc);
|
|
279
275
|
return contents;
|
|
280
276
|
};
|
|
281
277
|
exports.de_ListOutpostsWithS3Command = de_ListOutpostsWithS3Command;
|
|
@@ -300,10 +296,9 @@ const de_ListOutpostsWithS3CommandError = async (output, context) => {
|
|
|
300
296
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
301
297
|
default:
|
|
302
298
|
const parsedBody = parsedOutput.body;
|
|
303
|
-
|
|
299
|
+
return throwDefaultError({
|
|
304
300
|
output,
|
|
305
301
|
parsedBody,
|
|
306
|
-
exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
|
|
307
302
|
errorCode,
|
|
308
303
|
});
|
|
309
304
|
}
|
|
@@ -312,16 +307,15 @@ const de_ListSharedEndpointsCommand = async (output, context) => {
|
|
|
312
307
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
313
308
|
return de_ListSharedEndpointsCommandError(output, context);
|
|
314
309
|
}
|
|
315
|
-
const contents = map({
|
|
310
|
+
const contents = (0, smithy_client_1.map)({
|
|
316
311
|
$metadata: deserializeMetadata(output),
|
|
317
312
|
});
|
|
318
313
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
314
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
315
|
+
Endpoints: (_) => de_Endpoints(_, context),
|
|
316
|
+
NextToken: smithy_client_1.expectString,
|
|
317
|
+
});
|
|
318
|
+
Object.assign(contents, doc);
|
|
325
319
|
return contents;
|
|
326
320
|
};
|
|
327
321
|
exports.de_ListSharedEndpointsCommand = de_ListSharedEndpointsCommand;
|
|
@@ -349,21 +343,21 @@ const de_ListSharedEndpointsCommandError = async (output, context) => {
|
|
|
349
343
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
350
344
|
default:
|
|
351
345
|
const parsedBody = parsedOutput.body;
|
|
352
|
-
|
|
346
|
+
return throwDefaultError({
|
|
353
347
|
output,
|
|
354
348
|
parsedBody,
|
|
355
|
-
exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
|
|
356
349
|
errorCode,
|
|
357
350
|
});
|
|
358
351
|
}
|
|
359
352
|
};
|
|
360
|
-
const
|
|
353
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(S3OutpostsServiceException_1.S3OutpostsServiceException);
|
|
361
354
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
362
|
-
const contents = map({});
|
|
355
|
+
const contents = (0, smithy_client_1.map)({});
|
|
363
356
|
const data = parsedOutput.body;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
357
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
358
|
+
Message: smithy_client_1.expectString,
|
|
359
|
+
});
|
|
360
|
+
Object.assign(contents, doc);
|
|
367
361
|
const exception = new models_0_1.AccessDeniedException({
|
|
368
362
|
$metadata: deserializeMetadata(parsedOutput),
|
|
369
363
|
...contents,
|
|
@@ -371,11 +365,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
371
365
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
372
366
|
};
|
|
373
367
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
374
|
-
const contents = map({});
|
|
368
|
+
const contents = (0, smithy_client_1.map)({});
|
|
375
369
|
const data = parsedOutput.body;
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
370
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
371
|
+
Message: smithy_client_1.expectString,
|
|
372
|
+
});
|
|
373
|
+
Object.assign(contents, doc);
|
|
379
374
|
const exception = new models_0_1.ConflictException({
|
|
380
375
|
$metadata: deserializeMetadata(parsedOutput),
|
|
381
376
|
...contents,
|
|
@@ -383,11 +378,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
383
378
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
384
379
|
};
|
|
385
380
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
386
|
-
const contents = map({});
|
|
381
|
+
const contents = (0, smithy_client_1.map)({});
|
|
387
382
|
const data = parsedOutput.body;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
383
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
384
|
+
Message: smithy_client_1.expectString,
|
|
385
|
+
});
|
|
386
|
+
Object.assign(contents, doc);
|
|
391
387
|
const exception = new models_0_1.InternalServerException({
|
|
392
388
|
$metadata: deserializeMetadata(parsedOutput),
|
|
393
389
|
...contents,
|
|
@@ -395,11 +391,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
395
391
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
396
392
|
};
|
|
397
393
|
const de_OutpostOfflineExceptionRes = async (parsedOutput, context) => {
|
|
398
|
-
const contents = map({});
|
|
394
|
+
const contents = (0, smithy_client_1.map)({});
|
|
399
395
|
const data = parsedOutput.body;
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
396
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
397
|
+
Message: smithy_client_1.expectString,
|
|
398
|
+
});
|
|
399
|
+
Object.assign(contents, doc);
|
|
403
400
|
const exception = new models_0_1.OutpostOfflineException({
|
|
404
401
|
$metadata: deserializeMetadata(parsedOutput),
|
|
405
402
|
...contents,
|
|
@@ -407,11 +404,12 @@ const de_OutpostOfflineExceptionRes = async (parsedOutput, context) => {
|
|
|
407
404
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
408
405
|
};
|
|
409
406
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
410
|
-
const contents = map({});
|
|
407
|
+
const contents = (0, smithy_client_1.map)({});
|
|
411
408
|
const data = parsedOutput.body;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
409
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
410
|
+
Message: smithy_client_1.expectString,
|
|
411
|
+
});
|
|
412
|
+
Object.assign(contents, doc);
|
|
415
413
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
416
414
|
$metadata: deserializeMetadata(parsedOutput),
|
|
417
415
|
...contents,
|
|
@@ -419,11 +417,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
419
417
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
420
418
|
};
|
|
421
419
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
422
|
-
const contents = map({});
|
|
420
|
+
const contents = (0, smithy_client_1.map)({});
|
|
423
421
|
const data = parsedOutput.body;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
422
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
423
|
+
Message: smithy_client_1.expectString,
|
|
424
|
+
});
|
|
425
|
+
Object.assign(contents, doc);
|
|
427
426
|
const exception = new models_0_1.ThrottlingException({
|
|
428
427
|
$metadata: deserializeMetadata(parsedOutput),
|
|
429
428
|
...contents,
|
|
@@ -431,11 +430,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
431
430
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
432
431
|
};
|
|
433
432
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
434
|
-
const contents = map({});
|
|
433
|
+
const contents = (0, smithy_client_1.map)({});
|
|
435
434
|
const data = parsedOutput.body;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}
|
|
435
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
436
|
+
Message: smithy_client_1.expectString,
|
|
437
|
+
});
|
|
438
|
+
Object.assign(contents, doc);
|
|
439
439
|
const exception = new models_0_1.ValidationException({
|
|
440
440
|
$metadata: deserializeMetadata(parsedOutput),
|
|
441
441
|
...contents,
|
|
@@ -443,75 +443,29 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
443
443
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
444
444
|
};
|
|
445
445
|
const de_Endpoint = (output, context) => {
|
|
446
|
-
return {
|
|
447
|
-
AccessType:
|
|
448
|
-
CidrBlock:
|
|
449
|
-
CreationTime:
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
VpcId: (0, smithy_client_1.expectString)(output.VpcId),
|
|
461
|
-
};
|
|
446
|
+
return (0, smithy_client_1.take)(output, {
|
|
447
|
+
AccessType: smithy_client_1.expectString,
|
|
448
|
+
CidrBlock: smithy_client_1.expectString,
|
|
449
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
450
|
+
CustomerOwnedIpv4Pool: smithy_client_1.expectString,
|
|
451
|
+
EndpointArn: smithy_client_1.expectString,
|
|
452
|
+
FailedReason: smithy_client_1._json,
|
|
453
|
+
NetworkInterfaces: smithy_client_1._json,
|
|
454
|
+
OutpostsId: smithy_client_1.expectString,
|
|
455
|
+
SecurityGroupId: smithy_client_1.expectString,
|
|
456
|
+
Status: smithy_client_1.expectString,
|
|
457
|
+
SubnetId: smithy_client_1.expectString,
|
|
458
|
+
VpcId: smithy_client_1.expectString,
|
|
459
|
+
});
|
|
462
460
|
};
|
|
463
461
|
const de_Endpoints = (output, context) => {
|
|
464
462
|
const retVal = (output || [])
|
|
465
463
|
.filter((e) => e != null)
|
|
466
464
|
.map((entry) => {
|
|
467
|
-
if (entry === null) {
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
465
|
return de_Endpoint(entry, context);
|
|
471
466
|
});
|
|
472
467
|
return retVal;
|
|
473
468
|
};
|
|
474
|
-
const de_FailedReason = (output, context) => {
|
|
475
|
-
return {
|
|
476
|
-
ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
|
|
477
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
478
|
-
};
|
|
479
|
-
};
|
|
480
|
-
const de_NetworkInterface = (output, context) => {
|
|
481
|
-
return {
|
|
482
|
-
NetworkInterfaceId: (0, smithy_client_1.expectString)(output.NetworkInterfaceId),
|
|
483
|
-
};
|
|
484
|
-
};
|
|
485
|
-
const de_NetworkInterfaces = (output, context) => {
|
|
486
|
-
const retVal = (output || [])
|
|
487
|
-
.filter((e) => e != null)
|
|
488
|
-
.map((entry) => {
|
|
489
|
-
if (entry === null) {
|
|
490
|
-
return null;
|
|
491
|
-
}
|
|
492
|
-
return de_NetworkInterface(entry, context);
|
|
493
|
-
});
|
|
494
|
-
return retVal;
|
|
495
|
-
};
|
|
496
|
-
const de_Outpost = (output, context) => {
|
|
497
|
-
return {
|
|
498
|
-
CapacityInBytes: (0, smithy_client_1.expectLong)(output.CapacityInBytes),
|
|
499
|
-
OutpostArn: (0, smithy_client_1.expectString)(output.OutpostArn),
|
|
500
|
-
OutpostId: (0, smithy_client_1.expectString)(output.OutpostId),
|
|
501
|
-
OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
|
|
502
|
-
};
|
|
503
|
-
};
|
|
504
|
-
const de_Outposts = (output, context) => {
|
|
505
|
-
const retVal = (output || [])
|
|
506
|
-
.filter((e) => e != null)
|
|
507
|
-
.map((entry) => {
|
|
508
|
-
if (entry === null) {
|
|
509
|
-
return null;
|
|
510
|
-
}
|
|
511
|
-
return de_Outpost(entry, context);
|
|
512
|
-
});
|
|
513
|
-
return retVal;
|
|
514
|
-
};
|
|
515
469
|
const deserializeMetadata = (output) => ({
|
|
516
470
|
httpStatusCode: output.statusCode,
|
|
517
471
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/S3Outposts.js
CHANGED
|
@@ -1,78 +1,17 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { CreateEndpointCommand, } from "./commands/CreateEndpointCommand";
|
|
2
3
|
import { DeleteEndpointCommand, } from "./commands/DeleteEndpointCommand";
|
|
3
4
|
import { ListEndpointsCommand, } from "./commands/ListEndpointsCommand";
|
|
4
5
|
import { ListOutpostsWithS3Command, } from "./commands/ListOutpostsWithS3Command";
|
|
5
6
|
import { ListSharedEndpointsCommand, } from "./commands/ListSharedEndpointsCommand";
|
|
6
7
|
import { S3OutpostsClient } from "./S3OutpostsClient";
|
|
8
|
+
const commands = {
|
|
9
|
+
CreateEndpointCommand,
|
|
10
|
+
DeleteEndpointCommand,
|
|
11
|
+
ListEndpointsCommand,
|
|
12
|
+
ListOutpostsWithS3Command,
|
|
13
|
+
ListSharedEndpointsCommand,
|
|
14
|
+
};
|
|
7
15
|
export class S3Outposts extends S3OutpostsClient {
|
|
8
|
-
createEndpoint(args, optionsOrCb, cb) {
|
|
9
|
-
const command = new CreateEndpointCommand(args);
|
|
10
|
-
if (typeof optionsOrCb === "function") {
|
|
11
|
-
this.send(command, optionsOrCb);
|
|
12
|
-
}
|
|
13
|
-
else if (typeof cb === "function") {
|
|
14
|
-
if (typeof optionsOrCb !== "object")
|
|
15
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
16
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return this.send(command, optionsOrCb);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
deleteEndpoint(args, optionsOrCb, cb) {
|
|
23
|
-
const command = new DeleteEndpointCommand(args);
|
|
24
|
-
if (typeof optionsOrCb === "function") {
|
|
25
|
-
this.send(command, optionsOrCb);
|
|
26
|
-
}
|
|
27
|
-
else if (typeof cb === "function") {
|
|
28
|
-
if (typeof optionsOrCb !== "object")
|
|
29
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
30
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return this.send(command, optionsOrCb);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
listEndpoints(args, optionsOrCb, cb) {
|
|
37
|
-
const command = new ListEndpointsCommand(args);
|
|
38
|
-
if (typeof optionsOrCb === "function") {
|
|
39
|
-
this.send(command, optionsOrCb);
|
|
40
|
-
}
|
|
41
|
-
else if (typeof cb === "function") {
|
|
42
|
-
if (typeof optionsOrCb !== "object")
|
|
43
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
44
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return this.send(command, optionsOrCb);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
listOutpostsWithS3(args, optionsOrCb, cb) {
|
|
51
|
-
const command = new ListOutpostsWithS3Command(args);
|
|
52
|
-
if (typeof optionsOrCb === "function") {
|
|
53
|
-
this.send(command, optionsOrCb);
|
|
54
|
-
}
|
|
55
|
-
else if (typeof cb === "function") {
|
|
56
|
-
if (typeof optionsOrCb !== "object")
|
|
57
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
58
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return this.send(command, optionsOrCb);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
listSharedEndpoints(args, optionsOrCb, cb) {
|
|
65
|
-
const command = new ListSharedEndpointsCommand(args);
|
|
66
|
-
if (typeof optionsOrCb === "function") {
|
|
67
|
-
this.send(command, optionsOrCb);
|
|
68
|
-
}
|
|
69
|
-
else if (typeof cb === "function") {
|
|
70
|
-
if (typeof optionsOrCb !== "object")
|
|
71
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
72
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
return this.send(command, optionsOrCb);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
16
|
}
|
|
17
|
+
createAggregatedClient(commands, S3Outposts);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { AccessDeniedException, ConflictException, InternalServerException, OutpostOfflineException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
4
|
import { S3OutpostsServiceException as __BaseException } from "../models/S3OutpostsServiceException";
|
|
5
5
|
export const se_CreateEndpointCommand = async (input, context) => {
|
|
@@ -9,13 +9,13 @@ export const se_CreateEndpointCommand = async (input, context) => {
|
|
|
9
9
|
};
|
|
10
10
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/CreateEndpoint";
|
|
11
11
|
let body;
|
|
12
|
-
body = JSON.stringify({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
AccessType: [],
|
|
14
|
+
CustomerOwnedIpv4Pool: [],
|
|
15
|
+
OutpostId: [],
|
|
16
|
+
SecurityGroupId: [],
|
|
17
|
+
SubnetId: [],
|
|
18
|
+
}));
|
|
19
19
|
return new __HttpRequest({
|
|
20
20
|
protocol,
|
|
21
21
|
hostname,
|
|
@@ -115,9 +115,10 @@ export const de_CreateEndpointCommand = async (output, context) => {
|
|
|
115
115
|
$metadata: deserializeMetadata(output),
|
|
116
116
|
});
|
|
117
117
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
118
|
+
const doc = take(data, {
|
|
119
|
+
EndpointArn: __expectString,
|
|
120
|
+
});
|
|
121
|
+
Object.assign(contents, doc);
|
|
121
122
|
return contents;
|
|
122
123
|
};
|
|
123
124
|
const de_CreateEndpointCommandError = async (output, context) => {
|
|
@@ -150,10 +151,9 @@ const de_CreateEndpointCommandError = async (output, context) => {
|
|
|
150
151
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
151
152
|
default:
|
|
152
153
|
const parsedBody = parsedOutput.body;
|
|
153
|
-
throwDefaultError({
|
|
154
|
+
return throwDefaultError({
|
|
154
155
|
output,
|
|
155
156
|
parsedBody,
|
|
156
|
-
exceptionCtor: __BaseException,
|
|
157
157
|
errorCode,
|
|
158
158
|
});
|
|
159
159
|
}
|
|
@@ -195,10 +195,9 @@ const de_DeleteEndpointCommandError = async (output, context) => {
|
|
|
195
195
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
196
196
|
default:
|
|
197
197
|
const parsedBody = parsedOutput.body;
|
|
198
|
-
throwDefaultError({
|
|
198
|
+
return throwDefaultError({
|
|
199
199
|
output,
|
|
200
200
|
parsedBody,
|
|
201
|
-
exceptionCtor: __BaseException,
|
|
202
201
|
errorCode,
|
|
203
202
|
});
|
|
204
203
|
}
|
|
@@ -211,12 +210,11 @@ export const de_ListEndpointsCommand = async (output, context) => {
|
|
|
211
210
|
$metadata: deserializeMetadata(output),
|
|
212
211
|
});
|
|
213
212
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
213
|
+
const doc = take(data, {
|
|
214
|
+
Endpoints: (_) => de_Endpoints(_, context),
|
|
215
|
+
NextToken: __expectString,
|
|
216
|
+
});
|
|
217
|
+
Object.assign(contents, doc);
|
|
220
218
|
return contents;
|
|
221
219
|
};
|
|
222
220
|
const de_ListEndpointsCommandError = async (output, context) => {
|
|
@@ -243,10 +241,9 @@ const de_ListEndpointsCommandError = async (output, context) => {
|
|
|
243
241
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
244
242
|
default:
|
|
245
243
|
const parsedBody = parsedOutput.body;
|
|
246
|
-
throwDefaultError({
|
|
244
|
+
return throwDefaultError({
|
|
247
245
|
output,
|
|
248
246
|
parsedBody,
|
|
249
|
-
exceptionCtor: __BaseException,
|
|
250
247
|
errorCode,
|
|
251
248
|
});
|
|
252
249
|
}
|
|
@@ -259,12 +256,11 @@ export const de_ListOutpostsWithS3Command = async (output, context) => {
|
|
|
259
256
|
$metadata: deserializeMetadata(output),
|
|
260
257
|
});
|
|
261
258
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
259
|
+
const doc = take(data, {
|
|
260
|
+
NextToken: __expectString,
|
|
261
|
+
Outposts: _json,
|
|
262
|
+
});
|
|
263
|
+
Object.assign(contents, doc);
|
|
268
264
|
return contents;
|
|
269
265
|
};
|
|
270
266
|
const de_ListOutpostsWithS3CommandError = async (output, context) => {
|
|
@@ -288,10 +284,9 @@ const de_ListOutpostsWithS3CommandError = async (output, context) => {
|
|
|
288
284
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
289
285
|
default:
|
|
290
286
|
const parsedBody = parsedOutput.body;
|
|
291
|
-
throwDefaultError({
|
|
287
|
+
return throwDefaultError({
|
|
292
288
|
output,
|
|
293
289
|
parsedBody,
|
|
294
|
-
exceptionCtor: __BaseException,
|
|
295
290
|
errorCode,
|
|
296
291
|
});
|
|
297
292
|
}
|
|
@@ -304,12 +299,11 @@ export const de_ListSharedEndpointsCommand = async (output, context) => {
|
|
|
304
299
|
$metadata: deserializeMetadata(output),
|
|
305
300
|
});
|
|
306
301
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
302
|
+
const doc = take(data, {
|
|
303
|
+
Endpoints: (_) => de_Endpoints(_, context),
|
|
304
|
+
NextToken: __expectString,
|
|
305
|
+
});
|
|
306
|
+
Object.assign(contents, doc);
|
|
313
307
|
return contents;
|
|
314
308
|
};
|
|
315
309
|
const de_ListSharedEndpointsCommandError = async (output, context) => {
|
|
@@ -336,21 +330,21 @@ const de_ListSharedEndpointsCommandError = async (output, context) => {
|
|
|
336
330
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
337
331
|
default:
|
|
338
332
|
const parsedBody = parsedOutput.body;
|
|
339
|
-
throwDefaultError({
|
|
333
|
+
return throwDefaultError({
|
|
340
334
|
output,
|
|
341
335
|
parsedBody,
|
|
342
|
-
exceptionCtor: __BaseException,
|
|
343
336
|
errorCode,
|
|
344
337
|
});
|
|
345
338
|
}
|
|
346
339
|
};
|
|
347
|
-
const
|
|
340
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
348
341
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
349
342
|
const contents = map({});
|
|
350
343
|
const data = parsedOutput.body;
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
344
|
+
const doc = take(data, {
|
|
345
|
+
Message: __expectString,
|
|
346
|
+
});
|
|
347
|
+
Object.assign(contents, doc);
|
|
354
348
|
const exception = new AccessDeniedException({
|
|
355
349
|
$metadata: deserializeMetadata(parsedOutput),
|
|
356
350
|
...contents,
|
|
@@ -360,9 +354,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
360
354
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
361
355
|
const contents = map({});
|
|
362
356
|
const data = parsedOutput.body;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
357
|
+
const doc = take(data, {
|
|
358
|
+
Message: __expectString,
|
|
359
|
+
});
|
|
360
|
+
Object.assign(contents, doc);
|
|
366
361
|
const exception = new ConflictException({
|
|
367
362
|
$metadata: deserializeMetadata(parsedOutput),
|
|
368
363
|
...contents,
|
|
@@ -372,9 +367,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
372
367
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
373
368
|
const contents = map({});
|
|
374
369
|
const data = parsedOutput.body;
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
370
|
+
const doc = take(data, {
|
|
371
|
+
Message: __expectString,
|
|
372
|
+
});
|
|
373
|
+
Object.assign(contents, doc);
|
|
378
374
|
const exception = new InternalServerException({
|
|
379
375
|
$metadata: deserializeMetadata(parsedOutput),
|
|
380
376
|
...contents,
|
|
@@ -384,9 +380,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
384
380
|
const de_OutpostOfflineExceptionRes = async (parsedOutput, context) => {
|
|
385
381
|
const contents = map({});
|
|
386
382
|
const data = parsedOutput.body;
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
383
|
+
const doc = take(data, {
|
|
384
|
+
Message: __expectString,
|
|
385
|
+
});
|
|
386
|
+
Object.assign(contents, doc);
|
|
390
387
|
const exception = new OutpostOfflineException({
|
|
391
388
|
$metadata: deserializeMetadata(parsedOutput),
|
|
392
389
|
...contents,
|
|
@@ -396,9 +393,10 @@ const de_OutpostOfflineExceptionRes = async (parsedOutput, context) => {
|
|
|
396
393
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
397
394
|
const contents = map({});
|
|
398
395
|
const data = parsedOutput.body;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
396
|
+
const doc = take(data, {
|
|
397
|
+
Message: __expectString,
|
|
398
|
+
});
|
|
399
|
+
Object.assign(contents, doc);
|
|
402
400
|
const exception = new ResourceNotFoundException({
|
|
403
401
|
$metadata: deserializeMetadata(parsedOutput),
|
|
404
402
|
...contents,
|
|
@@ -408,9 +406,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
408
406
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
409
407
|
const contents = map({});
|
|
410
408
|
const data = parsedOutput.body;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
409
|
+
const doc = take(data, {
|
|
410
|
+
Message: __expectString,
|
|
411
|
+
});
|
|
412
|
+
Object.assign(contents, doc);
|
|
414
413
|
const exception = new ThrottlingException({
|
|
415
414
|
$metadata: deserializeMetadata(parsedOutput),
|
|
416
415
|
...contents,
|
|
@@ -420,9 +419,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
420
419
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
421
420
|
const contents = map({});
|
|
422
421
|
const data = parsedOutput.body;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}
|
|
422
|
+
const doc = take(data, {
|
|
423
|
+
Message: __expectString,
|
|
424
|
+
});
|
|
425
|
+
Object.assign(contents, doc);
|
|
426
426
|
const exception = new ValidationException({
|
|
427
427
|
$metadata: deserializeMetadata(parsedOutput),
|
|
428
428
|
...contents,
|
|
@@ -430,75 +430,29 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
430
430
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
431
431
|
};
|
|
432
432
|
const de_Endpoint = (output, context) => {
|
|
433
|
-
return {
|
|
434
|
-
AccessType: __expectString
|
|
435
|
-
CidrBlock: __expectString
|
|
436
|
-
CreationTime:
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
VpcId: __expectString(output.VpcId),
|
|
448
|
-
};
|
|
433
|
+
return take(output, {
|
|
434
|
+
AccessType: __expectString,
|
|
435
|
+
CidrBlock: __expectString,
|
|
436
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
437
|
+
CustomerOwnedIpv4Pool: __expectString,
|
|
438
|
+
EndpointArn: __expectString,
|
|
439
|
+
FailedReason: _json,
|
|
440
|
+
NetworkInterfaces: _json,
|
|
441
|
+
OutpostsId: __expectString,
|
|
442
|
+
SecurityGroupId: __expectString,
|
|
443
|
+
Status: __expectString,
|
|
444
|
+
SubnetId: __expectString,
|
|
445
|
+
VpcId: __expectString,
|
|
446
|
+
});
|
|
449
447
|
};
|
|
450
448
|
const de_Endpoints = (output, context) => {
|
|
451
449
|
const retVal = (output || [])
|
|
452
450
|
.filter((e) => e != null)
|
|
453
451
|
.map((entry) => {
|
|
454
|
-
if (entry === null) {
|
|
455
|
-
return null;
|
|
456
|
-
}
|
|
457
452
|
return de_Endpoint(entry, context);
|
|
458
453
|
});
|
|
459
454
|
return retVal;
|
|
460
455
|
};
|
|
461
|
-
const de_FailedReason = (output, context) => {
|
|
462
|
-
return {
|
|
463
|
-
ErrorCode: __expectString(output.ErrorCode),
|
|
464
|
-
Message: __expectString(output.Message),
|
|
465
|
-
};
|
|
466
|
-
};
|
|
467
|
-
const de_NetworkInterface = (output, context) => {
|
|
468
|
-
return {
|
|
469
|
-
NetworkInterfaceId: __expectString(output.NetworkInterfaceId),
|
|
470
|
-
};
|
|
471
|
-
};
|
|
472
|
-
const de_NetworkInterfaces = (output, context) => {
|
|
473
|
-
const retVal = (output || [])
|
|
474
|
-
.filter((e) => e != null)
|
|
475
|
-
.map((entry) => {
|
|
476
|
-
if (entry === null) {
|
|
477
|
-
return null;
|
|
478
|
-
}
|
|
479
|
-
return de_NetworkInterface(entry, context);
|
|
480
|
-
});
|
|
481
|
-
return retVal;
|
|
482
|
-
};
|
|
483
|
-
const de_Outpost = (output, context) => {
|
|
484
|
-
return {
|
|
485
|
-
CapacityInBytes: __expectLong(output.CapacityInBytes),
|
|
486
|
-
OutpostArn: __expectString(output.OutpostArn),
|
|
487
|
-
OutpostId: __expectString(output.OutpostId),
|
|
488
|
-
OwnerId: __expectString(output.OwnerId),
|
|
489
|
-
};
|
|
490
|
-
};
|
|
491
|
-
const de_Outposts = (output, context) => {
|
|
492
|
-
const retVal = (output || [])
|
|
493
|
-
.filter((e) => e != null)
|
|
494
|
-
.map((entry) => {
|
|
495
|
-
if (entry === null) {
|
|
496
|
-
return null;
|
|
497
|
-
}
|
|
498
|
-
return de_Outpost(entry, context);
|
|
499
|
-
});
|
|
500
|
-
return retVal;
|
|
501
|
-
};
|
|
502
456
|
const deserializeMetadata = (output) => ({
|
|
503
457
|
httpStatusCode: output.statusCode,
|
|
504
458
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -5,106 +5,41 @@ import { ListEndpointsCommandInput, ListEndpointsCommandOutput } from "./command
|
|
|
5
5
|
import { ListOutpostsWithS3CommandInput, ListOutpostsWithS3CommandOutput } from "./commands/ListOutpostsWithS3Command";
|
|
6
6
|
import { ListSharedEndpointsCommandInput, ListSharedEndpointsCommandOutput } from "./commands/ListSharedEndpointsCommand";
|
|
7
7
|
import { S3OutpostsClient } from "./S3OutpostsClient";
|
|
8
|
-
|
|
9
|
-
* @public
|
|
10
|
-
* <p>Amazon S3 on Outposts provides access to S3 on Outposts operations.</p>
|
|
11
|
-
*/
|
|
12
|
-
export declare class S3Outposts extends S3OutpostsClient {
|
|
8
|
+
export interface S3Outposts {
|
|
13
9
|
/**
|
|
14
|
-
* @
|
|
15
|
-
* <p>Creates an endpoint and associates it with the specified Outpost.</p>
|
|
16
|
-
* <note>
|
|
17
|
-
* <p>It can take up to 5 minutes for this action to finish.</p>
|
|
18
|
-
* </note>
|
|
19
|
-
* <p></p>
|
|
20
|
-
* <p>Related actions include:</p>
|
|
21
|
-
* <ul>
|
|
22
|
-
* <li>
|
|
23
|
-
* <p>
|
|
24
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html">DeleteEndpoint</a>
|
|
25
|
-
* </p>
|
|
26
|
-
* </li>
|
|
27
|
-
* <li>
|
|
28
|
-
* <p>
|
|
29
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html">ListEndpoints</a>
|
|
30
|
-
* </p>
|
|
31
|
-
* </li>
|
|
32
|
-
* </ul>
|
|
10
|
+
* @see {@link CreateEndpointCommand}
|
|
33
11
|
*/
|
|
34
12
|
createEndpoint(args: CreateEndpointCommandInput, options?: __HttpHandlerOptions): Promise<CreateEndpointCommandOutput>;
|
|
35
13
|
createEndpoint(args: CreateEndpointCommandInput, cb: (err: any, data?: CreateEndpointCommandOutput) => void): void;
|
|
36
14
|
createEndpoint(args: CreateEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateEndpointCommandOutput) => void): void;
|
|
37
15
|
/**
|
|
38
|
-
* @
|
|
39
|
-
* <p>Deletes an endpoint.</p>
|
|
40
|
-
* <note>
|
|
41
|
-
* <p>It can take up to 5 minutes for this action to finish.</p>
|
|
42
|
-
* </note>
|
|
43
|
-
* <p></p>
|
|
44
|
-
* <p>Related actions include:</p>
|
|
45
|
-
* <ul>
|
|
46
|
-
* <li>
|
|
47
|
-
* <p>
|
|
48
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html">CreateEndpoint</a>
|
|
49
|
-
* </p>
|
|
50
|
-
* </li>
|
|
51
|
-
* <li>
|
|
52
|
-
* <p>
|
|
53
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html">ListEndpoints</a>
|
|
54
|
-
* </p>
|
|
55
|
-
* </li>
|
|
56
|
-
* </ul>
|
|
16
|
+
* @see {@link DeleteEndpointCommand}
|
|
57
17
|
*/
|
|
58
18
|
deleteEndpoint(args: DeleteEndpointCommandInput, options?: __HttpHandlerOptions): Promise<DeleteEndpointCommandOutput>;
|
|
59
19
|
deleteEndpoint(args: DeleteEndpointCommandInput, cb: (err: any, data?: DeleteEndpointCommandOutput) => void): void;
|
|
60
20
|
deleteEndpoint(args: DeleteEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteEndpointCommandOutput) => void): void;
|
|
61
21
|
/**
|
|
62
|
-
* @
|
|
63
|
-
* <p>Lists endpoints associated with the specified Outpost. </p>
|
|
64
|
-
* <p>Related actions include:</p>
|
|
65
|
-
* <ul>
|
|
66
|
-
* <li>
|
|
67
|
-
* <p>
|
|
68
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html">CreateEndpoint</a>
|
|
69
|
-
* </p>
|
|
70
|
-
* </li>
|
|
71
|
-
* <li>
|
|
72
|
-
* <p>
|
|
73
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html">DeleteEndpoint</a>
|
|
74
|
-
* </p>
|
|
75
|
-
* </li>
|
|
76
|
-
* </ul>
|
|
22
|
+
* @see {@link ListEndpointsCommand}
|
|
77
23
|
*/
|
|
78
24
|
listEndpoints(args: ListEndpointsCommandInput, options?: __HttpHandlerOptions): Promise<ListEndpointsCommandOutput>;
|
|
79
25
|
listEndpoints(args: ListEndpointsCommandInput, cb: (err: any, data?: ListEndpointsCommandOutput) => void): void;
|
|
80
26
|
listEndpoints(args: ListEndpointsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListEndpointsCommandOutput) => void): void;
|
|
81
27
|
/**
|
|
82
|
-
* @
|
|
83
|
-
* <p>Lists the Outposts with S3 on Outposts capacity for your Amazon Web Services account.
|
|
84
|
-
* Includes S3 on Outposts that you have access to as the Outposts owner, or as a shared user
|
|
85
|
-
* from Resource Access Manager (RAM). </p>
|
|
28
|
+
* @see {@link ListOutpostsWithS3Command}
|
|
86
29
|
*/
|
|
87
30
|
listOutpostsWithS3(args: ListOutpostsWithS3CommandInput, options?: __HttpHandlerOptions): Promise<ListOutpostsWithS3CommandOutput>;
|
|
88
31
|
listOutpostsWithS3(args: ListOutpostsWithS3CommandInput, cb: (err: any, data?: ListOutpostsWithS3CommandOutput) => void): void;
|
|
89
32
|
listOutpostsWithS3(args: ListOutpostsWithS3CommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListOutpostsWithS3CommandOutput) => void): void;
|
|
90
33
|
/**
|
|
91
|
-
* @
|
|
92
|
-
* <p>Lists all endpoints associated with an Outpost that has been shared by Amazon Web Services Resource Access Manager (RAM).</p>
|
|
93
|
-
* <p>Related actions include:</p>
|
|
94
|
-
* <ul>
|
|
95
|
-
* <li>
|
|
96
|
-
* <p>
|
|
97
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html">CreateEndpoint</a>
|
|
98
|
-
* </p>
|
|
99
|
-
* </li>
|
|
100
|
-
* <li>
|
|
101
|
-
* <p>
|
|
102
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html">DeleteEndpoint</a>
|
|
103
|
-
* </p>
|
|
104
|
-
* </li>
|
|
105
|
-
* </ul>
|
|
34
|
+
* @see {@link ListSharedEndpointsCommand}
|
|
106
35
|
*/
|
|
107
36
|
listSharedEndpoints(args: ListSharedEndpointsCommandInput, options?: __HttpHandlerOptions): Promise<ListSharedEndpointsCommandOutput>;
|
|
108
37
|
listSharedEndpoints(args: ListSharedEndpointsCommandInput, cb: (err: any, data?: ListSharedEndpointsCommandOutput) => void): void;
|
|
109
38
|
listSharedEndpoints(args: ListSharedEndpointsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSharedEndpointsCommandOutput) => void): void;
|
|
110
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* @public
|
|
42
|
+
* <p>Amazon S3 on Outposts provides access to S3 on Outposts operations.</p>
|
|
43
|
+
*/
|
|
44
|
+
export declare class S3Outposts extends S3OutpostsClient implements S3Outposts {
|
|
45
|
+
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
ListSharedEndpointsCommandOutput,
|
|
21
21
|
} from "./commands/ListSharedEndpointsCommand";
|
|
22
22
|
import { S3OutpostsClient } from "./S3OutpostsClient";
|
|
23
|
-
export
|
|
23
|
+
export interface S3Outposts {
|
|
24
24
|
createEndpoint(
|
|
25
25
|
args: CreateEndpointCommandInput,
|
|
26
26
|
options?: __HttpHandlerOptions
|
|
@@ -87,3 +87,6 @@ export declare class S3Outposts extends S3OutpostsClient {
|
|
|
87
87
|
cb: (err: any, data?: ListSharedEndpointsCommandOutput) => void
|
|
88
88
|
): void;
|
|
89
89
|
}
|
|
90
|
+
export declare class S3Outposts
|
|
91
|
+
extends S3OutpostsClient
|
|
92
|
+
implements S3Outposts {}
|
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.316.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",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.316.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.316.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.316.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.316.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.316.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|