@aws-sdk/client-s3outposts 3.281.0 → 3.282.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.
Files changed (38) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/S3Outposts.js +15 -0
  3. package/dist-cjs/commands/ListOutpostsWithS3Command.js +46 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/endpoint/ruleset.js +3 -3
  6. package/dist-cjs/models/models_0.js +27 -1
  7. package/dist-cjs/pagination/ListOutpostsWithS3Paginator.js +36 -0
  8. package/dist-cjs/pagination/index.js +1 -0
  9. package/dist-cjs/protocols/Aws_restJson1.js +111 -1
  10. package/dist-es/S3Outposts.js +15 -0
  11. package/dist-es/commands/ListOutpostsWithS3Command.js +42 -0
  12. package/dist-es/commands/index.js +1 -0
  13. package/dist-es/endpoint/ruleset.js +3 -3
  14. package/dist-es/models/models_0.js +22 -0
  15. package/dist-es/pagination/ListOutpostsWithS3Paginator.js +32 -0
  16. package/dist-es/pagination/index.js +1 -0
  17. package/dist-es/protocols/Aws_restJson1.js +110 -2
  18. package/dist-types/S3Outposts.d.ts +25 -16
  19. package/dist-types/S3OutpostsClient.d.ts +3 -2
  20. package/dist-types/commands/CreateEndpointCommand.d.ts +4 -4
  21. package/dist-types/commands/DeleteEndpointCommand.d.ts +4 -4
  22. package/dist-types/commands/ListEndpointsCommand.d.ts +4 -4
  23. package/dist-types/commands/ListOutpostsWithS3Command.d.ts +45 -0
  24. package/dist-types/commands/ListSharedEndpointsCommand.d.ts +4 -4
  25. package/dist-types/commands/index.d.ts +1 -0
  26. package/dist-types/models/models_0.d.ts +80 -1
  27. package/dist-types/pagination/ListOutpostsWithS3Paginator.d.ts +4 -0
  28. package/dist-types/pagination/index.d.ts +1 -0
  29. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  30. package/dist-types/ts3.4/S3Outposts.d.ts +17 -0
  31. package/dist-types/ts3.4/S3OutpostsClient.d.ts +6 -0
  32. package/dist-types/ts3.4/commands/ListOutpostsWithS3Command.d.ts +38 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +29 -0
  35. package/dist-types/ts3.4/pagination/ListOutpostsWithS3Paginator.d.ts +11 -0
  36. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  37. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  38. package/package.json +17 -17
package/README.md CHANGED
@@ -229,6 +229,14 @@ ListEndpoints
229
229
 
230
230
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3outposts/classes/listendpointscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3outposts/interfaces/listendpointscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3outposts/interfaces/listendpointscommandoutput.html)
231
231
 
232
+ </details>
233
+ <details>
234
+ <summary>
235
+ ListOutpostsWithS3
236
+ </summary>
237
+
238
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3outposts/classes/listoutpostswiths3command.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3outposts/interfaces/listoutpostswiths3commandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3outposts/interfaces/listoutpostswiths3commandoutput.html)
239
+
232
240
  </details>
233
241
  <details>
234
242
  <summary>
@@ -4,6 +4,7 @@ exports.S3Outposts = void 0;
4
4
  const CreateEndpointCommand_1 = require("./commands/CreateEndpointCommand");
5
5
  const DeleteEndpointCommand_1 = require("./commands/DeleteEndpointCommand");
6
6
  const ListEndpointsCommand_1 = require("./commands/ListEndpointsCommand");
7
+ const ListOutpostsWithS3Command_1 = require("./commands/ListOutpostsWithS3Command");
7
8
  const ListSharedEndpointsCommand_1 = require("./commands/ListSharedEndpointsCommand");
8
9
  const S3OutpostsClient_1 = require("./S3OutpostsClient");
9
10
  class S3Outposts extends S3OutpostsClient_1.S3OutpostsClient {
@@ -49,6 +50,20 @@ class S3Outposts extends S3OutpostsClient_1.S3OutpostsClient {
49
50
  return this.send(command, optionsOrCb);
50
51
  }
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
+ }
52
67
  listSharedEndpoints(args, optionsOrCb, cb) {
53
68
  const command = new ListSharedEndpointsCommand_1.ListSharedEndpointsCommand(args);
54
69
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListOutpostsWithS3Command = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class ListOutpostsWithS3Command extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListOutpostsWithS3Command.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "S3OutpostsClient";
28
+ const commandName = "ListOutpostsWithS3Command";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.ListOutpostsWithS3RequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.ListOutpostsWithS3ResultFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.serializeAws_restJson1ListOutpostsWithS3Command)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.deserializeAws_restJson1ListOutpostsWithS3Command)(output, context);
44
+ }
45
+ }
46
+ exports.ListOutpostsWithS3Command = ListOutpostsWithS3Command;
@@ -4,4 +4,5 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./CreateEndpointCommand"), exports);
5
5
  tslib_1.__exportStar(require("./DeleteEndpointCommand"), exports);
