@aws-sdk/client-route53-recovery-cluster 3.489.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,790 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Route53RecoveryClusterServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./Route53RecoveryClusterClient"), exports);
6
- tslib_1.__exportStar(require("./Route53RecoveryCluster"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var Route53RecoveryClusterServiceException_1 = require("./models/Route53RecoveryClusterServiceException");
12
- Object.defineProperty(exports, "Route53RecoveryClusterServiceException", { enumerable: true, get: function () { return Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException; } });
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
+ AccessDeniedException: () => AccessDeniedException,
25
+ ConflictException: () => ConflictException,
26
+ EndpointTemporarilyUnavailableException: () => EndpointTemporarilyUnavailableException,
27
+ GetRoutingControlStateCommand: () => GetRoutingControlStateCommand,
28
+ InternalServerException: () => InternalServerException,
29
+ ListRoutingControlsCommand: () => ListRoutingControlsCommand,
30
+ ResourceNotFoundException: () => ResourceNotFoundException,
31
+ Route53RecoveryCluster: () => Route53RecoveryCluster,
32
+ Route53RecoveryClusterClient: () => Route53RecoveryClusterClient,
33
+ Route53RecoveryClusterServiceException: () => Route53RecoveryClusterServiceException,
34
+ RoutingControlState: () => RoutingControlState,
35
+ ServiceLimitExceededException: () => ServiceLimitExceededException,
36
+ ThrottlingException: () => ThrottlingException,
37
+ UpdateRoutingControlStateCommand: () => UpdateRoutingControlStateCommand,
38
+ UpdateRoutingControlStatesCommand: () => UpdateRoutingControlStatesCommand,
39
+ ValidationException: () => ValidationException,
40
+ ValidationExceptionReason: () => ValidationExceptionReason,
41
+ __Client: () => import_smithy_client.Client,
42
+ paginateListRoutingControls: () => paginateListRoutingControls
43
+ });
44
+ module.exports = __toCommonJS(src_exports);
45
+
46
+ // src/Route53RecoveryClusterClient.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
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
63
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
64
+ defaultSigningName: "route53-recovery-cluster"
65
+ };
66
+ }, "resolveClientEndpointParameters");
67
+ var commonParams = {
68
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
69
+ Endpoint: { type: "builtInParams", name: "endpoint" },
70
+ Region: { type: "builtInParams", name: "region" },
71
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
72
+ };
73
+
74
+ // src/Route53RecoveryClusterClient.ts
75
+ var import_runtimeConfig = require("././runtimeConfig");
76
+
77
+ // src/runtimeExtensions.ts
78
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
79
+ var import_protocol_http = require("@smithy/protocol-http");
80
+ var import_smithy_client = require("@smithy/smithy-client");
81
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
82
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
83
+ const extensionConfiguration = {
84
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
85
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
86
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
87
+ };
88
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
89
+ return {
90
+ ...runtimeConfig,
91
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
92
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
93
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
94
+ };
95
+ }, "resolveRuntimeExtensions");
96
+
97
+ // src/Route53RecoveryClusterClient.ts
98
+ var _Route53RecoveryClusterClient = class _Route53RecoveryClusterClient extends import_smithy_client.Client {
99
+ constructor(...[configuration]) {
100
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
101
+ const _config_1 = resolveClientEndpointParameters(_config_0);
102
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
103
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
104
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
105
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
106
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
107
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
108
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
109
+ super(_config_8);
110
+ this.config = _config_8;
111
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
113
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
114
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
115
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
116
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
117
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
118
+ }
119
+ /**
120
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
121
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
122
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
123
+ */
124
+ destroy() {
125
+ super.destroy();
126
+ }
127
+ };
128
+ __name(_Route53RecoveryClusterClient, "Route53RecoveryClusterClient");
129
+ var Route53RecoveryClusterClient = _Route53RecoveryClusterClient;
130
+
131
+ // src/Route53RecoveryCluster.ts
132
+
133
+
134
+ // src/commands/GetRoutingControlStateCommand.ts
135
+
136
+ var import_middleware_serde = require("@smithy/middleware-serde");
137
+
138
+ var import_types = require("@smithy/types");
139
+
140
+ // src/protocols/Aws_json1_0.ts
141
+
142
+
143
+
144
+ // src/models/Route53RecoveryClusterServiceException.ts
145
+
146
+ var _Route53RecoveryClusterServiceException = class _Route53RecoveryClusterServiceException extends import_smithy_client.ServiceException {
147
+ /**
148
+ * @internal
149
+ */
150
+ constructor(options) {
151
+ super(options);
152
+ Object.setPrototypeOf(this, _Route53RecoveryClusterServiceException.prototype);
153
+ }
154
+ };
155
+ __name(_Route53RecoveryClusterServiceException, "Route53RecoveryClusterServiceException");
156
+ var Route53RecoveryClusterServiceException = _Route53RecoveryClusterServiceException;
157
+
158
+ // src/models/models_0.ts
159
+ var _AccessDeniedException = class _AccessDeniedException extends Route53RecoveryClusterServiceException {
160
+ /**
161
+ * @internal
162
+ */
163
+ constructor(opts) {
164
+ super({
165
+ name: "AccessDeniedException",
166
+ $fault: "client",
167
+ ...opts
168
+ });
169
+ this.name = "AccessDeniedException";
170
+ this.$fault = "client";
171
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
172
+ }
173
+ };
174
+ __name(_AccessDeniedException, "AccessDeniedException");
175
+ var AccessDeniedException = _AccessDeniedException;
176
+ var _ConflictException = class _ConflictException extends Route53RecoveryClusterServiceException {
177
+ /**
178
+ * @internal
179
+ */
180
+ constructor(opts) {
181
+ super({
182
+ name: "ConflictException",
183
+ $fault: "client",
184
+ ...opts
185
+ });
186
+ this.name = "ConflictException";
187
+ this.$fault = "client";
188
+ Object.setPrototypeOf(this, _ConflictException.prototype);
189
+ this.resourceId = opts.resourceId;
190
+ this.resourceType = opts.resourceType;
191
+ }
192
+ };
193
+ __name(_ConflictException, "ConflictException");
194
+ var ConflictException = _ConflictException;
195
+ var _EndpointTemporarilyUnavailableException = class _EndpointTemporarilyUnavailableException extends Route53RecoveryClusterServiceException {
196
+ /**
197
+ * @internal
198
+ */
199
+ constructor(opts) {
200
+ super({
201
+ name: "EndpointTemporarilyUnavailableException",
202
+ $fault: "server",
203
+ ...opts
204
+ });
205
+ this.name = "EndpointTemporarilyUnavailableException";
206
+ this.$fault = "server";
207
+ Object.setPrototypeOf(this, _EndpointTemporarilyUnavailableException.prototype);
208
+ }
209
+ };
210
+ __name(_EndpointTemporarilyUnavailableException, "EndpointTemporarilyUnavailableException");
211
+ var EndpointTemporarilyUnavailableException = _EndpointTemporarilyUnavailableException;
212
+ var RoutingControlState = {
213
+ Off: "Off",
214
+ On: "On"
215
+ };
216
+ var _InternalServerException = class _InternalServerException extends Route53RecoveryClusterServiceException {
217
+ /**
218
+ * @internal
219
+ */
220
+ constructor(opts) {
221
+ super({
222
+ name: "InternalServerException",
223
+ $fault: "server",
224
+ ...opts
225
+ });
226
+ this.name = "InternalServerException";
227
+ this.$fault = "server";
228
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
229
+ this.retryAfterSeconds = opts.retryAfterSeconds;
230
+ }
231
+ };
232
+ __name(_InternalServerException, "InternalServerException");
233
+ var InternalServerException = _InternalServerException;
234
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends Route53RecoveryClusterServiceException {
235
+ /**
236
+ * @internal
237
+ */
238
+ constructor(opts) {
239
+ super({
240
+ name: "ResourceNotFoundException",
241
+ $fault: "client",
242
+ ...opts
243
+ });
244
+ this.name = "ResourceNotFoundException";
245
+ this.$fault = "client";
246
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
247
+ this.resourceId = opts.resourceId;
248
+ this.resourceType = opts.resourceType;
249
+ }
250
+ };
251
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
252
+ var ResourceNotFoundException = _ResourceNotFoundException;
253
+ var _ThrottlingException = class _ThrottlingException extends Route53RecoveryClusterServiceException {
254
+ /**
255
+ * @internal
256
+ */
257
+ constructor(opts) {
258
+ super({
259
+ name: "ThrottlingException",
260
+ $fault: "client",
261
+ ...opts
262
+ });
263
+ this.name = "ThrottlingException";
264
+ this.$fault = "client";
265
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
266
+ this.retryAfterSeconds = opts.retryAfterSeconds;
267
+ }
268
+ };
269
+ __name(_ThrottlingException, "ThrottlingException");
270
+ var ThrottlingException = _ThrottlingException;
271
+ var ValidationExceptionReason = {
272
+ CANNOT_PARSE: "cannotParse",
273
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
274
+ OTHER: "other",
275
+ UNKNOWN_OPERATION: "unknownOperation"
276
+ };
277
+ var _ValidationException = class _ValidationException extends Route53RecoveryClusterServiceException {
278
+ /**
279
+ * @internal
280
+ */
281
+ constructor(opts) {
282
+ super({
283
+ name: "ValidationException",
284
+ $fault: "client",
285
+ ...opts
286
+ });
287
+ this.name = "ValidationException";
288
+ this.$fault = "client";
289
+ Object.setPrototypeOf(this, _ValidationException.prototype);
290
+ this.reason = opts.reason;
291
+ this.fields = opts.fields;
292
+ }
293
+ };
294
+ __name(_ValidationException, "ValidationException");
295
+ var ValidationException = _ValidationException;
296
+ var _ServiceLimitExceededException = class _ServiceLimitExceededException extends Route53RecoveryClusterServiceException {
297
+ /**
298
+ * @internal
299
+ */
300
+ constructor(opts) {
301
+ super({
302
+ name: "ServiceLimitExceededException",
303
+ $fault: "client",
304
+ ...opts
305
+ });
306
+ this.name = "ServiceLimitExceededException";
307
+ this.$fault = "client";
308
+ Object.setPrototypeOf(this, _ServiceLimitExceededException.prototype);
309
+ this.resourceId = opts.resourceId;
310
+ this.resourceType = opts.resourceType;
311
+ this.limitCode = opts.limitCode;
312
+ this.serviceCode = opts.serviceCode;
313
+ }
314
+ };
315
+ __name(_ServiceLimitExceededException, "ServiceLimitExceededException");
316
+ var ServiceLimitExceededException = _ServiceLimitExceededException;
317
+
318
+ // src/protocols/Aws_json1_0.ts
319
+ var se_GetRoutingControlStateCommand = /* @__PURE__ */ __name(async (input, context) => {
320
+ const headers = sharedHeaders("GetRoutingControlState");
321
+ let body;
322
+ body = JSON.stringify((0, import_smithy_client._json)(input));
323
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
324
+ }, "se_GetRoutingControlStateCommand");
325
+ var se_ListRoutingControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
326
+ const headers = sharedHeaders("ListRoutingControls");
327
+ let body;
328
+ body = JSON.stringify((0, import_smithy_client._json)(input));
329
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
330
+ }, "se_ListRoutingControlsCommand");
331
+ var se_UpdateRoutingControlStateCommand = /* @__PURE__ */ __name(async (input, context) => {
332
+ const headers = sharedHeaders("UpdateRoutingControlState");
333
+ let body;
334
+ body = JSON.stringify((0, import_smithy_client._json)(input));
335
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
336
+ }, "se_UpdateRoutingControlStateCommand");
337
+ var se_UpdateRoutingControlStatesCommand = /* @__PURE__ */ __name(async (input, context) => {
338
+ const headers = sharedHeaders("UpdateRoutingControlStates");
339
+ let body;
340
+ body = JSON.stringify((0, import_smithy_client._json)(input));
341
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
342
+ }, "se_UpdateRoutingControlStatesCommand");
343
+ var de_GetRoutingControlStateCommand = /* @__PURE__ */ __name(async (output, context) => {
344
+ if (output.statusCode >= 300) {
345
+ return de_GetRoutingControlStateCommandError(output, context);
346
+ }
347
+ const data = await parseBody(output.body, context);
348
+ let contents = {};
349
+ contents = (0, import_smithy_client._json)(data);
350
+ const response = {
351
+ $metadata: deserializeMetadata(output),
352
+ ...contents
353
+ };
354
+ return response;
355
+ }, "de_GetRoutingControlStateCommand");
356
+ var de_GetRoutingControlStateCommandError = /* @__PURE__ */ __name(async (output, context) => {
357
+ const parsedOutput = {
358
+ ...output,
359
+ body: await parseErrorBody(output.body, context)
360
+ };
361
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
362
+ switch (errorCode) {
363
+ case "AccessDeniedException":
364
+ case "com.amazonaws.route53recoverycluster#AccessDeniedException":
365
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
366
+ case "EndpointTemporarilyUnavailableException":
367
+ case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
368
+ throw await de_EndpointTemporarilyUnavailableExceptionRes(parsedOutput, context);
369
+ case "InternalServerException":
370
+ case "com.amazonaws.route53recoverycluster#InternalServerException":
371
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
372
+ case "ResourceNotFoundException":
373
+ case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
374
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
375
+ case "ThrottlingException":
376
+ case "com.amazonaws.route53recoverycluster#ThrottlingException":
377
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
378
+ case "ValidationException":
379
+ case "com.amazonaws.route53recoverycluster#ValidationException":
380
+ throw await de_ValidationExceptionRes(parsedOutput, context);
381
+ default:
382
+ const parsedBody = parsedOutput.body;
383
+ return throwDefaultError({
384
+ output,
385
+ parsedBody,
386
+ errorCode
387
+ });
388
+ }
389
+ }, "de_GetRoutingControlStateCommandError");
390
+ var de_ListRoutingControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
391
+ if (output.statusCode >= 300) {
392
+ return de_ListRoutingControlsCommandError(output, context);
393
+ }
394
+ const data = await parseBody(output.body, context);
395
+ let contents = {};
396
+ contents = (0, import_smithy_client._json)(data);
397
+ const response = {
398
+ $metadata: deserializeMetadata(output),
399
+ ...contents
400
+ };
401
+ return response;
402
+ }, "de_ListRoutingControlsCommand");
403
+ var de_ListRoutingControlsCommandError = /* @__PURE__ */ __name(async (output, context) => {
404
+ const parsedOutput = {
405
+ ...output,
406
+ body: await parseErrorBody(output.body, context)
407
+ };
408
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
409
+ switch (errorCode) {
410
+ case "AccessDeniedException":
411
+ case "com.amazonaws.route53recoverycluster#AccessDeniedException":
412
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
413
+ case "EndpointTemporarilyUnavailableException":
414
+ case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
415
+ throw await de_EndpointTemporarilyUnavailableExceptionRes(parsedOutput, context);
416
+ case "InternalServerException":
417
+ case "com.amazonaws.route53recoverycluster#InternalServerException":
418
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
419
+ case "ResourceNotFoundException":
420
+ case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
421
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
422
+ case "ThrottlingException":
423
+ case "com.amazonaws.route53recoverycluster#ThrottlingException":
424
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
425
+ case "ValidationException":
426
+ case "com.amazonaws.route53recoverycluster#ValidationException":
427
+ throw await de_ValidationExceptionRes(parsedOutput, context);
428
+ default:
429
+ const parsedBody = parsedOutput.body;
430
+ return throwDefaultError({
431
+ output,
432
+ parsedBody,
433
+ errorCode
434
+ });
435
+ }
436
+ }, "de_ListRoutingControlsCommandError");
437
+ var de_UpdateRoutingControlStateCommand = /* @__PURE__ */ __name(async (output, context) => {
438
+ if (output.statusCode >= 300) {
439
+ return de_UpdateRoutingControlStateCommandError(output, context);
440
+ }
441
+ const data = await parseBody(output.body, context);
442
+ let contents = {};
443
+ contents = (0, import_smithy_client._json)(data);
444
+ const response = {
445
+ $metadata: deserializeMetadata(output),
446
+ ...contents
447
+ };
448
+ return response;
449
+ }, "de_UpdateRoutingControlStateCommand");
450
+ var de_UpdateRoutingControlStateCommandError = /* @__PURE__ */ __name(async (output, context) => {
451
+ const parsedOutput = {
452
+ ...output,
453
+ body: await parseErrorBody(output.body, context)
454
+ };
455
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
456
+ switch (errorCode) {
457
+ case "AccessDeniedException":
458
+ case "com.amazonaws.route53recoverycluster#AccessDeniedException":
459
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
460
+ case "ConflictException":
461
+ case "com.amazonaws.route53recoverycluster#ConflictException":
462
+ throw await de_ConflictExceptionRes(parsedOutput, context);
463
+ case "EndpointTemporarilyUnavailableException":
464
+ case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
465
+ throw await de_EndpointTemporarilyUnavailableExceptionRes(parsedOutput, context);
466
+ case "InternalServerException":
467
+ case "com.amazonaws.route53recoverycluster#InternalServerException":
468
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
469
+ case "ResourceNotFoundException":
470
+ case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
471
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
472
+ case "ThrottlingException":
473
+ case "com.amazonaws.route53recoverycluster#ThrottlingException":
474
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
475
+ case "ValidationException":
476
+ case "com.amazonaws.route53recoverycluster#ValidationException":
477
+ throw await de_ValidationExceptionRes(parsedOutput, context);
478
+ default:
479
+ const parsedBody = parsedOutput.body;
480
+ return throwDefaultError({
481
+ output,
482
+ parsedBody,
483
+ errorCode
484
+ });
485
+ }
486
+ }, "de_UpdateRoutingControlStateCommandError");
487
+ var de_UpdateRoutingControlStatesCommand = /* @__PURE__ */ __name(async (output, context) => {
488
+ if (output.statusCode >= 300) {
489
+ return de_UpdateRoutingControlStatesCommandError(output, context);
490
+ }
491
+ const data = await parseBody(output.body, context);
492
+ let contents = {};
493
+ contents = (0, import_smithy_client._json)(data);
494
+ const response = {
495
+ $metadata: deserializeMetadata(output),
496
+ ...contents
497
+ };
498
+ return response;
499
+ }, "de_UpdateRoutingControlStatesCommand");
500
+ var de_UpdateRoutingControlStatesCommandError = /* @__PURE__ */ __name(async (output, context) => {
501
+ const parsedOutput = {
502
+ ...output,
503
+ body: await parseErrorBody(output.body, context)
504
+ };
505
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
506
+ switch (errorCode) {
507
+ case "AccessDeniedException":
508
+ case "com.amazonaws.route53recoverycluster#AccessDeniedException":
509
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
510
+ case "ConflictException":
511
+ case "com.amazonaws.route53recoverycluster#ConflictException":
512
+ throw await de_ConflictExceptionRes(parsedOutput, context);
513
+ case "EndpointTemporarilyUnavailableException":
514
+ case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
515
+ throw await de_EndpointTemporarilyUnavailableExceptionRes(parsedOutput, context);
516
+ case "InternalServerException":
517
+ case "com.amazonaws.route53recoverycluster#InternalServerException":
518
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
519
+ case "ResourceNotFoundException":
520
+ case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
521
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
522
+ case "ServiceLimitExceededException":
523
+ case "com.amazonaws.route53recoverycluster#ServiceLimitExceededException":
524
+ throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
525
+ case "ThrottlingException":
526
+ case "com.amazonaws.route53recoverycluster#ThrottlingException":
527
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
528
+ case "ValidationException":
529
+ case "com.amazonaws.route53recoverycluster#ValidationException":
530
+ throw await de_ValidationExceptionRes(parsedOutput, context);
531
+ default:
532
+ const parsedBody = parsedOutput.body;
533
+ return throwDefaultError({
534
+ output,
535
+ parsedBody,
536
+ errorCode
537
+ });
538
+ }
539
+ }, "de_UpdateRoutingControlStatesCommandError");
540
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
541
+ const body = parsedOutput.body;
542
+ const deserialized = (0, import_smithy_client._json)(body);
543
+ const exception = new AccessDeniedException({
544
+ $metadata: deserializeMetadata(parsedOutput),
545
+ ...deserialized
546
+ });
547
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
548
+ }, "de_AccessDeniedExceptionRes");
549
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
550
+ const body = parsedOutput.body;
551
+ const deserialized = (0, import_smithy_client._json)(body);
552
+ const exception = new ConflictException({
553
+ $metadata: deserializeMetadata(parsedOutput),
554
+ ...deserialized
555
+ });
556
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
557
+ }, "de_ConflictExceptionRes");
558
+ var de_EndpointTemporarilyUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
559
+ const body = parsedOutput.body;
560
+ const deserialized = (0, import_smithy_client._json)(body);
561
+ const exception = new EndpointTemporarilyUnavailableException({
562
+ $metadata: deserializeMetadata(parsedOutput),
563
+ ...deserialized
564
+ });
565
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
566
+ }, "de_EndpointTemporarilyUnavailableExceptionRes");
567
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
568
+ const body = parsedOutput.body;
569
+ const deserialized = (0, import_smithy_client._json)(body);
570
+ const exception = new InternalServerException({
571
+ $metadata: deserializeMetadata(parsedOutput),
572
+ ...deserialized
573
+ });
574
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
575
+ }, "de_InternalServerExceptionRes");
576
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
577
+ const body = parsedOutput.body;
578
+ const deserialized = (0, import_smithy_client._json)(body);
579
+ const exception = new ResourceNotFoundException({
580
+ $metadata: deserializeMetadata(parsedOutput),
581
+ ...deserialized
582
+ });
583
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
584
+ }, "de_ResourceNotFoundExceptionRes");
585
+ var de_ServiceLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
586
+ const body = parsedOutput.body;
587
+ const deserialized = (0, import_smithy_client._json)(body);
588
+ const exception = new ServiceLimitExceededException({
589
+ $metadata: deserializeMetadata(parsedOutput),
590
+ ...deserialized
591
+ });
592
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
593
+ }, "de_ServiceLimitExceededExceptionRes");
594
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
595
+ const body = parsedOutput.body;
596
+ const deserialized = (0, import_smithy_client._json)(body);
597
+ const exception = new ThrottlingException({
598
+ $metadata: deserializeMetadata(parsedOutput),
599
+ ...deserialized
600
+ });
601
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
602
+ }, "de_ThrottlingExceptionRes");
603
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
604
+ const body = parsedOutput.body;
605
+ const deserialized = (0, import_smithy_client._json)(body);
606
+ const exception = new ValidationException({
607
+ $metadata: deserializeMetadata(parsedOutput),
608
+ ...deserialized
609
+ });
610
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
611
+ }, "de_ValidationExceptionRes");
612
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
613
+ httpStatusCode: output.statusCode,
614
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
615
+ extendedRequestId: output.headers["x-amz-id-2"],
616
+ cfId: output.headers["x-amz-cf-id"]
617
+ }), "deserializeMetadata");
618
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
619
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(Route53RecoveryClusterServiceException);
620
+ var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
621
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
622
+ const contents = {
623
+ protocol,
624
+ hostname,
625
+ port,
626
+ method: "POST",
627
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
628
+ headers
629
+ };
630
+ if (resolvedHostname !== void 0) {
631
+ contents.hostname = resolvedHostname;
632
+ }
633
+ if (body !== void 0) {
634
+ contents.body = body;
635
+ }
636
+ return new import_protocol_http.HttpRequest(contents);
637
+ }, "buildHttpRpcRequest");
638
+ function sharedHeaders(operation) {
639
+ return {
640
+ "content-type": "application/x-amz-json-1.0",
641
+ "x-amz-target": `ToggleCustomerAPI.${operation}`
642
+ };
643
+ }
644
+ __name(sharedHeaders, "sharedHeaders");
645
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
646
+ if (encoded.length) {
647
+ return JSON.parse(encoded);
648
+ }
649
+ return {};
650
+ }), "parseBody");
651
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
652
+ const value = await parseBody(errorBody, context);
653
+ value.message = value.message ?? value.Message;
654
+ return value;
655
+ }, "parseErrorBody");
656
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
657
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
658
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
659
+ let cleanValue = rawValue;
660
+ if (typeof cleanValue === "number") {
661
+ cleanValue = cleanValue.toString();
662
+ }
663
+ if (cleanValue.indexOf(",") >= 0) {
664
+ cleanValue = cleanValue.split(",")[0];
665
+ }
666
+ if (cleanValue.indexOf(":") >= 0) {
667
+ cleanValue = cleanValue.split(":")[0];
668
+ }
669
+ if (cleanValue.indexOf("#") >= 0) {
670
+ cleanValue = cleanValue.split("#")[1];
671
+ }
672
+ return cleanValue;
673
+ }, "sanitizeErrorCode");
674
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
675
+ if (headerKey !== void 0) {
676
+ return sanitizeErrorCode(output.headers[headerKey]);
677
+ }
678
+ if (data.code !== void 0) {
679
+ return sanitizeErrorCode(data.code);
680
+ }
681
+ if (data["__type"] !== void 0) {
682
+ return sanitizeErrorCode(data["__type"]);
683
+ }
684
+ }, "loadRestJsonErrorCode");
685
+
686
+ // src/commands/GetRoutingControlStateCommand.ts
687
+ var _GetRoutingControlStateCommand = class _GetRoutingControlStateCommand extends import_smithy_client.Command.classBuilder().ep({
688
+ ...commonParams
689
+ }).m(function(Command, cs, config, o) {
690
+ return [
691
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
692
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
693
+ ];
694
+ }).s("ToggleCustomerAPI", "GetRoutingControlState", {}).n("Route53RecoveryClusterClient", "GetRoutingControlStateCommand").f(void 0, void 0).ser(se_GetRoutingControlStateCommand).de(de_GetRoutingControlStateCommand).build() {
695
+ };
696
+ __name(_GetRoutingControlStateCommand, "GetRoutingControlStateCommand");
697
+ var GetRoutingControlStateCommand = _GetRoutingControlStateCommand;
698
+
699
+ // src/commands/ListRoutingControlsCommand.ts
700
+
701
+
702
+
703
+
704
+ var _ListRoutingControlsCommand = class _ListRoutingControlsCommand extends import_smithy_client.Command.classBuilder().ep({
705
+ ...commonParams
706
+ }).m(function(Command, cs, config, o) {
707
+ return [
708
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
709
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
710
+ ];
711
+ }).s("ToggleCustomerAPI", "ListRoutingControls", {}).n("Route53RecoveryClusterClient", "ListRoutingControlsCommand").f(void 0, void 0).ser(se_ListRoutingControlsCommand).de(de_ListRoutingControlsCommand).build() {
712
+ };
713
+ __name(_ListRoutingControlsCommand, "ListRoutingControlsCommand");
714
+ var ListRoutingControlsCommand = _ListRoutingControlsCommand;
715
+
716
+ // src/commands/UpdateRoutingControlStateCommand.ts
717
+
718
+
719
+
720
+
721
+ var _UpdateRoutingControlStateCommand = class _UpdateRoutingControlStateCommand extends import_smithy_client.Command.classBuilder().ep({
722
+ ...commonParams
723
+ }).m(function(Command, cs, config, o) {
724
+ return [
725
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
726
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
727
+ ];
728
+ }).s("ToggleCustomerAPI", "UpdateRoutingControlState", {}).n("Route53RecoveryClusterClient", "UpdateRoutingControlStateCommand").f(void 0, void 0).ser(se_UpdateRoutingControlStateCommand).de(de_UpdateRoutingControlStateCommand).build() {
729
+ };
730
+ __name(_UpdateRoutingControlStateCommand, "UpdateRoutingControlStateCommand");
731
+ var UpdateRoutingControlStateCommand = _UpdateRoutingControlStateCommand;
732
+
733
+ // src/commands/UpdateRoutingControlStatesCommand.ts
734
+
735
+
736
+
737
+
738
+ var _UpdateRoutingControlStatesCommand = class _UpdateRoutingControlStatesCommand extends import_smithy_client.Command.classBuilder().ep({
739
+ ...commonParams
740
+ }).m(function(Command, cs, config, o) {
741
+ return [
742
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
743
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
744
+ ];
745
+ }).s("ToggleCustomerAPI", "UpdateRoutingControlStates", {}).n("Route53RecoveryClusterClient", "UpdateRoutingControlStatesCommand").f(void 0, void 0).ser(se_UpdateRoutingControlStatesCommand).de(de_UpdateRoutingControlStatesCommand).build() {
746
+ };
747
+ __name(_UpdateRoutingControlStatesCommand, "UpdateRoutingControlStatesCommand");
748
+ var UpdateRoutingControlStatesCommand = _UpdateRoutingControlStatesCommand;
749
+
750
+ // src/Route53RecoveryCluster.ts
751
+ var commands = {
752
+ GetRoutingControlStateCommand,
753
+ ListRoutingControlsCommand,
754
+ UpdateRoutingControlStateCommand,
755
+ UpdateRoutingControlStatesCommand
756
+ };
757
+ var _Route53RecoveryCluster = class _Route53RecoveryCluster extends Route53RecoveryClusterClient {
758
+ };
759
+ __name(_Route53RecoveryCluster, "Route53RecoveryCluster");
760
+ var Route53RecoveryCluster = _Route53RecoveryCluster;
761
+ (0, import_smithy_client.createAggregatedClient)(commands, Route53RecoveryCluster);
762
+
763
+ // src/pagination/ListRoutingControlsPaginator.ts
764
+ var import_core = require("@smithy/core");
765
+ var paginateListRoutingControls = (0, import_core.createPaginator)(Route53RecoveryClusterClient, ListRoutingControlsCommand, "NextToken", "NextToken", "MaxResults");
766
+
767
+ // src/index.ts
768
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
769
+ // Annotate the CommonJS export names for ESM import in node:
770
+ 0 && (module.exports = {
771
+ AccessDeniedException,
772
+ ConflictException,
773
+ EndpointTemporarilyUnavailableException,
774
+ GetRoutingControlStateCommand,
775
+ InternalServerException,
776
+ ListRoutingControlsCommand,
777
+ ResourceNotFoundException,
778
+ Route53RecoveryCluster,
779
+ Route53RecoveryClusterClient,
780
+ Route53RecoveryClusterServiceException,
781
+ RoutingControlState,
782
+ ServiceLimitExceededException,
783
+ ThrottlingException,
784
+ UpdateRoutingControlStateCommand,
785
+ UpdateRoutingControlStatesCommand,
786
+ ValidationException,
787
+ ValidationExceptionReason,
788
+ __Client,
789
+ paginateListRoutingControls
790
+ });