@aws-sdk/client-s3outposts 3.899.0 → 3.906.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 (2) hide show
  1. package/dist-cjs/index.js +623 -759
  2. package/package.json +37 -37
package/dist-cjs/index.js CHANGED
@@ -1,798 +1,662 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "s3-outposts",
25
+ });
10
26
  };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
32
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AccessDeniedException: () => AccessDeniedException,
25
- ConflictException: () => ConflictException,
26
- CreateEndpointCommand: () => CreateEndpointCommand,
27
- DeleteEndpointCommand: () => DeleteEndpointCommand,
28
- EndpointAccessType: () => EndpointAccessType,
29
- EndpointStatus: () => EndpointStatus,
30
- InternalServerException: () => InternalServerException,
31
- ListEndpointsCommand: () => ListEndpointsCommand,
32
- ListOutpostsWithS3Command: () => ListOutpostsWithS3Command,
33
- ListSharedEndpointsCommand: () => ListSharedEndpointsCommand,
34
- OutpostOfflineException: () => OutpostOfflineException,
35
- ResourceNotFoundException: () => ResourceNotFoundException,
36
- S3Outposts: () => S3Outposts,
37
- S3OutpostsClient: () => S3OutpostsClient,
38
- S3OutpostsServiceException: () => S3OutpostsServiceException,
39
- ThrottlingException: () => ThrottlingException,
40
- ValidationException: () => ValidationException,
41
- __Client: () => import_smithy_client.Client,
42
- paginateListEndpoints: () => paginateListEndpoints,
43
- paginateListOutpostsWithS3: () => paginateListOutpostsWithS3,
44
- paginateListSharedEndpoints: () => paginateListSharedEndpoints
45
- });
46
- module.exports = __toCommonJS(index_exports);
47
33
 
48
- // src/S3OutpostsClient.ts
49
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
50
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
51
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
52
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
53
- var import_config_resolver = require("@smithy/config-resolver");
54
- var import_core = require("@smithy/core");
55
- var import_middleware_content_length = require("@smithy/middleware-content-length");
56
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
57
- var import_middleware_retry = require("@smithy/middleware-retry");
58
-
59
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
60
-
61
- // src/endpoint/EndpointParameters.ts
62
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
63
- return Object.assign(options, {
64
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
65
- useFipsEndpoint: options.useFipsEndpoint ?? false,
66
- defaultSigningName: "s3-outposts"
67
- });
68
- }, "resolveClientEndpointParameters");
69
- var commonParams = {
70
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
71
- Endpoint: { type: "builtInParams", name: "endpoint" },
72
- Region: { type: "builtInParams", name: "region" },
73
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
74
71
  };
75
72
 
76
- // src/S3OutpostsClient.ts
77
- var import_runtimeConfig = require("././runtimeConfig");
78
-
79
- // src/runtimeExtensions.ts
80
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
81
- var import_protocol_http = require("@smithy/protocol-http");
82
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
83
78
 
84
- // src/auth/httpAuthExtensionConfiguration.ts
85
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
86
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
87
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
88
- let _credentials = runtimeConfig.credentials;
89
- return {
90
- setHttpAuthScheme(httpAuthScheme) {
91
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
92
- if (index === -1) {
93
- _httpAuthSchemes.push(httpAuthScheme);
94
- } else {
95
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
96
- }
97
- },
98
- httpAuthSchemes() {
99
- return _httpAuthSchemes;
100
- },
101
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
102
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
103
- },
104
- httpAuthSchemeProvider() {
105
- return _httpAuthSchemeProvider;
106
- },
107
- setCredentials(credentials) {
108
- _credentials = credentials;
109
- },
110
- credentials() {
111
- return _credentials;
79
+ class S3OutpostsClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultS3OutpostsHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
112
107
  }
113
- };
114
- }, "getHttpAuthExtensionConfiguration");
115
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
116
- return {
117
- httpAuthSchemes: config.httpAuthSchemes(),
118
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
119
- credentials: config.credentials()
120
- };
121
- }, "resolveHttpAuthRuntimeConfig");
122
-
123
- // src/runtimeExtensions.ts
124
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
125
- const extensionConfiguration = Object.assign(
126
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
127
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
128
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
129
- getHttpAuthExtensionConfiguration(runtimeConfig)
130
- );
131
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
132
- return Object.assign(
133
- runtimeConfig,
134
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
135
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
136
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
137
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
138
- );
139
- }, "resolveRuntimeExtensions");
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
140
112
 
141
- // src/S3OutpostsClient.ts
142
- var S3OutpostsClient = class extends import_smithy_client.Client {
143
- static {
144
- __name(this, "S3OutpostsClient");
145
- }
146
- /**
147
- * The resolved configuration of S3OutpostsClient class. This is resolved and normalized from the {@link S3OutpostsClientConfig | constructor configuration interface}.
148
- */
149
- config;
150
- constructor(...[configuration]) {
151
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
152
- super(_config_0);
153
- this.initConfig = _config_0;
154
- const _config_1 = resolveClientEndpointParameters(_config_0);
155
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
156
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
157
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
158
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
159
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
160
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
161
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
162
- this.config = _config_8;
163
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
164
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
165
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
166
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
167
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
168
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
169
- this.middlewareStack.use(
170
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
171
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultS3OutpostsHttpAuthSchemeParametersProvider,
172
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
173
- "aws.auth#sigv4": config.credentials
174
- }), "identityProviderConfigProvider")
175
- })
176
- );
177
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
178
- }
179
- /**
180
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
181
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
182
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
183
- */
184
- destroy() {
185
- super.destroy();
186
- }
113
+ class S3OutpostsServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, S3OutpostsServiceException.prototype);
117
+ }
118
+ }
119
+
120
+ class AccessDeniedException extends S3OutpostsServiceException {
121
+ name = "AccessDeniedException";
122
+ $fault = "client";
123
+ Message;
124
+ constructor(opts) {
125
+ super({
126
+ name: "AccessDeniedException",
127
+ $fault: "client",
128
+ ...opts,
129
+ });
130
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
131
+ this.Message = opts.Message;
132
+ }
133
+ }
134
+ class ConflictException extends S3OutpostsServiceException {
135
+ name = "ConflictException";
136
+ $fault = "client";
137
+ Message;
138
+ constructor(opts) {
139
+ super({
140
+ name: "ConflictException",
141
+ $fault: "client",
142
+ ...opts,
143
+ });
144
+ Object.setPrototypeOf(this, ConflictException.prototype);
145
+ this.Message = opts.Message;
146
+ }
147
+ }
148
+ const EndpointAccessType = {
149
+ CUSTOMER_OWNED_IP: "CustomerOwnedIp",
150
+ PRIVATE: "Private",
187
151
  };