6
6
  tslib_1.__exportStar(require("./ListEndpointsCommand"), exports);
7
+ tslib_1.__exportStar(require("./ListOutpostsWithS3Command"), exports);
7
8
  tslib_1.__exportStar(require("./ListSharedEndpointsCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const p = "required", q = "fn", r = "argv", s = "ref";
5
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
6
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
4
+ const q = "required", r = "fn", s = "argv", t = "ref";
5
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
7
7
  exports.ruleSet = _data;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListSharedEndpointsResultFilterSensitiveLog = exports.ListSharedEndpointsRequestFilterSensitiveLog = exports.ListEndpointsResultFilterSensitiveLog = exports.ListEndpointsRequestFilterSensitiveLog = exports.EndpointFilterSensitiveLog = exports.NetworkInterfaceFilterSensitiveLog = exports.DeleteEndpointRequestFilterSensitiveLog = exports.CreateEndpointResultFilterSensitiveLog = exports.CreateEndpointRequestFilterSensitiveLog = exports.EndpointStatus = exports.ValidationException = exports.ResourceNotFoundException = exports.InternalServerException = exports.EndpointAccessType = exports.ConflictException = exports.AccessDeniedException = void 0;
3
+ exports.ListSharedEndpointsResultFilterSensitiveLog = exports.ListSharedEndpointsRequestFilterSensitiveLog = exports.ListOutpostsWithS3ResultFilterSensitiveLog = exports.OutpostFilterSensitiveLog = exports.ListOutpostsWithS3RequestFilterSensitiveLog = exports.ListEndpointsResultFilterSensitiveLog = exports.ListEndpointsRequestFilterSensitiveLog = exports.EndpointFilterSensitiveLog = exports.NetworkInterfaceFilterSensitiveLog = exports.DeleteEndpointRequestFilterSensitiveLog = exports.CreateEndpointResultFilterSensitiveLog = exports.CreateEndpointRequestFilterSensitiveLog = exports.EndpointStatus = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.EndpointAccessType = exports.ConflictException = exports.AccessDeniedException = void 0;
4
4
  const S3OutpostsServiceException_1 = require("./S3OutpostsServiceException");
5
5
  class AccessDeniedException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
6
6
  constructor(opts) {
@@ -63,6 +63,20 @@ class ResourceNotFoundException extends S3OutpostsServiceException_1.S3OutpostsS
63
63
  }
64
64
  }
65
65
  exports.ResourceNotFoundException = ResourceNotFoundException;
66
+ class ThrottlingException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
67
+ constructor(opts) {
68
+ super({
69
+ name: "ThrottlingException",
70
+ $fault: "client",
71
+ ...opts,
72
+ });
73
+ this.name = "ThrottlingException";
74
+ this.$fault = "client";
75
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
76
+ this.Message = opts.Message;
77
+ }
78
+ }
79
+ exports.ThrottlingException = ThrottlingException;
66
80
  class ValidationException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
