@aws-sdk/client-eks-auth 3.490.0 → 3.496.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.
@@ -1,13 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EKSAuth = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- const AssumeRoleForPodIdentityCommand_1 = require("./commands/AssumeRoleForPodIdentityCommand");
6
- const EKSAuthClient_1 = require("./EKSAuthClient");
7
- const commands = {
8
- AssumeRoleForPodIdentityCommand: AssumeRoleForPodIdentityCommand_1.AssumeRoleForPodIdentityCommand,
9
- };
10
- class EKSAuth extends EKSAuthClient_1.EKSAuthClient {
11
- }
12
- exports.EKSAuth = EKSAuth;
13
- (0, smithy_client_1.createAggregatedClient)(commands, EKSAuth);
1
+ module.exports = require("./index.js");
@@ -1,43 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EKSAuthClient = exports.__Client = void 0;
4
- const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
5
- const middleware_logger_1 = require("@aws-sdk/middleware-logger");
6
- const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
7
- const middleware_signing_1 = require("@aws-sdk/middleware-signing");
8
- const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
9
- const config_resolver_1 = require("@smithy/config-resolver");
10
- const middleware_content_length_1 = require("@smithy/middleware-content-length");
11
- const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
12
- const middleware_retry_1 = require("@smithy/middleware-retry");
13
- const smithy_client_1 = require("@smithy/smithy-client");
14
- Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
15
- const EndpointParameters_1 = require("./endpoint/EndpointParameters");
16
- const runtimeConfig_1 = require("./runtimeConfig");
17
- const runtimeExtensions_1 = require("./runtimeExtensions");
18
- class EKSAuthClient extends smithy_client_1.Client {
19
- constructor(...[configuration]) {
20
- const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
21
- const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
22
- const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
23
- const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
24
- const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
25
- const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
26
- const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
27
- const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
28
- const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
29
- super(_config_8);
30
- this.config = _config_8;
31
- this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
32
- this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
33
- this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
34
- this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
35
- this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
36
- this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
37
- this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
38
- }
39
- destroy() {
40
- super.destroy();
41
- }
42
- }
43
- exports.EKSAuthClient = EKSAuthClient;
1
+ module.exports = require("./index.js");
@@ -1,29 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssumeRoleForPodIdentityCommand = exports.$Command = void 0;
4
- const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
- const middleware_serde_1 = require("@smithy/middleware-serde");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
- const models_0_1 = require("../models/models_0");
10
- const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
11
- class AssumeRoleForPodIdentityCommand extends smithy_client_1.Command
12
- .classBuilder()
13
- .ep({
14
- ...EndpointParameters_1.commonParams,
15
- })
16
- .m(function (Command, cs, config, o) {
17
- return [
18
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
19
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
20
- ];
21
- })
22
- .s("EKSAuthFrontend", "AssumeRoleForPodIdentity", {})
23
- .n("EKSAuthClient", "AssumeRoleForPodIdentityCommand")
24
- .f(models_0_1.AssumeRoleForPodIdentityRequestFilterSensitiveLog, models_0_1.AssumeRoleForPodIdentityResponseFilterSensitiveLog)
25
- .ser(Aws_restJson1_1.se_AssumeRoleForPodIdentityCommand)
26
- .de(Aws_restJson1_1.de_AssumeRoleForPodIdentityCommand)
27
- .build() {
28
- }
29
- exports.AssumeRoleForPodIdentityCommand = AssumeRoleForPodIdentityCommand;
1
+ module.exports = require("../index.js");
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./AssumeRoleForPodIdentityCommand"), exports);
1
+ module.exports = require("../index.js");
@@ -1,16 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
- const resolveClientEndpointParameters = (options) => {
5
- return {
6
- ...options,
7
- useFipsEndpoint: options.useFipsEndpoint ?? false,
8
- defaultSigningName: "eks-auth",
9
- };
10
- };
11
- exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
12
- exports.commonParams = {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- };
1
+ module.exports = require("../index.js");
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ module.exports = require("./index.js");
package/dist-cjs/index.js CHANGED
@@ -1,11 +1,623 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EKSAuthServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./EKSAuthClient"), exports);
6
- tslib_1.__exportStar(require("./EKSAuth"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var EKSAuthServiceException_1 = require("./models/EKSAuthServiceException");
11
- Object.defineProperty(exports, "EKSAuthServiceException", { enumerable: true, get: function () { return EKSAuthServiceException_1.EKSAuthServiceException; } });
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 });
10
+ };
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;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ $Command: () => import_smithy_client.Command,
25
+ AccessDeniedException: () => AccessDeniedException,
26
+ AssumeRoleForPodIdentityCommand: () => AssumeRoleForPodIdentityCommand,
27
+ AssumeRoleForPodIdentityRequestFilterSensitiveLog: () => AssumeRoleForPodIdentityRequestFilterSensitiveLog,
28
+ AssumeRoleForPodIdentityResponseFilterSensitiveLog: () => AssumeRoleForPodIdentityResponseFilterSensitiveLog,
29
+ CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,
30
+ EKSAuth: () => EKSAuth,
31
+ EKSAuthClient: () => EKSAuthClient,
32
+ EKSAuthServiceException: () => EKSAuthServiceException,
33
+ ExpiredTokenException: () => ExpiredTokenException,
34
+ InternalServerException: () => InternalServerException,
35
+ InvalidParameterException: () => InvalidParameterException,
36
+ InvalidRequestException: () => InvalidRequestException,
37
+ InvalidTokenException: () => InvalidTokenException,
38
+ ResourceNotFoundException: () => ResourceNotFoundException,
39
+ ServiceUnavailableException: () => ServiceUnavailableException,
40
+ ThrottlingException: () => ThrottlingException,
41
+ __Client: () => import_smithy_client.Client,
42
+ __MetadataBearer: () => import_types.MetadataBearer
43
+ });
44
+ module.exports = __toCommonJS(src_exports);
45
+
46
+ // src/EKSAuthClient.ts
47
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
48
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
49
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
50
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
51
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
52
+ var import_config_resolver = require("@smithy/config-resolver");
53
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
54
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
55
+ var import_middleware_retry = require("@smithy/middleware-retry");
56
+
57
+
58
+ // src/endpoint/EndpointParameters.ts
59
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
60
+ return {
61
+ ...options,
62
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
63
+ defaultSigningName: "eks-auth"
64
+ };
65
+ }, "resolveClientEndpointParameters");
66
+ var commonParams = {
67
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
68
+ Endpoint: { type: "builtInParams", name: "endpoint" },
69
+ Region: { type: "builtInParams", name: "region" }
70
+ };
71
+
72
+ // src/EKSAuthClient.ts
73
+ var import_runtimeConfig = require("././runtimeConfig");
74
+
75
+ // src/runtimeExtensions.ts
76
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
77
+ var import_protocol_http = require("@smithy/protocol-http");
78
+ var import_smithy_client = require("@smithy/smithy-client");
79
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
80
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
81
+ const extensionConfiguration = {
82
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
83
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
84
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
85
+ };
86
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
87
+ return {
88
+ ...runtimeConfig,
89
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
90
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
91
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
92
+ };
93
+ }, "resolveRuntimeExtensions");
94
+
95
+ // src/EKSAuthClient.ts
96
+ var _EKSAuthClient = class _EKSAuthClient extends import_smithy_client.Client {
97
+ constructor(...[configuration]) {
98
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
99
+ const _config_1 = resolveClientEndpointParameters(_config_0);
100
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
101
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
102
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
103
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
104
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
105
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
106
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
107
+ super(_config_8);
108
+ this.config = _config_8;
109
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
110
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
111
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
113
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
114
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
115
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
116
+ }
117
+ /**
118
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
119
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
120
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
121
+ */
122
+ destroy() {
123
+ super.destroy();
124
+ }
125
+ };
126
+ __name(_EKSAuthClient, "EKSAuthClient");
127
+ var EKSAuthClient = _EKSAuthClient;
128
+
129
+ // src/EKSAuth.ts
130
+
131
+
132
+ // src/commands/AssumeRoleForPodIdentityCommand.ts
133
+
134
+ var import_middleware_serde = require("@smithy/middleware-serde");
135
+
136
+ var import_types = require("@smithy/types");
137
+
138
+ // src/models/models_0.ts
139
+
140
+
141
+ // src/models/EKSAuthServiceException.ts
142
+
143
+ var _EKSAuthServiceException = class _EKSAuthServiceException extends import_smithy_client.ServiceException {
144
+ /**
145
+ * @internal
146
+ */
147
+ constructor(options) {
148
+ super(options);
149
+ Object.setPrototypeOf(this, _EKSAuthServiceException.prototype);
150
+ }
151
+ };
152
+ __name(_EKSAuthServiceException, "EKSAuthServiceException");
153
+ var EKSAuthServiceException = _EKSAuthServiceException;
154
+
155
+ // src/models/models_0.ts
156
+ var _AccessDeniedException = class _AccessDeniedException extends EKSAuthServiceException {
157
+ /**
158
+ * @internal
159
+ */
160
+ constructor(opts) {
161
+ super({
162
+ name: "AccessDeniedException",
163
+ $fault: "client",
164
+ ...opts
165
+ });
166
+ this.name = "AccessDeniedException";
167
+ this.$fault = "client";
168
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
169
+ }
170
+ };
171
+ __name(_AccessDeniedException, "AccessDeniedException");
172
+ var AccessDeniedException = _AccessDeniedException;
173
+ var _ExpiredTokenException = class _ExpiredTokenException extends EKSAuthServiceException {
174
+ /**
175
+ * @internal
176
+ */
177
+ constructor(opts) {
178
+ super({
179
+ name: "ExpiredTokenException",
180
+ $fault: "client",
181
+ ...opts
182
+ });
183
+ this.name = "ExpiredTokenException";
184
+ this.$fault = "client";
185
+ Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
186
+ }
187
+ };
188
+ __name(_ExpiredTokenException, "ExpiredTokenException");
189
+ var ExpiredTokenException = _ExpiredTokenException;
190
+ var _InternalServerException = class _InternalServerException extends EKSAuthServiceException {
191
+ /**
192
+ * @internal
193
+ */
194
+ constructor(opts) {
195
+ super({
196
+ name: "InternalServerException",
197
+ $fault: "server",
198
+ ...opts
199
+ });
200
+ this.name = "InternalServerException";
201
+ this.$fault = "server";
202
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
203
+ }
204
+ };
205
+ __name(_InternalServerException, "InternalServerException");
206
+ var InternalServerException = _InternalServerException;
207
+ var _InvalidParameterException = class _InvalidParameterException extends EKSAuthServiceException {
208
+ /**
209
+ * @internal
210
+ */
211
+ constructor(opts) {
212
+ super({
213
+ name: "InvalidParameterException",
214
+ $fault: "client",
215
+ ...opts
216
+ });
217
+ this.name = "InvalidParameterException";
218
+ this.$fault = "client";
219
+ Object.setPrototypeOf(this, _InvalidParameterException.prototype);
220
+ }
221
+ };
222
+ __name(_InvalidParameterException, "InvalidParameterException");
223
+ var InvalidParameterException = _InvalidParameterException;
224
+ var _InvalidRequestException = class _InvalidRequestException extends EKSAuthServiceException {
225
+ /**
226
+ * @internal
227
+ */
228
+ constructor(opts) {
229
+ super({
230
+ name: "InvalidRequestException",
231
+ $fault: "client",
232
+ ...opts
233
+ });
234
+ this.name = "InvalidRequestException";
235
+ this.$fault = "client";
236
+ Object.setPrototypeOf(this, _InvalidRequestException.prototype);
237
+ }
238
+ };
239
+ __name(_InvalidRequestException, "InvalidRequestException");
240
+ var InvalidRequestException = _InvalidRequestException;
241
+ var _InvalidTokenException = class _InvalidTokenException extends EKSAuthServiceException {
242
+ /**
243
+ * @internal
244
+ */
245
+ constructor(opts) {
246
+ super({
247
+ name: "InvalidTokenException",
248
+ $fault: "client",
249
+ ...opts
250
+ });
251
+ this.name = "InvalidTokenException";
252
+ this.$fault = "client";
253
+ Object.setPrototypeOf(this, _InvalidTokenException.prototype);
254
+ }
255
+ };
256
+ __name(_InvalidTokenException, "InvalidTokenException");
257
+ var InvalidTokenException = _InvalidTokenException;
258
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends EKSAuthServiceException {
259
+ /**
260
+ * @internal
261
+ */
262
+ constructor(opts) {
263
+ super({
264
+ name: "ResourceNotFoundException",
265
+ $fault: "client",
266
+ ...opts
267
+ });
268
+ this.name = "ResourceNotFoundException";
269
+ this.$fault = "client";
270
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
271
+ }
272
+ };
273
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
274
+ var ResourceNotFoundException = _ResourceNotFoundException;
275
+ var _ServiceUnavailableException = class _ServiceUnavailableException extends EKSAuthServiceException {
276
+ /**
277
+ * @internal
278
+ */
279
+ constructor(opts) {
280
+ super({
281
+ name: "ServiceUnavailableException",
282
+ $fault: "server",
283
+ ...opts
284
+ });
285
+ this.name = "ServiceUnavailableException";
286
+ this.$fault = "server";
287
+ Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
288
+ }
289
+ };
290
+ __name(_ServiceUnavailableException, "ServiceUnavailableException");
291
+ var ServiceUnavailableException = _ServiceUnavailableException;
292
+ var _ThrottlingException = class _ThrottlingException extends EKSAuthServiceException {
293
+ /**
294
+ * @internal
295
+ */
296
+ constructor(opts) {
297
+ super({
298
+ name: "ThrottlingException",
299
+ $fault: "client",
300
+ ...opts
301
+ });
302
+ this.name = "ThrottlingException";
303
+ this.$fault = "client";
304
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
305
+ }
306
+ };
307
+ __name(_ThrottlingException, "ThrottlingException");
308
+ var ThrottlingException = _ThrottlingException;
309
+ var AssumeRoleForPodIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
310
+ ...obj,
311
+ ...obj.token && { token: import_smithy_client.SENSITIVE_STRING }
312
+ }), "AssumeRoleForPodIdentityRequestFilterSensitiveLog");
313
+ var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
314
+ ...obj
315
+ }), "CredentialsFilterSensitiveLog");
316
+ var AssumeRoleForPodIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
317
+ ...obj,
318
+ ...obj.credentials && { credentials: import_smithy_client.SENSITIVE_STRING }
319
+ }), "AssumeRoleForPodIdentityResponseFilterSensitiveLog");
320
+
321
+ // src/protocols/Aws_restJson1.ts
322
+ var import_core = require("@smithy/core");
323
+
324
+ var se_AssumeRoleForPodIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {
325
+ const b = (0, import_core.requestBuilder)(input, context);
326
+ const headers = {
327
+ "content-type": "application/json"
328
+ };
329
+ b.bp("/clusters/{clusterName}/assume-role-for-pod-identity");
330
+ b.p("clusterName", () => input.clusterName, "{clusterName}", false);
331
+ let body;
332
+ body = JSON.stringify(
333
+ (0, import_smithy_client.take)(input, {
334
+ token: []
335
+ })
336
+ );
337
+ b.m("POST").h(headers).b(body);
338
+ return b.build();
339
+ }, "se_AssumeRoleForPodIdentityCommand");
340
+ var de_AssumeRoleForPodIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {
341
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
342
+ return de_AssumeRoleForPodIdentityCommandError(output, context);
343
+ }
344
+ const contents = (0, import_smithy_client.map)({
345
+ $metadata: deserializeMetadata(output)
346
+ });
347
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
348
+ const doc = (0, import_smithy_client.take)(data, {
349
+ assumedRoleUser: import_smithy_client._json,
350
+ audience: import_smithy_client.expectString,
351
+ credentials: (_) => de_Credentials(_, context),
352
+ podIdentityAssociation: import_smithy_client._json,
353
+ subject: import_smithy_client._json
354
+ });
355
+ Object.assign(contents, doc);
356
+ return contents;
357
+ }, "de_AssumeRoleForPodIdentityCommand");
358
+ var de_AssumeRoleForPodIdentityCommandError = /* @__PURE__ */ __name(async (output, context) => {
359
+ const parsedOutput = {
360
+ ...output,
361
+ body: await parseErrorBody(output.body, context)
362
+ };
363
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
364
+ switch (errorCode) {
365
+ case "AccessDeniedException":
366
+ case "com.amazonaws.eksauth#AccessDeniedException":
367
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
368
+ case "ExpiredTokenException":
369
+ case "com.amazonaws.eksauth#ExpiredTokenException":
370
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
371
+ case "InternalServerException":
372
+ case "com.amazonaws.eksauth#InternalServerException":
373
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
374
+ case "InvalidParameterException":
375
+ case "com.amazonaws.eksauth#InvalidParameterException":
376
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
377
+ case "InvalidRequestException":
378
+ case "com.amazonaws.eksauth#InvalidRequestException":
379
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
380
+ case "InvalidTokenException":
381
+ case "com.amazonaws.eksauth#InvalidTokenException":
382
+ throw await de_InvalidTokenExceptionRes(parsedOutput, context);
383
+ case "ResourceNotFoundException":
384
+ case "com.amazonaws.eksauth#ResourceNotFoundException":
385
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
386
+ case "ServiceUnavailableException":
387
+ case "com.amazonaws.eksauth#ServiceUnavailableException":
388
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
389
+ case "ThrottlingException":
390
+ case "com.amazonaws.eksauth#ThrottlingException":
391
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
392
+ default:
393
+ const parsedBody = parsedOutput.body;
394
+ return throwDefaultError({
395
+ output,
396
+ parsedBody,
397
+ errorCode
398
+ });
399
+ }
400
+ }, "de_AssumeRoleForPodIdentityCommandError");
401
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(EKSAuthServiceException);
402
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
403
+ const contents = (0, import_smithy_client.map)({});
404
+ const data = parsedOutput.body;
405
+ const doc = (0, import_smithy_client.take)(data, {
406
+ message: import_smithy_client.expectString
407
+ });
408
+ Object.assign(contents, doc);
409
+ const exception = new AccessDeniedException({
410
+ $metadata: deserializeMetadata(parsedOutput),
411
+ ...contents
412
+ });
413
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
414
+ }, "de_AccessDeniedExceptionRes");
415
+ var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
416
+ const contents = (0, import_smithy_client.map)({});
417
+ const data = parsedOutput.body;
418
+ const doc = (0, import_smithy_client.take)(data, {
419
+ message: import_smithy_client.expectString
420
+ });
421
+ Object.assign(contents, doc);
422
+ const exception = new ExpiredTokenException({
423
+ $metadata: deserializeMetadata(parsedOutput),
424
+ ...contents
425
+ });
426
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
427
+ }, "de_ExpiredTokenExceptionRes");
428
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
429
+ const contents = (0, import_smithy_client.map)({});
430
+ const data = parsedOutput.body;
431
+ const doc = (0, import_smithy_client.take)(data, {
432
+ message: import_smithy_client.expectString
433
+ });
434
+ Object.assign(contents, doc);
435
+ const exception = new InternalServerException({
436
+ $metadata: deserializeMetadata(parsedOutput),
437
+ ...contents
438
+ });
439
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
440
+ }, "de_InternalServerExceptionRes");
441
+ var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
442
+ const contents = (0, import_smithy_client.map)({});
443
+ const data = parsedOutput.body;
444
+ const doc = (0, import_smithy_client.take)(data, {
445
+ message: import_smithy_client.expectString
446
+ });
447
+ Object.assign(contents, doc);
448
+ const exception = new InvalidParameterException({
449
+ $metadata: deserializeMetadata(parsedOutput),
450
+ ...contents
451
+ });
452
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
453
+ }, "de_InvalidParameterExceptionRes");
454
+ var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
455
+ const contents = (0, import_smithy_client.map)({});
456
+ const data = parsedOutput.body;
457
+ const doc = (0, import_smithy_client.take)(data, {
458
+ message: import_smithy_client.expectString
459
+ });
460
+ Object.assign(contents, doc);
461
+ const exception = new InvalidRequestException({
462
+ $metadata: deserializeMetadata(parsedOutput),
463
+ ...contents
464
+ });
465
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
466
+ }, "de_InvalidRequestExceptionRes");
467
+ var de_InvalidTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
468
+ const contents = (0, import_smithy_client.map)({});
469
+ const data = parsedOutput.body;
470
+ const doc = (0, import_smithy_client.take)(data, {
471
+ message: import_smithy_client.expectString
472
+ });
473
+ Object.assign(contents, doc);
474
+ const exception = new InvalidTokenException({
475
+ $metadata: deserializeMetadata(parsedOutput),
476
+ ...contents
477
+ });
478
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
479
+ }, "de_InvalidTokenExceptionRes");
480
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
481
+ const contents = (0, import_smithy_client.map)({});
482
+ const data = parsedOutput.body;
483
+ const doc = (0, import_smithy_client.take)(data, {
484
+ message: import_smithy_client.expectString
485
+ });
486
+ Object.assign(contents, doc);
487
+ const exception = new ResourceNotFoundException({
488
+ $metadata: deserializeMetadata(parsedOutput),
489
+ ...contents
490
+ });
491
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
492
+ }, "de_ResourceNotFoundExceptionRes");
493
+ var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
494
+ const contents = (0, import_smithy_client.map)({});
495
+ const data = parsedOutput.body;
496
+ const doc = (0, import_smithy_client.take)(data, {
497
+ message: import_smithy_client.expectString
498
+ });
499
+ Object.assign(contents, doc);
500
+ const exception = new ServiceUnavailableException({
501
+ $metadata: deserializeMetadata(parsedOutput),
502
+ ...contents
503
+ });
504
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
505
+ }, "de_ServiceUnavailableExceptionRes");
506
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
507
+ const contents = (0, import_smithy_client.map)({});
508
+ const data = parsedOutput.body;
509
+ const doc = (0, import_smithy_client.take)(data, {
510
+ message: import_smithy_client.expectString
511
+ });
512
+ Object.assign(contents, doc);
513
+ const exception = new ThrottlingException({
514
+ $metadata: deserializeMetadata(parsedOutput),
515
+ ...contents
516
+ });
517
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
518
+ }, "de_ThrottlingExceptionRes");
519
+ var de_Credentials = /* @__PURE__ */ __name((output, context) => {
520
+ return (0, import_smithy_client.take)(output, {
521
+ accessKeyId: import_smithy_client.expectString,
522
+ expiration: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
523
+ secretAccessKey: import_smithy_client.expectString,
524
+ sessionToken: import_smithy_client.expectString
525
+ });
526
+ }, "de_Credentials");
527
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
528
+ httpStatusCode: output.statusCode,
529
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
530
+ extendedRequestId: output.headers["x-amz-id-2"],
531
+ cfId: output.headers["x-amz-cf-id"]
532
+ }), "deserializeMetadata");
533
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
534
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
535
+ if (encoded.length) {
536
+ return JSON.parse(encoded);
537
+ }
538
+ return {};
539
+ }), "parseBody");
540
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
541
+ const value = await parseBody(errorBody, context);
542
+ value.message = value.message ?? value.Message;
543
+ return value;
544
+ }, "parseErrorBody");
545
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
546
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
547
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
548
+ let cleanValue = rawValue;
549
+ if (typeof cleanValue === "number") {
550
+ cleanValue = cleanValue.toString();
551
+ }
552
+ if (cleanValue.indexOf(",") >= 0) {
553
+ cleanValue = cleanValue.split(",")[0];
554
+ }
555
+ if (cleanValue.indexOf(":") >= 0) {
556
+ cleanValue = cleanValue.split(":")[0];
557
+ }
558
+ if (cleanValue.indexOf("#") >= 0) {
559
+ cleanValue = cleanValue.split("#")[1];
560
+ }
561
+ return cleanValue;
562
+ }, "sanitizeErrorCode");
563
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
564
+ if (headerKey !== void 0) {
565
+ return sanitizeErrorCode(output.headers[headerKey]);
566
+ }
567
+ if (data.code !== void 0) {
568
+ return sanitizeErrorCode(data.code);
569
+ }
570
+ if (data["__type"] !== void 0) {
571
+ return sanitizeErrorCode(data["__type"]);
572
+ }
573
+ }, "loadRestJsonErrorCode");
574
+
575
+ // src/commands/AssumeRoleForPodIdentityCommand.ts
576
+ var _AssumeRoleForPodIdentityCommand = class _AssumeRoleForPodIdentityCommand extends import_smithy_client.Command.classBuilder().ep({
577
+ ...commonParams
578
+ }).m(function(Command, cs, config, o) {
579
+ return [
580
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
581
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
582
+ ];
583
+ }).s("EKSAuthFrontend", "AssumeRoleForPodIdentity", {}).n("EKSAuthClient", "AssumeRoleForPodIdentityCommand").f(AssumeRoleForPodIdentityRequestFilterSensitiveLog, AssumeRoleForPodIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleForPodIdentityCommand).de(de_AssumeRoleForPodIdentityCommand).build() {
584
+ };
585
+ __name(_AssumeRoleForPodIdentityCommand, "AssumeRoleForPodIdentityCommand");
586
+ var AssumeRoleForPodIdentityCommand = _AssumeRoleForPodIdentityCommand;
587
+
588
+ // src/EKSAuth.ts
589
+ var commands = {
590
+ AssumeRoleForPodIdentityCommand
591
+ };
592
+ var _EKSAuth = class _EKSAuth extends EKSAuthClient {
593
+ };
594
+ __name(_EKSAuth, "EKSAuth");
595
+ var EKSAuth = _EKSAuth;
596
+ (0, import_smithy_client.createAggregatedClient)(commands, EKSAuth);
597
+
598
+ // src/index.ts
599
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
600
+ // Annotate the CommonJS export names for ESM import in node:
601
+
602
+ 0 && (module.exports = {
603
+ $Command,
604
+ AccessDeniedException,
605
+ AssumeRoleForPodIdentityCommand,
606
+ AssumeRoleForPodIdentityRequestFilterSensitiveLog,
607
+ AssumeRoleForPodIdentityResponseFilterSensitiveLog,
608
+ CredentialsFilterSensitiveLog,
609
+ EKSAuth,
610
+ EKSAuthClient,
611
+ EKSAuthServiceException,
612
+ ExpiredTokenException,
613
+ InternalServerException,
614
+ InvalidParameterException,
615
+ InvalidRequestException,
616
+ InvalidTokenException,
617
+ ResourceNotFoundException,
618
+ ServiceUnavailableException,
619
+ ThrottlingException,
620
+ __Client,
621
+ __MetadataBearer
622
+ });
623
+
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EKSAuthServiceException = exports.__ServiceException = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
- class EKSAuthServiceException extends smithy_client_1.ServiceException {
7
- constructor(options) {
8
- super(options);
9
- Object.setPrototypeOf(this, EKSAuthServiceException.prototype);
10
- }
11
- }
12
- exports.EKSAuthServiceException = EKSAuthServiceException;
1
+ module.exports = require("../index.js");
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./models_0"), exports);
1
+ module.exports = require("../index.js");
@@ -1,136 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssumeRoleForPodIdentityResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.AssumeRoleForPodIdentityRequestFilterSensitiveLog = exports.ThrottlingException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.InvalidTokenException = exports.InvalidRequestException = exports.InvalidParameterException = exports.InternalServerException = exports.ExpiredTokenException = exports.AccessDeniedException = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- const EKSAuthServiceException_1 = require("./EKSAuthServiceException");
6
- class AccessDeniedException extends EKSAuthServiceException_1.EKSAuthServiceException {
7
- constructor(opts) {
8
- super({
9
- name: "AccessDeniedException",
10
- $fault: "client",
11
- ...opts,
12
- });
13
- this.name = "AccessDeniedException";
14
- this.$fault = "client";
15
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
16
- }
17
- }
18
- exports.AccessDeniedException = AccessDeniedException;
19
- class ExpiredTokenException extends EKSAuthServiceException_1.EKSAuthServiceException {
20
- constructor(opts) {
21
- super({
22
- name: "ExpiredTokenException",
23
- $fault: "client",
24
- ...opts,
25
- });
26
- this.name = "ExpiredTokenException";
27
- this.$fault = "client";
28
- Object.setPrototypeOf(this, ExpiredTokenException.prototype);
29
- }
30
- }
31
- exports.ExpiredTokenException = ExpiredTokenException;
32
- class InternalServerException extends EKSAuthServiceException_1.EKSAuthServiceException {
33
- constructor(opts) {
34
- super({
35
- name: "InternalServerException",
36
- $fault: "server",
37
- ...opts,
38
- });
39
- this.name = "InternalServerException";
40
- this.$fault = "server";
41
- Object.setPrototypeOf(this, InternalServerException.prototype);
42
- }
43
- }
44
- exports.InternalServerException = InternalServerException;
45
- class InvalidParameterException extends EKSAuthServiceException_1.EKSAuthServiceException {
46
- constructor(opts) {
47
- super({
48
- name: "InvalidParameterException",
49
- $fault: "client",
50
- ...opts,
51
- });
52
- this.name = "InvalidParameterException";
53
- this.$fault = "client";
54
- Object.setPrototypeOf(this, InvalidParameterException.prototype);
55
- }
56
- }
57
- exports.InvalidParameterException = InvalidParameterException;
58
- class InvalidRequestException extends EKSAuthServiceException_1.EKSAuthServiceException {
59
- constructor(opts) {
60
- super({
61
- name: "InvalidRequestException",
62
- $fault: "client",
63
- ...opts,
64
- });
65
- this.name = "InvalidRequestException";
66
- this.$fault = "client";
67
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
68
- }
69
- }
70
- exports.InvalidRequestException = InvalidRequestException;
71
- class InvalidTokenException extends EKSAuthServiceException_1.EKSAuthServiceException {
72
- constructor(opts) {
73
- super({
74
- name: "InvalidTokenException",
75
- $fault: "client",
76
- ...opts,
77
- });
78
- this.name = "InvalidTokenException";
79
- this.$fault = "client";
80
- Object.setPrototypeOf(this, InvalidTokenException.prototype);
81
- }
82
- }
83
- exports.InvalidTokenException = InvalidTokenException;
84
- class ResourceNotFoundException extends EKSAuthServiceException_1.EKSAuthServiceException {
85
- constructor(opts) {
86
- super({
87
- name: "ResourceNotFoundException",
88
- $fault: "client",
89
- ...opts,
90
- });
91
- this.name = "ResourceNotFoundException";
92
- this.$fault = "client";
93
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
94
- }
95
- }
96
- exports.ResourceNotFoundException = ResourceNotFoundException;
97
- class ServiceUnavailableException extends EKSAuthServiceException_1.EKSAuthServiceException {
98
- constructor(opts) {
99
- super({
100
- name: "ServiceUnavailableException",
101
- $fault: "server",
102
- ...opts,
103
- });
104
- this.name = "ServiceUnavailableException";
105
- this.$fault = "server";
106
- Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
107
- }
108
- }
109
- exports.ServiceUnavailableException = ServiceUnavailableException;
110
- class ThrottlingException extends EKSAuthServiceException_1.EKSAuthServiceException {
111
- constructor(opts) {
112
- super({
113
- name: "ThrottlingException",
114
- $fault: "client",
115
- ...opts,
116
- });
117
- this.name = "ThrottlingException";
118
- this.$fault = "client";
119
- Object.setPrototypeOf(this, ThrottlingException.prototype);
120
- }
121
- }
122
- exports.ThrottlingException = ThrottlingException;
123
- const AssumeRoleForPodIdentityRequestFilterSensitiveLog = (obj) => ({
124
- ...obj,
125
- ...(obj.token && { token: smithy_client_1.SENSITIVE_STRING }),
126
- });
127
- exports.AssumeRoleForPodIdentityRequestFilterSensitiveLog = AssumeRoleForPodIdentityRequestFilterSensitiveLog;
128
- const CredentialsFilterSensitiveLog = (obj) => ({
129
- ...obj,
130
- });
131
- exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog;
132
- const AssumeRoleForPodIdentityResponseFilterSensitiveLog = (obj) => ({
133
- ...obj,
134
- ...(obj.credentials && { credentials: smithy_client_1.SENSITIVE_STRING }),
135
- });
136
- exports.AssumeRoleForPodIdentityResponseFilterSensitiveLog = AssumeRoleForPodIdentityResponseFilterSensitiveLog;
1
+ module.exports = require("../index.js");
@@ -1,262 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_AssumeRoleForPodIdentityCommand = exports.se_AssumeRoleForPodIdentityCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const EKSAuthServiceException_1 = require("../models/EKSAuthServiceException");
7
- const models_0_1 = require("../models/models_0");
8
- const se_AssumeRoleForPodIdentityCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/clusters/{clusterName}/assume-role-for-pod-identity");
14
- b.p("clusterName", () => input.clusterName, "{clusterName}", false);
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- token: [],
18
- }));
19
- b.m("POST").h(headers).b(body);
20
- return b.build();
21
- };
22
- exports.se_AssumeRoleForPodIdentityCommand = se_AssumeRoleForPodIdentityCommand;
23
- const de_AssumeRoleForPodIdentityCommand = async (output, context) => {
24
- if (output.statusCode !== 200 && output.statusCode >= 300) {
25
- return de_AssumeRoleForPodIdentityCommandError(output, context);
26
- }
27
- const contents = (0, smithy_client_1.map)({
28
- $metadata: deserializeMetadata(output),
29
- });
30
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
31
- const doc = (0, smithy_client_1.take)(data, {
32
- assumedRoleUser: smithy_client_1._json,
33
- audience: smithy_client_1.expectString,
34
- credentials: (_) => de_Credentials(_, context),
35
- podIdentityAssociation: smithy_client_1._json,
36
- subject: smithy_client_1._json,
37
- });
38
- Object.assign(contents, doc);
39
- return contents;
40
- };
41
- exports.de_AssumeRoleForPodIdentityCommand = de_AssumeRoleForPodIdentityCommand;
42
- const de_AssumeRoleForPodIdentityCommandError = async (output, context) => {
43
- const parsedOutput = {
44
- ...output,
45
- body: await parseErrorBody(output.body, context),
46
- };
47
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
48
- switch (errorCode) {
49
- case "AccessDeniedException":
50
- case "com.amazonaws.eksauth#AccessDeniedException":
51
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
52
- case "ExpiredTokenException":
53
- case "com.amazonaws.eksauth#ExpiredTokenException":
54
- throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
55
- case "InternalServerException":
56
- case "com.amazonaws.eksauth#InternalServerException":
57
- throw await de_InternalServerExceptionRes(parsedOutput, context);
58
- case "InvalidParameterException":
59
- case "com.amazonaws.eksauth#InvalidParameterException":
60
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
61
- case "InvalidRequestException":
62
- case "com.amazonaws.eksauth#InvalidRequestException":
63
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
64
- case "InvalidTokenException":
65
- case "com.amazonaws.eksauth#InvalidTokenException":
66
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
67
- case "ResourceNotFoundException":
68
- case "com.amazonaws.eksauth#ResourceNotFoundException":
69
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
70
- case "ServiceUnavailableException":
71
- case "com.amazonaws.eksauth#ServiceUnavailableException":
72
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
73
- case "ThrottlingException":
74
- case "com.amazonaws.eksauth#ThrottlingException":
75
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
76
- default:
77
- const parsedBody = parsedOutput.body;
78
- return throwDefaultError({
79
- output,
80
- parsedBody,
81
- errorCode,
82
- });
83
- }
84
- };
85
- const throwDefaultError = (0, smithy_client_1.withBaseException)(EKSAuthServiceException_1.EKSAuthServiceException);
86
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
87
- const contents = (0, smithy_client_1.map)({});
88
- const data = parsedOutput.body;
89
- const doc = (0, smithy_client_1.take)(data, {
90
- message: smithy_client_1.expectString,
91
- });
92
- Object.assign(contents, doc);
93
- const exception = new models_0_1.AccessDeniedException({
94
- $metadata: deserializeMetadata(parsedOutput),
95
- ...contents,
96
- });
97
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
98
- };
99
- const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
100
- const contents = (0, smithy_client_1.map)({});
101
- const data = parsedOutput.body;
102
- const doc = (0, smithy_client_1.take)(data, {
103
- message: smithy_client_1.expectString,
104
- });
105
- Object.assign(contents, doc);
106
- const exception = new models_0_1.ExpiredTokenException({
107
- $metadata: deserializeMetadata(parsedOutput),
108
- ...contents,
109
- });
110
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
111
- };
112
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
113
- const contents = (0, smithy_client_1.map)({});
114
- const data = parsedOutput.body;
115
- const doc = (0, smithy_client_1.take)(data, {
116
- message: smithy_client_1.expectString,
117
- });
118
- Object.assign(contents, doc);
119
- const exception = new models_0_1.InternalServerException({
120
- $metadata: deserializeMetadata(parsedOutput),
121
- ...contents,
122
- });
123
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
124
- };
125
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
126
- const contents = (0, smithy_client_1.map)({});
127
- const data = parsedOutput.body;
128
- const doc = (0, smithy_client_1.take)(data, {
129
- message: smithy_client_1.expectString,
130
- });
131
- Object.assign(contents, doc);
132
- const exception = new models_0_1.InvalidParameterException({
133
- $metadata: deserializeMetadata(parsedOutput),
134
- ...contents,
135
- });
136
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
137
- };
138
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
139
- const contents = (0, smithy_client_1.map)({});
140
- const data = parsedOutput.body;
141
- const doc = (0, smithy_client_1.take)(data, {
142
- message: smithy_client_1.expectString,
143
- });
144
- Object.assign(contents, doc);
145
- const exception = new models_0_1.InvalidRequestException({
146
- $metadata: deserializeMetadata(parsedOutput),
147
- ...contents,
148
- });
149
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
150
- };
151
- const de_InvalidTokenExceptionRes = async (parsedOutput, context) => {
152
- const contents = (0, smithy_client_1.map)({});
153
- const data = parsedOutput.body;
154
- const doc = (0, smithy_client_1.take)(data, {
155
- message: smithy_client_1.expectString,
156
- });
157
- Object.assign(contents, doc);
158
- const exception = new models_0_1.InvalidTokenException({
159
- $metadata: deserializeMetadata(parsedOutput),
160
- ...contents,
161
- });
162
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
163
- };
164
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
165
- const contents = (0, smithy_client_1.map)({});
166
- const data = parsedOutput.body;
167
- const doc = (0, smithy_client_1.take)(data, {
168
- message: smithy_client_1.expectString,
169
- });
170
- Object.assign(contents, doc);
171
- const exception = new models_0_1.ResourceNotFoundException({
172
- $metadata: deserializeMetadata(parsedOutput),
173
- ...contents,
174
- });
175
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
176
- };
177
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
178
- const contents = (0, smithy_client_1.map)({});
179
- const data = parsedOutput.body;
180
- const doc = (0, smithy_client_1.take)(data, {
181
- message: smithy_client_1.expectString,
182
- });
183
- Object.assign(contents, doc);
184
- const exception = new models_0_1.ServiceUnavailableException({
185
- $metadata: deserializeMetadata(parsedOutput),
186
- ...contents,
187
- });
188
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
189
- };
190
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
191
- const contents = (0, smithy_client_1.map)({});
192
- const data = parsedOutput.body;
193
- const doc = (0, smithy_client_1.take)(data, {
194
- message: smithy_client_1.expectString,
195
- });
196
- Object.assign(contents, doc);
197
- const exception = new models_0_1.ThrottlingException({
198
- $metadata: deserializeMetadata(parsedOutput),
199
- ...contents,
200
- });
201
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
202
- };
203
- const de_Credentials = (output, context) => {
204
- return (0, smithy_client_1.take)(output, {
205
- accessKeyId: smithy_client_1.expectString,
206
- expiration: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
207
- secretAccessKey: smithy_client_1.expectString,
208
- sessionToken: smithy_client_1.expectString,
209
- });
210
- };
211
- const deserializeMetadata = (output) => ({
212
- httpStatusCode: output.statusCode,
213
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
214
- extendedRequestId: output.headers["x-amz-id-2"],
215
- cfId: output.headers["x-amz-cf-id"],
216
- });
217
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
218
- const isSerializableHeaderValue = (value) => value !== undefined &&
219
- value !== null &&
220
- value !== "" &&
221
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
222
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
223
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
224
- if (encoded.length) {
225
- return JSON.parse(encoded);
226
- }
227
- return {};
228
- });
229
- const parseErrorBody = async (errorBody, context) => {
230
- const value = await parseBody(errorBody, context);
231
- value.message = value.message ?? value.Message;
232
- return value;
233
- };
234
- const loadRestJsonErrorCode = (output, data) => {
235
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
236
- const sanitizeErrorCode = (rawValue) => {
237
- let cleanValue = rawValue;
238
- if (typeof cleanValue === "number") {
239
- cleanValue = cleanValue.toString();
240
- }
241
- if (cleanValue.indexOf(",") >= 0) {
242
- cleanValue = cleanValue.split(",")[0];
243
- }
244
- if (cleanValue.indexOf(":") >= 0) {
245
- cleanValue = cleanValue.split(":")[0];
246
- }
247
- if (cleanValue.indexOf("#") >= 0) {
248
- cleanValue = cleanValue.split("#")[1];
249
- }
250
- return cleanValue;
251
- };
252
- const headerKey = findKey(output.headers, "x-amzn-errortype");
253
- if (headerKey !== undefined) {
254
- return sanitizeErrorCode(output.headers[headerKey]);
255
- }
256
- if (data.code !== undefined) {
257
- return sanitizeErrorCode(data.code);
258
- }
259
- if (data["__type"] !== undefined) {
260
- return sanitizeErrorCode(data["__type"]);
261
- }
262
- };
1
+ module.exports = require("../index.js");
@@ -1,22 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRuntimeExtensions = void 0;
4
- const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const asPartial = (t) => t;
8
- const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
- const extensionConfiguration = {
10
- ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
13
- };
14
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
- return {
16
- ...runtimeConfig,
17
- ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
20
- };
21
- };
22
- exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
1
+ module.exports = require("./index.js");
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-eks-auth",
3
3
  "description": "AWS SDK for JavaScript Eks Auth Client for Node.js, Browser and React Native",