188
-
189
- // src/S3Outposts.ts
190
-
191
-
192
- // src/commands/CreateEndpointCommand.ts
193
-
194
- var import_middleware_serde = require("@smithy/middleware-serde");
195
-
196
-
197
- // src/protocols/Aws_restJson1.ts
198
- var import_core2 = require("@aws-sdk/core");
199
-
200
-
201
-
202
- // src/models/S3OutpostsServiceException.ts
203
-
204
- var S3OutpostsServiceException = class _S3OutpostsServiceException extends import_smithy_client.ServiceException {
205
- static {
206
- __name(this, "S3OutpostsServiceException");
207
- }
208
- /**
209
- * @internal
210
- */
211
- constructor(options) {
212
- super(options);
213
- Object.setPrototypeOf(this, _S3OutpostsServiceException.prototype);
214
- }
152
+ class InternalServerException extends S3OutpostsServiceException {
153
+ name = "InternalServerException";
154
+ $fault = "server";
155
+ Message;
156
+ constructor(opts) {
157
+ super({
158
+ name: "InternalServerException",
159
+ $fault: "server",
160
+ ...opts,
161
+ });
162
+ Object.setPrototypeOf(this, InternalServerException.prototype);
163
+ this.Message = opts.Message;
164
+ }
165
+ }
166
+ class OutpostOfflineException extends S3OutpostsServiceException {
167
+ name = "OutpostOfflineException";
168
+ $fault = "client";
169
+ Message;
170
+ constructor(opts) {
171
+ super({
172
+ name: "OutpostOfflineException",
173
+ $fault: "client",
174
+ ...opts,
175
+ });
176
+ Object.setPrototypeOf(this, OutpostOfflineException.prototype);
177
+ this.Message = opts.Message;
178
+ }
179
+ }
180
+ class ResourceNotFoundException extends S3OutpostsServiceException {
181
+ name = "ResourceNotFoundException";
182
+ $fault = "client";
183
+ Message;
184
+ constructor(opts) {
185
+ super({
186
+ name: "ResourceNotFoundException",
187
+ $fault: "client",
188
+ ...opts,
189
+ });
190
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
191
+ this.Message = opts.Message;
192
+ }
193
+ }
194
+ class ThrottlingException extends S3OutpostsServiceException {
195
+ name = "ThrottlingException";
196
+ $fault = "client";
197
+ Message;
198
+ constructor(opts) {
199
+ super({
200
+ name: "ThrottlingException",
201
+ $fault: "client",
202
+ ...opts,
203
+ });
204
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
205
+ this.Message = opts.Message;
206
+ }
207
+ }
208
+ class ValidationException extends S3OutpostsServiceException {
209
+ name = "ValidationException";
210
+ $fault = "client";
211
+ Message;
212
+ constructor(opts) {
213
+ super({
214
+ name: "ValidationException",
215
+ $fault: "client",
216
+ ...opts,
217
+ });
218
+ Object.setPrototypeOf(this, ValidationException.prototype);
219
+ this.Message = opts.Message;
220
+ }
221
+ }
222
+ const EndpointStatus = {
223
+ AVAILABLE: "Available",
224
+ CREATE_FAILED: "Create_Failed",
225
+ DELETE_FAILED: "Delete_Failed",
226
+ DELETING: "Deleting",
227
+ PENDING: "Pending",
215
228
  };
216
229
 
217
- // src/models/models_0.ts
218
- var AccessDeniedException = class _AccessDeniedException extends S3OutpostsServiceException {
219
- static {
220
- __name(this, "AccessDeniedException");
221
- }
222
- name = "AccessDeniedException";
223
- $fault = "client";
224
- Message;
225
- /**
226
- * @internal
227
- */
228
- constructor(opts) {
229
- super({
230
- name: "AccessDeniedException",
231
- $fault: "client",
232
- ...opts
230
+ const se_CreateEndpointCommand = async (input, context) => {
231
+ const b = core.requestBuilder(input, context);
232
+ const headers = {
233
+ "content-type": "application/json",
234
+ };
235
+ b.bp("/S3Outposts/CreateEndpoint");
236
+ let body;
237
+ body = JSON.stringify(smithyClient.take(input, {
238
+ AccessType: [],
239
+ CustomerOwnedIpv4Pool: [],
240
+ OutpostId: [],
241
+ SecurityGroupId: [],
242
+ SubnetId: [],
243
+ }));
244
+ b.m("POST").h(headers).b(body);
245
+ return b.build();
246
+ };
247
+ const se_DeleteEndpointCommand = async (input, context) => {
248
+ const b = core.requestBuilder(input, context);
249
+ const headers = {};
250
+ b.bp("/S3Outposts/DeleteEndpoint");
251
+ const query = smithyClient.map({
252
+ [_eI]: [, smithyClient.expectNonNull(input[_EI], `EndpointId`)],
253
+ [_oI]: [, smithyClient.expectNonNull(input[_OI], `OutpostId`)],
233
254
  });
234
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
235
- this.Message = opts.Message;
236
- }
255
+ let body;
256
+ b.m("DELETE").h(headers).q(query).b(body);
257
+ return b.build();
237
258
  };
238
- var ConflictException = class _ConflictException extends S3OutpostsServiceException {
239
- static {
240
- __name(this, "ConflictException");
241
- }
242
- name = "ConflictException";
243
- $fault = "client";
244
- Message;
245
- /**
246
- * @internal
247
- */
248
- constructor(opts) {
249
- super({
250
- name: "ConflictException",
251
- $fault: "client",
252
- ...opts
259
+ const se_ListEndpointsCommand = async (input, context) => {
260
+ const b = core.requestBuilder(input, context);
261
+ const headers = {};
262
+ b.bp("/S3Outposts/ListEndpoints");
263
+ const query = smithyClient.map({
264
+ [_nT]: [, input[_NT]],
265
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
253
266
  });
254
- Object.setPrototypeOf(this, _ConflictException.prototype);
255
- this.Message = opts.Message;
256
- }
267
+ let body;
268
+ b.m("GET").h(headers).q(query).b(body);
269
+ return b.build();
257
270
  };
258
- var EndpointAccessType = {
259
- CUSTOMER_OWNED_IP: "CustomerOwnedIp",
260
- PRIVATE: "Private"
271
+ const se_ListOutpostsWithS3Command = async (input, context) => {
272
+ const b = core.requestBuilder(input, context);
273
+ const headers = {};
274
+ b.bp("/S3Outposts/ListOutpostsWithS3");
275
+ const query = smithyClient.map({
276
+ [_nT]: [, input[_NT]],
277
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
278
+ });
279
+ let body;
280
+ b.m("GET").h(headers).q(query).b(body);
281
+ return b.build();
261
282
  };
262
- var InternalServerException = class _InternalServerException extends S3OutpostsServiceException {
263
- static {
264
- __name(this, "InternalServerException");
265
- }
266
- name = "InternalServerException";
267
- $fault = "server";
268
- Message;
269
- /**
270
- * @internal
271
- */
272
- constructor(opts) {
273
- super({
274
- name: "InternalServerException",
275
- $fault: "server",
276
- ...opts
283
+ const se_ListSharedEndpointsCommand = async (input, context) => {
284
+ const b = core.requestBuilder(input, context);
285
+ const headers = {};
286
+ b.bp("/S3Outposts/ListSharedEndpoints");
287
+ const query = smithyClient.map({
288
+ [_nT]: [, input[_NT]],
289
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
290
+ [_oI]: [, smithyClient.expectNonNull(input[_OI], `OutpostId`)],
277
291
  });
278
- Object.setPrototypeOf(this, _InternalServerException.prototype);
279
- this.Message = opts.Message;
280
- }
292
+ let body;
293
+ b.m("GET").h(headers).q(query).b(body);
294
+ return b.build();
281
295
  };
282
- var OutpostOfflineException = class _OutpostOfflineException extends S3OutpostsServiceException {
283
- static {
284
- __name(this, "OutpostOfflineException");
285
- }
286
- name = "OutpostOfflineException";
287
- $fault = "client";
288
- Message;
289
- /**
290
- * @internal
291
- */
292
- constructor(opts) {
293
- super({
294
- name: "OutpostOfflineException",
295
- $fault: "client",
296
- ...opts
296
+ const de_CreateEndpointCommand = async (output, context) => {
297
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
298
+ return de_CommandError(output, context);
299
+ }
300
+ const contents = smithyClient.map({
301
+ $metadata: deserializeMetadata(output),
297
302
  });
298
- Object.setPrototypeOf(this, _OutpostOfflineException.prototype);
299
- this.Message = opts.Message;
300
- }
303
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
304
+ const doc = smithyClient.take(data, {
305
+ EndpointArn: smithyClient.expectString,
306
+ });
307
+ Object.assign(contents, doc);
308
+ return contents;
301
309
  };
302
- var ResourceNotFoundException = class _ResourceNotFoundException extends S3OutpostsServiceException {
303
- static {
304
- __name(this, "ResourceNotFoundException");
305
- }
306
- name = "ResourceNotFoundException";
307
- $fault = "client";
308
- Message;
309
- /**
310
- * @internal
311
- */
312
- constructor(opts) {
313
- super({
314
- name: "ResourceNotFoundException",
315
- $fault: "client",
316
- ...opts
310
+ const de_DeleteEndpointCommand = async (output, context) => {
311
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
312
+ return de_CommandError(output, context);
313
+ }
314
+ const contents = smithyClient.map({
315
+ $metadata: deserializeMetadata(output),
317
316
  });
318
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
319
- this.Message = opts.Message;
320
- }
317
+ await smithyClient.collectBody(output.body, context);
318
+ return contents;
321
319
  };
322
- var ThrottlingException = class _ThrottlingException extends S3OutpostsServiceException {
323
- static {
324
- __name(this, "ThrottlingException");
325
- }
326
- name = "ThrottlingException";
327
- $fault = "client";
328
- Message;
329
- /**
330
- * @internal
331
- */
332
- constructor(opts) {
333
- super({
334
- name: "ThrottlingException",
335
- $fault: "client",
336
- ...opts
320
+ const de_ListEndpointsCommand = async (output, context) => {
321
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
322
+ return de_CommandError(output, context);
323
+ }
324
+ const contents = smithyClient.map({
325
+ $metadata: deserializeMetadata(output),
326
+ });
327
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
328
+ const doc = smithyClient.take(data, {
329
+ Endpoints: (_) => de_Endpoints(_),
330
+ NextToken: smithyClient.expectString,
337
331
  });
338
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
339
- this.Message = opts.Message;
340
- }
332
+ Object.assign(contents, doc);
333
+ return contents;
341
334
  };
342
- var ValidationException = class _ValidationException extends S3OutpostsServiceException {
343
- static {
344
- __name(this, "ValidationException");
345
- }
346
- name = "ValidationException";
347
- $fault = "client";
348
- Message;
349
- /**
350
- * @internal
351
- */
352
- constructor(opts) {
353
- super({
354
- name: "ValidationException",
355
- $fault: "client",
356
- ...opts
335
+ const de_ListOutpostsWithS3Command = async (output, context) => {
336
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
337
+ return de_CommandError(output, context);
338
+ }
339
+ const contents = smithyClient.map({
340
+ $metadata: deserializeMetadata(output),
357
341
  });
358
- Object.setPrototypeOf(this, _ValidationException.prototype);
359
- this.Message = opts.Message;
360
- }
342
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
343
+ const doc = smithyClient.take(data, {
344
+ NextToken: smithyClient.expectString,
345
+ Outposts: smithyClient._json,
346
+ });
347
+ Object.assign(contents, doc);
348
+ return contents;
361
349
  };
362
- var EndpointStatus = {
363
- AVAILABLE: "Available",
364
- CREATE_FAILED: "Create_Failed",
365
- DELETE_FAILED: "Delete_Failed",
366
- DELETING: "Deleting",
367
- PENDING: "Pending"
350
+ const de_ListSharedEndpointsCommand = async (output, context) => {
351
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
352
+ return de_CommandError(output, context);
353
+ }
354
+ const contents = smithyClient.map({
355
+ $metadata: deserializeMetadata(output),
356
+ });
357
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
358
+ const doc = smithyClient.take(data, {
359
+ Endpoints: (_) => de_Endpoints(_),
360
+ NextToken: smithyClient.expectString,
361
+ });
362
+ Object.assign(contents, doc);
363
+ return contents;
368
364
  };
369
-
370
- // src/protocols/Aws_restJson1.ts
371
- var se_CreateEndpointCommand = /* @__PURE__ */ __name(async (input, context) => {
372
- const b = (0, import_core.requestBuilder)(input, context);
373
- const headers = {
374
- "content-type": "application/json"
375
- };
376
- b.bp("/S3Outposts/CreateEndpoint");
377
- let body;
378
- body = JSON.stringify(
379
- (0, import_smithy_client.take)(input, {
380
- AccessType: [],
381
- CustomerOwnedIpv4Pool: [],
382
- OutpostId: [],
383
- SecurityGroupId: [],
384
- SubnetId: []
385
- })
386
- );
387
- b.m("POST").h(headers).b(body);
388
- return b.build();
389
- }, "se_CreateEndpointCommand");
390
- var se_DeleteEndpointCommand = /* @__PURE__ */ __name(async (input, context) => {
391
- const b = (0, import_core.requestBuilder)(input, context);
392
- const headers = {};
393
- b.bp("/S3Outposts/DeleteEndpoint");
394
- const query = (0, import_smithy_client.map)({
395
- [_eI]: [, (0, import_smithy_client.expectNonNull)(input[_EI], `EndpointId`)],
396
- [_oI]: [, (0, import_smithy_client.expectNonNull)(input[_OI], `OutpostId`)]
397
- });
398
- let body;
399
- b.m("DELETE").h(headers).q(query).b(body);
400
- return b.build();
401
- }, "se_DeleteEndpointCommand");
402
- var se_ListEndpointsCommand = /* @__PURE__ */ __name(async (input, context) => {
403
- const b = (0, import_core.requestBuilder)(input, context);
404
- const headers = {};
405
- b.bp("/S3Outposts/ListEndpoints");
406
- const query = (0, import_smithy_client.map)({
407
- [_nT]: [, input[_NT]],
408
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()]
409
- });
410
- let body;
411
- b.m("GET").h(headers).q(query).b(body);
412
- return b.build();
413
- }, "se_ListEndpointsCommand");
414
- var se_ListOutpostsWithS3Command = /* @__PURE__ */ __name(async (input, context) => {
415
- const b = (0, import_core.requestBuilder)(input, context);
416
- const headers = {};
417
- b.bp("/S3Outposts/ListOutpostsWithS3");
418
- const query = (0, import_smithy_client.map)({
419
- [_nT]: [, input[_NT]],
420
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()]
421
- });
422
- let body;
423
- b.m("GET").h(headers).q(query).b(body);
424
- return b.build();
425
- }, "se_ListOutpostsWithS3Command");
426
- var se_ListSharedEndpointsCommand = /* @__PURE__ */ __name(async (input, context) => {
427
- const b = (0, import_core.requestBuilder)(input, context);
428
- const headers = {};
429
- b.bp("/S3Outposts/ListSharedEndpoints");
430
- const query = (0, import_smithy_client.map)({
431
- [_nT]: [, input[_NT]],
432
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
433
- [_oI]: [, (0, import_smithy_client.expectNonNull)(input[_OI], `OutpostId`)]
434
- });
435
- let body;
436
- b.m("GET").h(headers).q(query).b(body);
437
- return b.build();
438
- }, "se_ListSharedEndpointsCommand");
439
- var de_CreateEndpointCommand = /* @__PURE__ */ __name(async (output, context) => {
440
- if (output.statusCode !== 200 && output.statusCode >= 300) {
441
- return de_CommandError(output, context);
442
- }
443
- const contents = (0, import_smithy_client.map)({
444
- $metadata: deserializeMetadata(output)
445
- });
446
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
447
- const doc = (0, import_smithy_client.take)(data, {
448
- EndpointArn: import_smithy_client.expectString
449
- });
450
- Object.assign(contents, doc);
451
- return contents;
452
- }, "de_CreateEndpointCommand");
453
- var de_DeleteEndpointCommand = /* @__PURE__ */ __name(async (output, context) => {
454
- if (output.statusCode !== 200 && output.statusCode >= 300) {
455
- return de_CommandError(output, context);
456
- }
457
- const contents = (0, import_smithy_client.map)({
458
- $metadata: deserializeMetadata(output)
459
- });
460
- await (0, import_smithy_client.collectBody)(output.body, context);
461
- return contents;
462
- }, "de_DeleteEndpointCommand");
463
- var de_ListEndpointsCommand = /* @__PURE__ */ __name(async (output, context) => {
464
- if (output.statusCode !== 200 && output.statusCode >= 300) {
465
- return de_CommandError(output, context);
466
- }
467
- const contents = (0, import_smithy_client.map)({
468
- $metadata: deserializeMetadata(output)
469
- });
470
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
471
- const doc = (0, import_smithy_client.take)(data, {
472
- Endpoints: /* @__PURE__ */ __name((_) => de_Endpoints(_, context), "Endpoints"),
473
- NextToken: import_smithy_client.expectString
474
- });
475
- Object.assign(contents, doc);
476
- return contents;
477
- }, "de_ListEndpointsCommand");
478
- var de_ListOutpostsWithS3Command = /* @__PURE__ */ __name(async (output, context) => {
479
- if (output.statusCode !== 200 && output.statusCode >= 300) {
480
- return de_CommandError(output, context);
481
- }
482
- const contents = (0, import_smithy_client.map)({
483
- $metadata: deserializeMetadata(output)
484
- });
485
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
486
- const doc = (0, import_smithy_client.take)(data, {
487
- NextToken: import_smithy_client.expectString,
488
- Outposts: import_smithy_client._json
489
- });
490
- Object.assign(contents, doc);
491
- return contents;
492
- }, "de_ListOutpostsWithS3Command");
493
- var de_ListSharedEndpointsCommand = /* @__PURE__ */ __name(async (output, context) => {
494
- if (output.statusCode !== 200 && output.statusCode >= 300) {
495
- return de_CommandError(output, context);
496
- }
497
- const contents = (0, import_smithy_client.map)({
498
- $metadata: deserializeMetadata(output)
499
- });
500
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
501
- const doc = (0, import_smithy_client.take)(data, {
502
- Endpoints: /* @__PURE__ */ __name((_) => de_Endpoints(_, context), "Endpoints"),
503
- NextToken: import_smithy_client.expectString
504
- });
505
- Object.assign(contents, doc);
506
- return contents;
507
- }, "de_ListSharedEndpointsCommand");
508
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
509
- const parsedOutput = {
510
- ...output,
511
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
512
- };
513
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
514
- switch (errorCode) {
515
- case "AccessDeniedException":
516
- case "com.amazonaws.s3outposts#AccessDeniedException":
517
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
518
- case "ConflictException":
519
- case "com.amazonaws.s3outposts#ConflictException":
520
- throw await de_ConflictExceptionRes(parsedOutput, context);
521
- case "InternalServerException":
522
- case "com.amazonaws.s3outposts#InternalServerException":
523
- throw await de_InternalServerExceptionRes(parsedOutput, context);
524
- case "OutpostOfflineException":
525
- case "com.amazonaws.s3outposts#OutpostOfflineException":
526
- throw await de_OutpostOfflineExceptionRes(parsedOutput, context);
527
- case "ResourceNotFoundException":
528
- case "com.amazonaws.s3outposts#ResourceNotFoundException":
529
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
530
- case "ThrottlingException":
531
- case "com.amazonaws.s3outposts#ThrottlingException":
532
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
533
- case "ValidationException":
534
- case "com.amazonaws.s3outposts#ValidationException":
535
- throw await de_ValidationExceptionRes(parsedOutput, context);
536
- default:
537
- const parsedBody = parsedOutput.body;
538
- return throwDefaultError({
539
- output,
540
- parsedBody,
541
- errorCode
542
- });
543
- }
544
- }, "de_CommandError");
545
- var throwDefaultError = (0, import_smithy_client.withBaseException)(S3OutpostsServiceException);
546
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
547
- const contents = (0, import_smithy_client.map)({});
548
- const data = parsedOutput.body;
549
- const doc = (0, import_smithy_client.take)(data, {
550
- Message: import_smithy_client.expectString
551
- });
552
- Object.assign(contents, doc);
553
- const exception = new AccessDeniedException({
554
- $metadata: deserializeMetadata(parsedOutput),
555
- ...contents
556
- });
557
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
558
- }, "de_AccessDeniedExceptionRes");
559
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
560
- const contents = (0, import_smithy_client.map)({});
561
- const data = parsedOutput.body;
562
- const doc = (0, import_smithy_client.take)(data, {
563
- Message: import_smithy_client.expectString
564
- });
565
- Object.assign(contents, doc);
566
- const exception = new ConflictException({
567
- $metadata: deserializeMetadata(parsedOutput),
568
- ...contents
569
- });
570
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
571
- }, "de_ConflictExceptionRes");
572
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
573
- const contents = (0, import_smithy_client.map)({});
574
- const data = parsedOutput.body;
575
- const doc = (0, import_smithy_client.take)(data, {
576
- Message: import_smithy_client.expectString
577
- });
578
- Object.assign(contents, doc);
579
- const exception = new InternalServerException({
580
- $metadata: deserializeMetadata(parsedOutput),
581
- ...contents
582
- });
583
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
584
- }, "de_InternalServerExceptionRes");
585
- var de_OutpostOfflineExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
586
- const contents = (0, import_smithy_client.map)({});
587
- const data = parsedOutput.body;
588
- const doc = (0, import_smithy_client.take)(data, {
589
- Message: import_smithy_client.expectString
590
- });
591
- Object.assign(contents, doc);
592
- const exception = new OutpostOfflineException({
593
- $metadata: deserializeMetadata(parsedOutput),
594
- ...contents
595
- });
596
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
597
- }, "de_OutpostOfflineExceptionRes");
598
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
599
- const contents = (0, import_smithy_client.map)({});
600
- const data = parsedOutput.body;
601
- const doc = (0, import_smithy_client.take)(data, {
602
- Message: import_smithy_client.expectString
603
- });
604
- Object.assign(contents, doc);
605
- const exception = new ResourceNotFoundException({
606
- $metadata: deserializeMetadata(parsedOutput),
607
- ...contents
608
- });
609
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
610
- }, "de_ResourceNotFoundExceptionRes");
611
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
612
- const contents = (0, import_smithy_client.map)({});
613
- const data = parsedOutput.body;
614
- const doc = (0, import_smithy_client.take)(data, {
615
- Message: import_smithy_client.expectString
616
- });
617
- Object.assign(contents, doc);
618
- const exception = new ThrottlingException({
619
- $metadata: deserializeMetadata(parsedOutput),
620
- ...contents
621
- });
622
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
623
- }, "de_ThrottlingExceptionRes");
624
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
625
- const contents = (0, import_smithy_client.map)({});
626
- const data = parsedOutput.body;
627
- const doc = (0, import_smithy_client.take)(data, {
628
- Message: import_smithy_client.expectString
629
- });
630
- Object.assign(contents, doc);
631
- const exception = new ValidationException({
632
- $metadata: deserializeMetadata(parsedOutput),
633
- ...contents
634
- });
635
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
636
- }, "de_ValidationExceptionRes");
637
- var de_Endpoint = /* @__PURE__ */ __name((output, context) => {
638
- return (0, import_smithy_client.take)(output, {
639
- AccessType: import_smithy_client.expectString,
640
- CidrBlock: import_smithy_client.expectString,
641
- CreationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreationTime"),
642
- CustomerOwnedIpv4Pool: import_smithy_client.expectString,
643
- EndpointArn: import_smithy_client.expectString,
644
- FailedReason: import_smithy_client._json,
645
- NetworkInterfaces: import_smithy_client._json,
646
- OutpostsId: import_smithy_client.expectString,
647
- SecurityGroupId: import_smithy_client.expectString,
648
- Status: import_smithy_client.expectString,
649
- SubnetId: import_smithy_client.expectString,
650
- VpcId: import_smithy_client.expectString
651
- });
652
- }, "de_Endpoint");
653
- var de_Endpoints = /* @__PURE__ */ __name((output, context) => {
654
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
655
- return de_Endpoint(entry, context);
656
- });
657
- return retVal;
658
- }, "de_Endpoints");
659
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
660
- httpStatusCode: output.statusCode,
661
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
662
- extendedRequestId: output.headers["x-amz-id-2"],
663
- cfId: output.headers["x-amz-cf-id"]
664
- }), "deserializeMetadata");
665
- var _EI = "EndpointId";
666
- var _MR = "MaxResults";
667
- var _NT = "NextToken";
668
- var _OI = "OutpostId";
669
- var _eI = "endpointId";
670
- var _mR = "maxResults";
671
- var _nT = "nextToken";
672
- var _oI = "outpostId";
673
-
674
- // src/commands/CreateEndpointCommand.ts
675
- var CreateEndpointCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
676
- return [
677
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
678
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
679
- ];
680
- }).s("S3Outposts", "CreateEndpoint", {}).n("S3OutpostsClient", "CreateEndpointCommand").f(void 0, void 0).ser(se_CreateEndpointCommand).de(de_CreateEndpointCommand).build() {
681
- static {
682
- __name(this, "CreateEndpointCommand");
683
- }
365
+ const de_CommandError = async (output, context) => {
366
+ const parsedOutput = {
367
+ ...output,
368
+ body: await core$1.parseJsonErrorBody(output.body, context),
369
+ };
370
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
371
+ switch (errorCode) {
372
+ case "AccessDeniedException":
373
+ case "com.amazonaws.s3outposts#AccessDeniedException":
374
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
375
+ case "ConflictException":
376
+ case "com.amazonaws.s3outposts#ConflictException":
377
+ throw await de_ConflictExceptionRes(parsedOutput);
378
+ case "InternalServerException":
379
+ case "com.amazonaws.s3outposts#InternalServerException":
380
+ throw await de_InternalServerExceptionRes(parsedOutput);
381
+ case "OutpostOfflineException":
382
+ case "com.amazonaws.s3outposts#OutpostOfflineException":
383
+ throw await de_OutpostOfflineExceptionRes(parsedOutput);
384
+ case "ResourceNotFoundException":
385
+ case "com.amazonaws.s3outposts#ResourceNotFoundException":
386
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
387
+ case "ThrottlingException":
388
+ case "com.amazonaws.s3outposts#ThrottlingException":
389
+ throw await de_ThrottlingExceptionRes(parsedOutput);
390
+ case "ValidationException":
391
+ case "com.amazonaws.s3outposts#ValidationException":
392
+ throw await de_ValidationExceptionRes(parsedOutput);
393
+ default:
394
+ const parsedBody = parsedOutput.body;
395
+ return throwDefaultError({
396
+ output,
397
+ parsedBody,
398
+ errorCode,
399
+ });
400
+ }
684
401
  };
685
-
686
- // src/commands/DeleteEndpointCommand.ts
687
-
688
-
689
-
690
- var DeleteEndpointCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
691
- return [
692
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
693
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
694
- ];
695
- }).s("S3Outposts", "DeleteEndpoint", {}).n("S3OutpostsClient", "DeleteEndpointCommand").f(void 0, void 0).ser(se_DeleteEndpointCommand).de(de_DeleteEndpointCommand).build() {
696
- static {
697
- __name(this, "DeleteEndpointCommand");
698
- }
402
+ const throwDefaultError = smithyClient.withBaseException(S3OutpostsServiceException);
403
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
404
+ const contents = smithyClient.map({});
405
+ const data = parsedOutput.body;
406
+ const doc = smithyClient.take(data, {
407
+ Message: smithyClient.expectString,
408
+ });
409
+ Object.assign(contents, doc);
410
+ const exception = new AccessDeniedException({
411
+ $metadata: deserializeMetadata(parsedOutput),
412
+ ...contents,
413
+ });
414
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
699
415
  };