67
81
  constructor(opts) {
68
82
  super({
@@ -111,6 +125,18 @@ const ListEndpointsResultFilterSensitiveLog = (obj) => ({
111
125
  ...obj,
112
126
  });
113
127
  exports.ListEndpointsResultFilterSensitiveLog = ListEndpointsResultFilterSensitiveLog;
128
+ const ListOutpostsWithS3RequestFilterSensitiveLog = (obj) => ({
129
+ ...obj,
130
+ });
131
+ exports.ListOutpostsWithS3RequestFilterSensitiveLog = ListOutpostsWithS3RequestFilterSensitiveLog;
132
+ const OutpostFilterSensitiveLog = (obj) => ({
133
+ ...obj,
134
+ });
135
+ exports.OutpostFilterSensitiveLog = OutpostFilterSensitiveLog;
136
+ const ListOutpostsWithS3ResultFilterSensitiveLog = (obj) => ({
137
+ ...obj,
138
+ });
139
+ exports.ListOutpostsWithS3ResultFilterSensitiveLog = ListOutpostsWithS3ResultFilterSensitiveLog;
114
140
  const ListSharedEndpointsRequestFilterSensitiveLog = (obj) => ({
115
141
  ...obj,
116
142
  });
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListOutpostsWithS3 = void 0;
4
+ const ListOutpostsWithS3Command_1 = require("../commands/ListOutpostsWithS3Command");
5
+ const S3Outposts_1 = require("../S3Outposts");
6
+ const S3OutpostsClient_1 = require("../S3OutpostsClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new ListOutpostsWithS3Command_1.ListOutpostsWithS3Command(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.listOutpostsWithS3(input, ...args);
12
+ };
13
+ async function* paginateListOutpostsWithS3(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.NextToken = token;
19
+ input["MaxResults"] = config.pageSize;
20
+ if (config.client instanceof S3Outposts_1.S3Outposts) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof S3OutpostsClient_1.S3OutpostsClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected S3Outposts | S3OutpostsClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextToken;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateListOutpostsWithS3 = paginateListOutpostsWithS3;
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./Interfaces"), exports);
5
5
  tslib_1.__exportStar(require("./ListEndpointsPaginator"), exports);
6
+ tslib_1.__exportStar(require("./ListOutpostsWithS3Paginator"), exports);
6
7
  tslib_1.__exportStar(require("./ListSharedEndpointsPaginator"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1ListSharedEndpointsCommand = exports.deserializeAws_restJson1ListEndpointsCommand = exports.deserializeAws_restJson1DeleteEndpointCommand = exports.deserializeAws_restJson1CreateEndpointCommand = exports.serializeAws_restJson1ListSharedEndpointsCommand = exports.serializeAws_restJson1ListEndpointsCommand = exports.serializeAws_restJson1DeleteEndpointCommand = exports.serializeAws_restJson1CreateEndpointCommand = void 0;
3
+ exports.deserializeAws_restJson1ListSharedEndpointsCommand = exports.deserializeAws_restJson1ListOutpostsWithS3Command = exports.deserializeAws_restJson1ListEndpointsCommand = exports.deserializeAws_restJson1DeleteEndpointCommand = exports.deserializeAws_restJson1CreateEndpointCommand = exports.serializeAws_restJson1ListSharedEndpointsCommand = exports.serializeAws_restJson1ListOutpostsWithS3Command = 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
6
  const models_0_1 = require("../models/models_0");
@@ -72,6 +72,27 @@ const serializeAws_restJson1ListEndpointsCommand = async (input, context) => {
72
72
  });
73
73
  };
74
74
  exports.serializeAws_restJson1ListEndpointsCommand = serializeAws_restJson1ListEndpointsCommand;
75
+ const serializeAws_restJson1ListOutpostsWithS3Command = async (input, context) => {
76
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const headers = {};
78
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/ListOutpostsWithS3";
79
+ const query = map({
80
+ nextToken: [, input.NextToken],
81
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
82
+ });
83
+ let body;
84
+ return new protocol_http_1.HttpRequest({
85
+ protocol,
86
+ hostname,
87
+ port,
88
+ method: "GET",
89
+ headers,
90
+ path: resolvedPath,
91
+ query,
92
+ body,
93
+ });
94
+ };
95
+ exports.serializeAws_restJson1ListOutpostsWithS3Command = serializeAws_restJson1ListOutpostsWithS3Command;
75
96
  const serializeAws_restJson1ListSharedEndpointsCommand = async (input, context) => {
76
97
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
98
  const headers = {};
@@ -127,6 +148,9 @@ const deserializeAws_restJson1CreateEndpointCommandError = async (output, contex
127
148
  case "ResourceNotFoundException":
128
149
  case "com.amazonaws.s3outposts#ResourceNotFoundException":
129
150
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
151
+ case "ThrottlingException":
152
+ case "com.amazonaws.s3outposts#ThrottlingException":
153
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
130
154
  case "ValidationException":
131
155
  case "com.amazonaws.s3outposts#ValidationException":
132
156
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
@@ -167,6 +191,9 @@ const deserializeAws_restJson1DeleteEndpointCommandError = async (output, contex
167
191
  case "ResourceNotFoundException":
168
192
  case "com.amazonaws.s3outposts#ResourceNotFoundException":
169
193
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
194
+ case "ThrottlingException":
195
+ case "com.amazonaws.s3outposts#ThrottlingException":
196
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
170
197
  case "ValidationException":
171
198
  case "com.amazonaws.s3outposts#ValidationException":
172
199
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
@@ -213,6 +240,55 @@ const deserializeAws_restJson1ListEndpointsCommandError = async (output, context
213
240
  case "ResourceNotFoundException":
214
241
  case "com.amazonaws.s3outposts#ResourceNotFoundException":
215
242
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
243
+ case "ThrottlingException":
244
+ case "com.amazonaws.s3outposts#ThrottlingException":
245
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
246
+ case "ValidationException":
247
+ case "com.amazonaws.s3outposts#ValidationException":
248
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
249
+ default:
250
+ const parsedBody = parsedOutput.body;
251
+ (0, smithy_client_1.throwDefaultError)({
252
+ output,
253
+ parsedBody,
254
+ exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
255
+ errorCode,
256
+ });
257
+ }
258
+ };
259
+ const deserializeAws_restJson1ListOutpostsWithS3Command = async (output, context) => {
260
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
261
+ return deserializeAws_restJson1ListOutpostsWithS3CommandError(output, context);
262
+ }
263
+ const contents = map({
264
+ $metadata: deserializeMetadata(output),
265
+ });
266
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
267
+ if (data.NextToken != null) {
268
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
269
+ }
270
+ if (data.Outposts != null) {
271
+ contents.Outposts = deserializeAws_restJson1Outposts(data.Outposts, context);
272
+ }
273
+ return contents;
274
+ };
275
+ exports.deserializeAws_restJson1ListOutpostsWithS3Command = deserializeAws_restJson1ListOutpostsWithS3Command;
276
+ const deserializeAws_restJson1ListOutpostsWithS3CommandError = async (output, context) => {
277
+ const parsedOutput = {
278
+ ...output,
279
+ body: await parseErrorBody(output.body, context),
280
+ };
281
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
282
+ switch (errorCode) {
283
+ case "AccessDeniedException":
284
+ case "com.amazonaws.s3outposts#AccessDeniedException":
285
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
286
+ case "InternalServerException":
287
+ case "com.amazonaws.s3outposts#InternalServerException":
288
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
289
+ case "ThrottlingException":
290
+ case "com.amazonaws.s3outposts#ThrottlingException":
291
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
216
292
  case "ValidationException":
217
293
  case "com.amazonaws.s3outposts#ValidationException":
218
294
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
@@ -259,6 +335,9 @@ const deserializeAws_restJson1ListSharedEndpointsCommandError = async (output, c
259
335
  case "ResourceNotFoundException":
260
336
  case "com.amazonaws.s3outposts#ResourceNotFoundException":
261
337
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
338
+ case "ThrottlingException":
339
+ case "com.amazonaws.s3outposts#ThrottlingException":
340
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
262
341
  case "ValidationException":
263
342
  case "com.amazonaws.s3outposts#ValidationException":
264
343
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
@@ -321,6 +400,18 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
321
400
  });
322
401
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
323
402
  };
403
+ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
404
+ const contents = map({});
405
+ const data = parsedOutput.body;
406
+ if (data.Message != null) {
407
+ contents.Message = (0, smithy_client_1.expectString)(data.Message);
408
+ }
409
+ const exception = new models_0_1.ThrottlingException({
410
+ $metadata: deserializeMetadata(parsedOutput),
411
+ ...contents,
412
+ });
413
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
414
+ };
324
415
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
325
416
  const contents = map({});
326
417
  const data = parsedOutput.body;
@@ -379,6 +470,25 @@ const deserializeAws_restJson1NetworkInterfaces = (output, context) => {
379
470
  });
380
471
  return retVal;
381
472
  };
473
+ const deserializeAws_restJson1Outpost = (output, context) => {
474
+ return {
475
+ CapacityInBytes: (0, smithy_client_1.expectLong)(output.CapacityInBytes),
476
+ OutpostArn: (0, smithy_client_1.expectString)(output.OutpostArn),
477
+ OutpostId: (0, smithy_client_1.expectString)(output.OutpostId),
478
+ OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
479
+ };
480
+ };
481
+ const deserializeAws_restJson1Outposts = (output, context) => {
482
+ const retVal = (output || [])
483
+ .filter((e) => e != null)
484
+ .map((entry) => {
485
+ if (entry === null) {
486
+ return null;
487
+ }
488
+ return deserializeAws_restJson1Outpost(entry, context);
489
+ });
490
+ return retVal;
491
+ };
382
492
  const deserializeMetadata = (output) => ({
383
493
  httpStatusCode: output.statusCode,
384
494
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,6 +1,7 @@
1
1
  import { CreateEndpointCommand, } from "./commands/CreateEndpointCommand";
2
2
  import { DeleteEndpointCommand, } from "./commands/DeleteEndpointCommand";
3
3
  import { ListEndpointsCommand, } from "./commands/ListEndpointsCommand";
4
+ import { ListOutpostsWithS3Command, } from "./commands/ListOutpostsWithS3Command";
4
5
  import { ListSharedEndpointsCommand, } from "./commands/ListSharedEndpointsCommand";
5
6
  import { S3OutpostsClient } from "./S3OutpostsClient";
6
7
  export class S3Outposts extends S3OutpostsClient {
@@ -46,6 +47,20 @@ export class S3Outposts extends S3OutpostsClient {
46
47
  return this.send(command, optionsOrCb);
47
48
  }
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
+ }
49
64
  listSharedEndpoints(args, optionsOrCb, cb) {
50
65
  const command = new ListSharedEndpointsCommand(args);
51
66
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListOutpostsWithS3RequestFilterSensitiveLog, ListOutpostsWithS3ResultFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1ListOutpostsWithS3Command, serializeAws_restJson1ListOutpostsWithS3Command, } from "../protocols/Aws_restJson1";
6
+ export class ListOutpostsWithS3Command extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListOutpostsWithS3Command.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "S3OutpostsClient";
25
+ const commandName = "ListOutpostsWithS3Command";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: ListOutpostsWithS3RequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: ListOutpostsWithS3ResultFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1ListOutpostsWithS3Command(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1ListOutpostsWithS3Command(output, context);
41
+ }
42
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./CreateEndpointCommand";
2
2
  export * from "./DeleteEndpointCommand";
3
3
  export * from "./ListEndpointsCommand";
4
+ export * from "./ListOutpostsWithS3Command";
4
5
  export * from "./ListSharedEndpointsCommand";
@@ -1,4 +1,4 @@
1
- const p = "required", q = "fn", r = "argv", s = "ref";
2
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
3
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
1
+ const q = "required", r = "fn", s = "argv", t = "ref";
2
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://s3-outposts.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
4
4
  export const ruleSet = _data;
@@ -56,6 +56,19 @@ export class ResourceNotFoundException extends __BaseException {
56
56
  this.Message = opts.Message;
57
57
  }
58
58
  }
59
+ export class ThrottlingException extends __BaseException {
60
+ constructor(opts) {
61
+ super({
62
+ name: "ThrottlingException",
63
+ $fault: "client",
64
+ ...opts,
65
+ });
66
+ this.name = "ThrottlingException";
67
+ this.$fault = "client";
68
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
69
+ this.Message = opts.Message;
70
+ }
71
+ }
59
72
  export class ValidationException extends __BaseException {
60
73
  constructor(opts) {
61
74
  super({
@@ -96,6 +109,15 @@ export const ListEndpointsRequestFilterSensitiveLog = (obj) => ({
96
109
  export const ListEndpointsResultFilterSensitiveLog = (obj) => ({
97
110
  ...obj,
98
111
  });
112
+ export const ListOutpostsWithS3RequestFilterSensitiveLog = (obj) => ({
113
+ ...obj,
114
+ });
115
+ export const OutpostFilterSensitiveLog = (obj) => ({
116
+ ...obj,
117
+ });
118
+ export const ListOutpostsWithS3ResultFilterSensitiveLog = (obj) => ({
119
+ ...obj,
120
+ });
99
121
  export const ListSharedEndpointsRequestFilterSensitiveLog = (obj) => ({
100
122
  ...obj,
101
123
  });
@@ -0,0 +1,32 @@
1
+ import { ListOutpostsWithS3Command, } from "../commands/ListOutpostsWithS3Command";
2
+ import { S3Outposts } from "../S3Outposts";
3
+ import { S3OutpostsClient } from "../S3OutpostsClient";
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListOutpostsWithS3Command(input), ...args);
6
+ };
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listOutpostsWithS3(input, ...args);
9
+ };
10
+ export async function* paginateListOutpostsWithS3(config, input, ...additionalArguments) {
11
+ let token = config.startingToken || undefined;
12
+ let hasNext = true;
13
+ let page;
14
+ while (hasNext) {
15
+ input.NextToken = token;
16
+ input["MaxResults"] = config.pageSize;
17
+ if (config.client instanceof S3Outposts) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof S3OutpostsClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected S3Outposts | S3OutpostsClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
30
+ }
31
+ return undefined;
32
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListEndpointsPaginator";
3
+ export * from "./ListOutpostsWithS3Paginator";
3
4
  export * from "./ListSharedEndpointsPaginator";