4
- "version": "3.490.0",
4
+ "version": "3.496.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
- "build:cjs": "tsc -p tsconfig.cjs.json",
7
+ "build:cjs": "node ../../scripts/compilation/inline client-eks-auth",
8
8
  "build:es": "tsc -p tsconfig.es.json",
9
9
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
10
10
  "build:types": "tsc -p tsconfig.types.json",
@@ -20,47 +20,47 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.490.0",
24
- "@aws-sdk/core": "3.490.0",
25
- "@aws-sdk/credential-provider-node": "3.490.0",
26
- "@aws-sdk/middleware-host-header": "3.489.0",
27
- "@aws-sdk/middleware-logger": "3.489.0",
28
- "@aws-sdk/middleware-recursion-detection": "3.489.0",
29
- "@aws-sdk/middleware-signing": "3.489.0",
30
- "@aws-sdk/middleware-user-agent": "3.489.0",
31
- "@aws-sdk/region-config-resolver": "3.489.0",
32
- "@aws-sdk/types": "3.489.0",
33
- "@aws-sdk/util-endpoints": "3.489.0",
34
- "@aws-sdk/util-user-agent-browser": "3.489.0",
35
- "@aws-sdk/util-user-agent-node": "3.489.0",
36
- "@smithy/config-resolver": "^2.0.23",
37
- "@smithy/core": "^1.2.2",
38
- "@smithy/fetch-http-handler": "^2.3.2",
39
- "@smithy/hash-node": "^2.0.18",
40
- "@smithy/invalid-dependency": "^2.0.16",
41
- "@smithy/middleware-content-length": "^2.0.18",
42
- "@smithy/middleware-endpoint": "^2.3.0",
43
- "@smithy/middleware-retry": "^2.0.26",
44
- "@smithy/middleware-serde": "^2.0.16",
45
- "@smithy/middleware-stack": "^2.0.10",
46
- "@smithy/node-config-provider": "^2.1.9",
47
- "@smithy/node-http-handler": "^2.2.2",
48
- "@smithy/protocol-http": "^3.0.12",
49
- "@smithy/smithy-client": "^2.2.1",
50
- "@smithy/types": "^2.8.0",
51
- "@smithy/url-parser": "^2.0.16",
52
- "@smithy/util-base64": "^2.0.1",
53
- "@smithy/util-body-length-browser": "^2.0.1",
54
- "@smithy/util-body-length-node": "^2.1.0",
55
- "@smithy/util-defaults-mode-browser": "^2.0.24",
56
- "@smithy/util-defaults-mode-node": "^2.0.32",
57
- "@smithy/util-endpoints": "^1.0.8",
58
- "@smithy/util-retry": "^2.0.9",
59
- "@smithy/util-utf8": "^2.0.2",
23
+ "@aws-sdk/client-sts": "3.496.0",
24
+ "@aws-sdk/core": "3.496.0",
25
+ "@aws-sdk/credential-provider-node": "3.496.0",
26
+ "@aws-sdk/middleware-host-header": "3.496.0",
27
+ "@aws-sdk/middleware-logger": "3.496.0",
28
+ "@aws-sdk/middleware-recursion-detection": "3.496.0",
29
+ "@aws-sdk/middleware-signing": "3.496.0",
30
+ "@aws-sdk/middleware-user-agent": "3.496.0",
31
+ "@aws-sdk/region-config-resolver": "3.496.0",
32
+ "@aws-sdk/types": "3.496.0",
33
+ "@aws-sdk/util-endpoints": "3.496.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.496.0",
35
+ "@aws-sdk/util-user-agent-node": "3.496.0",
36
+ "@smithy/config-resolver": "^2.1.1",
37
+ "@smithy/core": "^1.3.1",
38
+ "@smithy/fetch-http-handler": "^2.4.1",
39
+ "@smithy/hash-node": "^2.1.1",
40
+ "@smithy/invalid-dependency": "^2.1.1",
41
+ "@smithy/middleware-content-length": "^2.1.1",
42
+ "@smithy/middleware-endpoint": "^2.4.1",
43
+ "@smithy/middleware-retry": "^2.1.1",
44
+ "@smithy/middleware-serde": "^2.1.1",
45
+ "@smithy/middleware-stack": "^2.1.1",
46
+ "@smithy/node-config-provider": "^2.2.1",
47
+ "@smithy/node-http-handler": "^2.3.1",
48
+ "@smithy/protocol-http": "^3.1.1",
49
+ "@smithy/smithy-client": "^2.3.1",
50
+ "@smithy/types": "^2.9.1",
51
+ "@smithy/url-parser": "^2.1.1",
52
+ "@smithy/util-base64": "^2.1.1",
53
+ "@smithy/util-body-length-browser": "^2.1.1",
54
+ "@smithy/util-body-length-node": "^2.2.1",
55
+ "@smithy/util-defaults-mode-browser": "^2.1.1",
56
+ "@smithy/util-defaults-mode-node": "^2.1.1",
57
+ "@smithy/util-endpoints": "^1.1.1",
58
+ "@smithy/util-retry": "^2.1.1",
59
+ "@smithy/util-utf8": "^2.1.1",
60
60
  "tslib": "^2.5.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@smithy/service-client-documentation-generator": "^2.0.0",
63
+ "@smithy/service-client-documentation-generator": "^2.1.1",
64
64
  "@tsconfig/node14": "1.0.3",
65
65
  "@types/node": "^14.14.31",
66
66
  "concurrently": "7.0.0",