700
-
701
- // src/commands/ListEndpointsCommand.ts
702
-
703
-
704
-
705
- var ListEndpointsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
706
- return [
707
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
708
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
709
- ];
710
- }).s("S3Outposts", "ListEndpoints", {}).n("S3OutpostsClient", "ListEndpointsCommand").f(void 0, void 0).ser(se_ListEndpointsCommand).de(de_ListEndpointsCommand).build() {
711
- static {
712
- __name(this, "ListEndpointsCommand");
713
- }
416
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
417
+ const contents = smithyClient.map({});
418
+ const data = parsedOutput.body;
419
+ const doc = smithyClient.take(data, {
420
+ Message: smithyClient.expectString,
421
+ });
422
+ Object.assign(contents, doc);
423
+ const exception = new ConflictException({
424
+ $metadata: deserializeMetadata(parsedOutput),
425
+ ...contents,
426
+ });
427
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
714
428
  };
715
-
716
- // src/commands/ListOutpostsWithS3Command.ts
717
-
718
-
719
-
720
- var ListOutpostsWithS3Command = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
721
- return [
722
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
723
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
724
- ];
725
- }).s("S3Outposts", "ListOutpostsWithS3", {}).n("S3OutpostsClient", "ListOutpostsWithS3Command").f(void 0, void 0).ser(se_ListOutpostsWithS3Command).de(de_ListOutpostsWithS3Command).build() {
726
- static {
727
- __name(this, "ListOutpostsWithS3Command");
728
- }
429
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
430
+ const contents = smithyClient.map({});
431
+ const data = parsedOutput.body;
432
+ const doc = smithyClient.take(data, {
433
+ Message: smithyClient.expectString,
434
+ });
435
+ Object.assign(contents, doc);
436
+ const exception = new InternalServerException({
437
+ $metadata: deserializeMetadata(parsedOutput),
438
+ ...contents,
439
+ });
440
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
729
441
  };
730
-
731
- // src/commands/ListSharedEndpointsCommand.ts
732
-
733
-
734
-
735
- var ListSharedEndpointsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
736
- return [
737
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
738
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
739
- ];
740
- }).s("S3Outposts", "ListSharedEndpoints", {}).n("S3OutpostsClient", "ListSharedEndpointsCommand").f(void 0, void 0).ser(se_ListSharedEndpointsCommand).de(de_ListSharedEndpointsCommand).build() {
741
- static {
742
- __name(this, "ListSharedEndpointsCommand");
743
- }
442
+ const de_OutpostOfflineExceptionRes = async (parsedOutput, context) => {
443
+ const contents = smithyClient.map({});
444
+ const data = parsedOutput.body;
445
+ const doc = smithyClient.take(data, {
446
+ Message: smithyClient.expectString,
447
+ });
448
+ Object.assign(contents, doc);
449
+ const exception = new OutpostOfflineException({
450
+ $metadata: deserializeMetadata(parsedOutput),
451
+ ...contents,
452
+ });
453
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
744
454
  };
745
-
746
- // src/S3Outposts.ts
747
- var commands = {
748
- CreateEndpointCommand,
749
- DeleteEndpointCommand,
750
- ListEndpointsCommand,
751
- ListOutpostsWithS3Command,
752
- ListSharedEndpointsCommand
455
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
456
+ const contents = smithyClient.map({});
457
+ const data = parsedOutput.body;
458
+ const doc = smithyClient.take(data, {
459
+ Message: smithyClient.expectString,
460
+ });
461
+ Object.assign(contents, doc);
462
+ const exception = new ResourceNotFoundException({
463
+ $metadata: deserializeMetadata(parsedOutput),
464
+ ...contents,
465
+ });
466
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
753
467
  };
754
- var S3Outposts = class extends S3OutpostsClient {
755
- static {
756
- __name(this, "S3Outposts");
757
- }
468
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
469
+ const contents = smithyClient.map({});
470
+ const data = parsedOutput.body;
471
+ const doc = smithyClient.take(data, {
472
+ Message: smithyClient.expectString,
473
+ });
474
+ Object.assign(contents, doc);
475
+ const exception = new ThrottlingException({
476
+ $metadata: deserializeMetadata(parsedOutput),
477
+ ...contents,
478
+ });
479
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
758
480
  };
759
- (0, import_smithy_client.createAggregatedClient)(commands, S3Outposts);
760
-
761
- // src/pagination/ListEndpointsPaginator.ts
762
-
763
- var paginateListEndpoints = (0, import_core.createPaginator)(S3OutpostsClient, ListEndpointsCommand, "NextToken", "NextToken", "MaxResults");
764
-
765
- // src/pagination/ListOutpostsWithS3Paginator.ts
481
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
482
+ const contents = smithyClient.map({});
483
+ const data = parsedOutput.body;
484
+ const doc = smithyClient.take(data, {
485
+ Message: smithyClient.expectString,
486
+ });
487
+ Object.assign(contents, doc);
488
+ const exception = new ValidationException({
489
+ $metadata: deserializeMetadata(parsedOutput),
490
+ ...contents,
491
+ });
492
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
493
+ };
494
+ const de_Endpoint = (output, context) => {
495
+ return smithyClient.take(output, {
496
+ AccessType: smithyClient.expectString,
497
+ CidrBlock: smithyClient.expectString,
498
+ CreationTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
499
+ CustomerOwnedIpv4Pool: smithyClient.expectString,
500
+ EndpointArn: smithyClient.expectString,
501
+ FailedReason: smithyClient._json,
502
+ NetworkInterfaces: smithyClient._json,
503
+ OutpostsId: smithyClient.expectString,
504
+ SecurityGroupId: smithyClient.expectString,
505
+ Status: smithyClient.expectString,
506
+ SubnetId: smithyClient.expectString,
507
+ VpcId: smithyClient.expectString,
508
+ });
509
+ };
510
+ const de_Endpoints = (output, context) => {
511
+ const retVal = (output || [])
512
+ .filter((e) => e != null)
513
+ .map((entry) => {
514
+ return de_Endpoint(entry);
515
+ });
516
+ return retVal;
517
+ };
518
+ const deserializeMetadata = (output) => ({
519
+ httpStatusCode: output.statusCode,
520
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
521
+ extendedRequestId: output.headers["x-amz-id-2"],
522
+ cfId: output.headers["x-amz-cf-id"],
523
+ });
524
+ const _EI = "EndpointId";
525
+ const _MR = "MaxResults";
526
+ const _NT = "NextToken";
527
+ const _OI = "OutpostId";
528
+ const _eI = "endpointId";
529
+ const _mR = "maxResults";
530
+ const _nT = "nextToken";
531
+ const _oI = "outpostId";
532
+
533
+ class CreateEndpointCommand extends smithyClient.Command
534
+ .classBuilder()
535
+ .ep(commonParams)
536
+ .m(function (Command, cs, config, o) {
537
+ return [
538
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
539
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
540
+ ];
541
+ })
542
+ .s("S3Outposts", "CreateEndpoint", {})
543
+ .n("S3OutpostsClient", "CreateEndpointCommand")
544
+ .f(void 0, void 0)
545
+ .ser(se_CreateEndpointCommand)
546
+ .de(de_CreateEndpointCommand)
547
+ .build() {
548
+ }
549
+
550
+ class DeleteEndpointCommand extends smithyClient.Command
551
+ .classBuilder()
552
+ .ep(commonParams)
553
+ .m(function (Command, cs, config, o) {
554
+ return [
555
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
556
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
557
+ ];
558
+ })
559
+ .s("S3Outposts", "DeleteEndpoint", {})
560
+ .n("S3OutpostsClient", "DeleteEndpointCommand")
561
+ .f(void 0, void 0)
562
+ .ser(se_DeleteEndpointCommand)
563
+ .de(de_DeleteEndpointCommand)
564
+ .build() {
565
+ }
566
+
567
+ class ListEndpointsCommand extends smithyClient.Command
568
+ .classBuilder()
569
+ .ep(commonParams)
570
+ .m(function (Command, cs, config, o) {
571
+ return [
572
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
573
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
574
+ ];
575
+ })
576
+ .s("S3Outposts", "ListEndpoints", {})
577
+ .n("S3OutpostsClient", "ListEndpointsCommand")
578
+ .f(void 0, void 0)
579
+ .ser(se_ListEndpointsCommand)
580
+ .de(de_ListEndpointsCommand)
581
+ .build() {
582
+ }
583
+
584
+ class ListOutpostsWithS3Command extends smithyClient.Command
585
+ .classBuilder()
586
+ .ep(commonParams)
587
+ .m(function (Command, cs, config, o) {
588
+ return [
589
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
590
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
591
+ ];
592
+ })
593
+ .s("S3Outposts", "ListOutpostsWithS3", {})
594
+ .n("S3OutpostsClient", "ListOutpostsWithS3Command")
595
+ .f(void 0, void 0)
596
+ .ser(se_ListOutpostsWithS3Command)
597
+ .de(de_ListOutpostsWithS3Command)
598
+ .build() {
599
+ }
600
+
601
+ class ListSharedEndpointsCommand extends smithyClient.Command
602
+ .classBuilder()
603
+ .ep(commonParams)
604
+ .m(function (Command, cs, config, o) {
605
+ return [
606
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
607
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
608
+ ];
609
+ })
610
+ .s("S3Outposts", "ListSharedEndpoints", {})
611
+ .n("S3OutpostsClient", "ListSharedEndpointsCommand")
612
+ .f(void 0, void 0)
613
+ .ser(se_ListSharedEndpointsCommand)
614
+ .de(de_ListSharedEndpointsCommand)
615
+ .build() {
616
+ }
617
+
618
+ const commands = {
619
+ CreateEndpointCommand,
620
+ DeleteEndpointCommand,
621
+ ListEndpointsCommand,
622
+ ListOutpostsWithS3Command,
623
+ ListSharedEndpointsCommand,
624
+ };
625
+ class S3Outposts extends S3OutpostsClient {
626
+ }
627
+ smithyClient.createAggregatedClient(commands, S3Outposts);
766
628
 
767
- var paginateListOutpostsWithS3 = (0, import_core.createPaginator)(S3OutpostsClient, ListOutpostsWithS3Command, "NextToken", "NextToken", "MaxResults");
629
+ const paginateListEndpoints = core.createPaginator(S3OutpostsClient, ListEndpointsCommand, "NextToken", "NextToken", "MaxResults");
768
630
 
769
- // src/pagination/ListSharedEndpointsPaginator.ts
631
+ const paginateListOutpostsWithS3 = core.createPaginator(S3OutpostsClient, ListOutpostsWithS3Command, "NextToken", "NextToken", "MaxResults");
770
632
 
771
- var paginateListSharedEndpoints = (0, import_core.createPaginator)(S3OutpostsClient, ListSharedEndpointsCommand, "NextToken", "NextToken", "MaxResults");
772
- // Annotate the CommonJS export names for ESM import in node:
633
+ const paginateListSharedEndpoints = core.createPaginator(S3OutpostsClient, ListSharedEndpointsCommand, "NextToken", "NextToken", "MaxResults");
773
634
 
774
- 0 && (module.exports = {
775
- S3OutpostsServiceException,
776
- __Client,
777
- S3OutpostsClient,
778
- S3Outposts,
779
- $Command,
780
- CreateEndpointCommand,
781
- DeleteEndpointCommand,
782
- ListEndpointsCommand,
783
- ListOutpostsWithS3Command,
784
- ListSharedEndpointsCommand,
785
- paginateListEndpoints,
786
- paginateListOutpostsWithS3,
787
- paginateListSharedEndpoints,
788
- AccessDeniedException,
789
- ConflictException,
790
- EndpointAccessType,
791
- InternalServerException,
792
- OutpostOfflineException,
793
- ResourceNotFoundException,
794
- ThrottlingException,
795
- ValidationException,
796
- EndpointStatus
635
+ Object.defineProperty(exports, "$Command", {
636
+ enumerable: true,
637
+ get: function () { return smithyClient.Command; }
797
638
  });
798
-
639
+ Object.defineProperty(exports, "__Client", {
640
+ enumerable: true,
641
+ get: function () { return smithyClient.Client; }
642
+ });
643
+ exports.AccessDeniedException = AccessDeniedException;
644
+ exports.ConflictException = ConflictException;
645
+ exports.CreateEndpointCommand = CreateEndpointCommand;
646
+ exports.DeleteEndpointCommand = DeleteEndpointCommand;
647
+ exports.EndpointAccessType = EndpointAccessType;
648
+ exports.EndpointStatus = EndpointStatus;
649
+ exports.InternalServerException = InternalServerException;
650
+ exports.ListEndpointsCommand = ListEndpointsCommand;
651
+ exports.ListOutpostsWithS3Command = ListOutpostsWithS3Command;
652
+ exports.ListSharedEndpointsCommand = ListSharedEndpointsCommand;
653
+ exports.OutpostOfflineException = OutpostOfflineException;
654
+ exports.ResourceNotFoundException = ResourceNotFoundException;
655
+ exports.S3Outposts = S3Outposts;
656
+ exports.S3OutpostsClient = S3OutpostsClient;
657
+ exports.S3OutpostsServiceException = S3OutpostsServiceException;
658
+ exports.ThrottlingException = ThrottlingException;
659
+ exports.ValidationException = ValidationException;
660
+ exports.paginateListEndpoints = paginateListEndpoints;
661
+ exports.paginateListOutpostsWithS3 = paginateListOutpostsWithS3;
662
+ exports.paginateListSharedEndpoints = paginateListSharedEndpoints;