@aws-sdk/client-migrationhub-config 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,727 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MigrationHubConfigServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./MigrationHubConfigClient"), exports);
6
- tslib_1.__exportStar(require("./MigrationHubConfig"), 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 MigrationHubConfigServiceException_1 = require("./models/MigrationHubConfigServiceException");
12
- Object.defineProperty(exports, "MigrationHubConfigServiceException", { enumerable: true, get: function () { return MigrationHubConfigServiceException_1.MigrationHubConfigServiceException; } });
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
+ CreateHomeRegionControlCommand: () => CreateHomeRegionControlCommand,
26
+ DeleteHomeRegionControlCommand: () => DeleteHomeRegionControlCommand,
27
+ DescribeHomeRegionControlsCommand: () => DescribeHomeRegionControlsCommand,
28
+ DryRunOperation: () => DryRunOperation,
29
+ GetHomeRegionCommand: () => GetHomeRegionCommand,
30
+ InternalServerError: () => InternalServerError,
31
+ InvalidInputException: () => InvalidInputException,
32
+ MigrationHubConfig: () => MigrationHubConfig,
33
+ MigrationHubConfigClient: () => MigrationHubConfigClient,
34
+ MigrationHubConfigServiceException: () => MigrationHubConfigServiceException,
35
+ ServiceUnavailableException: () => ServiceUnavailableException,
36
+ TargetType: () => TargetType,
37
+ ThrottlingException: () => ThrottlingException,
38
+ __Client: () => import_smithy_client.Client,
39
+ paginateDescribeHomeRegionControls: () => paginateDescribeHomeRegionControls
40
+ });
41
+ module.exports = __toCommonJS(src_exports);
42
+
43
+ // src/MigrationHubConfigClient.ts
44
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
45
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
46
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
47
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
48
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
49
+ var import_config_resolver = require("@smithy/config-resolver");
50
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
51
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
52
+ var import_middleware_retry = require("@smithy/middleware-retry");
53
+
54
+
55
+ // src/endpoint/EndpointParameters.ts
56
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
57
+ return {
58
+ ...options,
59
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
60
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
61
+ defaultSigningName: "mgh"
62
+ };
63
+ }, "resolveClientEndpointParameters");
64
+ var commonParams = {
65
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
66
+ Endpoint: { type: "builtInParams", name: "endpoint" },
67
+ Region: { type: "builtInParams", name: "region" },
68
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
69
+ };
70
+
71
+ // src/MigrationHubConfigClient.ts
72
+ var import_runtimeConfig = require("././runtimeConfig");
73
+
74
+ // src/runtimeExtensions.ts
75
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
76
+ var import_protocol_http = require("@smithy/protocol-http");
77
+ var import_smithy_client = require("@smithy/smithy-client");
78
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
79
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
80
+ const extensionConfiguration = {
81
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
82
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
83
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
84
+ };
85
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
86
+ return {
87
+ ...runtimeConfig,
88
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
89
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
90
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
91
+ };
92
+ }, "resolveRuntimeExtensions");
93
+
94
+ // src/MigrationHubConfigClient.ts
95
+ var _MigrationHubConfigClient = class _MigrationHubConfigClient extends import_smithy_client.Client {
96
+ constructor(...[configuration]) {
97
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
98
+ const _config_1 = resolveClientEndpointParameters(_config_0);
99
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
100
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
101
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
102
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
103
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
104
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
105
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
106
+ super(_config_8);
107
+ this.config = _config_8;
108
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
109
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
110
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
111
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
113
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
114
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
115
+ }
116
+ /**
117
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
118
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
119
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
120
+ */
121
+ destroy() {
122
+ super.destroy();
123
+ }
124
+ };
125
+ __name(_MigrationHubConfigClient, "MigrationHubConfigClient");
126
+ var MigrationHubConfigClient = _MigrationHubConfigClient;
127
+
128
+ // src/MigrationHubConfig.ts
129
+
130
+
131
+ // src/commands/CreateHomeRegionControlCommand.ts
132
+
133
+ var import_middleware_serde = require("@smithy/middleware-serde");
134
+
135
+ var import_types = require("@smithy/types");
136
+
137
+ // src/protocols/Aws_json1_1.ts
138
+
139
+
140
+
141
+ // src/models/MigrationHubConfigServiceException.ts
142
+
143
+ var _MigrationHubConfigServiceException = class _MigrationHubConfigServiceException extends import_smithy_client.ServiceException {
144
+ /**
145
+ * @internal
146
+ */
147
+ constructor(options) {
148
+ super(options);
149
+ Object.setPrototypeOf(this, _MigrationHubConfigServiceException.prototype);
150
+ }
151
+ };
152
+ __name(_MigrationHubConfigServiceException, "MigrationHubConfigServiceException");
153
+ var MigrationHubConfigServiceException = _MigrationHubConfigServiceException;
154
+
155
+ // src/models/models_0.ts
156
+ var _AccessDeniedException = class _AccessDeniedException extends MigrationHubConfigServiceException {
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
+ this.Message = opts.Message;
170
+ }
171
+ };
172
+ __name(_AccessDeniedException, "AccessDeniedException");
173
+ var AccessDeniedException = _AccessDeniedException;
174
+ var TargetType = {
175
+ ACCOUNT: "ACCOUNT"
176
+ };
177
+ var _DryRunOperation = class _DryRunOperation extends MigrationHubConfigServiceException {
178
+ /**
179
+ * @internal
180
+ */
181
+ constructor(opts) {
182
+ super({
183
+ name: "DryRunOperation",
184
+ $fault: "client",
185
+ ...opts
186
+ });
187
+ this.name = "DryRunOperation";
188
+ this.$fault = "client";
189
+ Object.setPrototypeOf(this, _DryRunOperation.prototype);
190
+ this.Message = opts.Message;
191
+ }
192
+ };
193
+ __name(_DryRunOperation, "DryRunOperation");
194
+ var DryRunOperation = _DryRunOperation;
195
+ var _InternalServerError = class _InternalServerError extends MigrationHubConfigServiceException {
196
+ /**
197
+ * @internal
198
+ */
199
+ constructor(opts) {
200
+ super({
201
+ name: "InternalServerError",
202
+ $fault: "server",
203
+ ...opts
204
+ });
205
+ this.name = "InternalServerError";
206
+ this.$fault = "server";
207
+ Object.setPrototypeOf(this, _InternalServerError.prototype);
208
+ this.Message = opts.Message;
209
+ }
210
+ };
211
+ __name(_InternalServerError, "InternalServerError");
212
+ var InternalServerError = _InternalServerError;
213
+ var _InvalidInputException = class _InvalidInputException extends MigrationHubConfigServiceException {
214
+ /**
215
+ * @internal
216
+ */
217
+ constructor(opts) {
218
+ super({
219
+ name: "InvalidInputException",
220
+ $fault: "client",
221
+ ...opts
222
+ });
223
+ this.name = "InvalidInputException";
224
+ this.$fault = "client";
225
+ Object.setPrototypeOf(this, _InvalidInputException.prototype);
226
+ this.Message = opts.Message;
227
+ }
228
+ };
229
+ __name(_InvalidInputException, "InvalidInputException");
230
+ var InvalidInputException = _InvalidInputException;
231
+ var _ServiceUnavailableException = class _ServiceUnavailableException extends MigrationHubConfigServiceException {
232
+ /**
233
+ * @internal
234
+ */
235
+ constructor(opts) {
236
+ super({
237
+ name: "ServiceUnavailableException",
238
+ $fault: "server",
239
+ ...opts
240
+ });
241
+ this.name = "ServiceUnavailableException";
242
+ this.$fault = "server";
243
+ Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
244
+ this.Message = opts.Message;
245
+ }
246
+ };
247
+ __name(_ServiceUnavailableException, "ServiceUnavailableException");
248
+ var ServiceUnavailableException = _ServiceUnavailableException;
249
+ var _ThrottlingException = class _ThrottlingException extends MigrationHubConfigServiceException {
250
+ /**
251
+ * @internal
252
+ */
253
+ constructor(opts) {
254
+ super({
255
+ name: "ThrottlingException",
256
+ $fault: "client",
257
+ ...opts
258
+ });
259
+ this.name = "ThrottlingException";
260
+ this.$fault = "client";
261
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
262
+ this.Message = opts.Message;
263
+ this.RetryAfterSeconds = opts.RetryAfterSeconds;
264
+ }
265
+ };
266
+ __name(_ThrottlingException, "ThrottlingException");
267
+ var ThrottlingException = _ThrottlingException;
268
+
269
+ // src/protocols/Aws_json1_1.ts
270
+ var se_CreateHomeRegionControlCommand = /* @__PURE__ */ __name(async (input, context) => {
271
+ const headers = sharedHeaders("CreateHomeRegionControl");
272
+ let body;
273
+ body = JSON.stringify((0, import_smithy_client._json)(input));
274
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
275
+ }, "se_CreateHomeRegionControlCommand");
276
+ var se_DeleteHomeRegionControlCommand = /* @__PURE__ */ __name(async (input, context) => {
277
+ const headers = sharedHeaders("DeleteHomeRegionControl");
278
+ let body;
279
+ body = JSON.stringify((0, import_smithy_client._json)(input));
280
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
281
+ }, "se_DeleteHomeRegionControlCommand");
282
+ var se_DescribeHomeRegionControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
283
+ const headers = sharedHeaders("DescribeHomeRegionControls");
284
+ let body;
285
+ body = JSON.stringify((0, import_smithy_client._json)(input));
286
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
287
+ }, "se_DescribeHomeRegionControlsCommand");
288
+ var se_GetHomeRegionCommand = /* @__PURE__ */ __name(async (input, context) => {
289
+ const headers = sharedHeaders("GetHomeRegion");
290
+ let body;
291
+ body = JSON.stringify((0, import_smithy_client._json)(input));
292
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
293
+ }, "se_GetHomeRegionCommand");
294
+ var de_CreateHomeRegionControlCommand = /* @__PURE__ */ __name(async (output, context) => {
295
+ if (output.statusCode >= 300) {
296
+ return de_CreateHomeRegionControlCommandError(output, context);
297
+ }
298
+ const data = await parseBody(output.body, context);
299
+ let contents = {};
300
+ contents = de_CreateHomeRegionControlResult(data, context);
301
+ const response = {
302
+ $metadata: deserializeMetadata(output),
303
+ ...contents
304
+ };
305
+ return response;
306
+ }, "de_CreateHomeRegionControlCommand");
307
+ var de_CreateHomeRegionControlCommandError = /* @__PURE__ */ __name(async (output, context) => {
308
+ const parsedOutput = {
309
+ ...output,
310
+ body: await parseErrorBody(output.body, context)
311
+ };
312
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
+ switch (errorCode) {
314
+ case "AccessDeniedException":
315
+ case "com.amazonaws.migrationhubconfig#AccessDeniedException":
316
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
317
+ case "DryRunOperation":
318
+ case "com.amazonaws.migrationhubconfig#DryRunOperation":
319
+ throw await de_DryRunOperationRes(parsedOutput, context);
320
+ case "InternalServerError":
321
+ case "com.amazonaws.migrationhubconfig#InternalServerError":
322
+ throw await de_InternalServerErrorRes(parsedOutput, context);
323
+ case "InvalidInputException":
324
+ case "com.amazonaws.migrationhubconfig#InvalidInputException":
325
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
326
+ case "ServiceUnavailableException":
327
+ case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
328
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
329
+ case "ThrottlingException":
330
+ case "com.amazonaws.migrationhubconfig#ThrottlingException":
331
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
332
+ default:
333
+ const parsedBody = parsedOutput.body;
334
+ return throwDefaultError({
335
+ output,
336
+ parsedBody,
337
+ errorCode
338
+ });
339
+ }
340
+ }, "de_CreateHomeRegionControlCommandError");
341
+ var de_DeleteHomeRegionControlCommand = /* @__PURE__ */ __name(async (output, context) => {
342
+ if (output.statusCode >= 300) {
343
+ return de_DeleteHomeRegionControlCommandError(output, context);
344
+ }
345
+ const data = await parseBody(output.body, context);
346
+ let contents = {};
347
+ contents = (0, import_smithy_client._json)(data);
348
+ const response = {
349
+ $metadata: deserializeMetadata(output),
350
+ ...contents
351
+ };
352
+ return response;
353
+ }, "de_DeleteHomeRegionControlCommand");
354
+ var de_DeleteHomeRegionControlCommandError = /* @__PURE__ */ __name(async (output, context) => {
355
+ const parsedOutput = {
356
+ ...output,
357
+ body: await parseErrorBody(output.body, context)
358
+ };
359
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
360
+ switch (errorCode) {
361
+ case "AccessDeniedException":
362
+ case "com.amazonaws.migrationhubconfig#AccessDeniedException":
363
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
364
+ case "InternalServerError":
365
+ case "com.amazonaws.migrationhubconfig#InternalServerError":
366
+ throw await de_InternalServerErrorRes(parsedOutput, context);
367
+ case "InvalidInputException":
368
+ case "com.amazonaws.migrationhubconfig#InvalidInputException":
369
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
370
+ case "ServiceUnavailableException":
371
+ case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
372
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
373
+ case "ThrottlingException":
374
+ case "com.amazonaws.migrationhubconfig#ThrottlingException":
375
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
376
+ default:
377
+ const parsedBody = parsedOutput.body;
378
+ return throwDefaultError({
379
+ output,
380
+ parsedBody,
381
+ errorCode
382
+ });
383
+ }
384
+ }, "de_DeleteHomeRegionControlCommandError");
385
+ var de_DescribeHomeRegionControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
386
+ if (output.statusCode >= 300) {
387
+ return de_DescribeHomeRegionControlsCommandError(output, context);
388
+ }
389
+ const data = await parseBody(output.body, context);
390
+ let contents = {};
391
+ contents = de_DescribeHomeRegionControlsResult(data, context);
392
+ const response = {
393
+ $metadata: deserializeMetadata(output),
394
+ ...contents
395
+ };
396
+ return response;
397
+ }, "de_DescribeHomeRegionControlsCommand");
398
+ var de_DescribeHomeRegionControlsCommandError = /* @__PURE__ */ __name(async (output, context) => {
399
+ const parsedOutput = {
400
+ ...output,
401
+ body: await parseErrorBody(output.body, context)
402
+ };
403
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
404
+ switch (errorCode) {
405
+ case "AccessDeniedException":
406
+ case "com.amazonaws.migrationhubconfig#AccessDeniedException":
407
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
408
+ case "InternalServerError":
409
+ case "com.amazonaws.migrationhubconfig#InternalServerError":
410
+ throw await de_InternalServerErrorRes(parsedOutput, context);
411
+ case "InvalidInputException":
412
+ case "com.amazonaws.migrationhubconfig#InvalidInputException":
413
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
414
+ case "ServiceUnavailableException":
415
+ case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
416
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
417
+ case "ThrottlingException":
418
+ case "com.amazonaws.migrationhubconfig#ThrottlingException":
419
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
420
+ default:
421
+ const parsedBody = parsedOutput.body;
422
+ return throwDefaultError({
423
+ output,
424
+ parsedBody,
425
+ errorCode
426
+ });
427
+ }
428
+ }, "de_DescribeHomeRegionControlsCommandError");
429
+ var de_GetHomeRegionCommand = /* @__PURE__ */ __name(async (output, context) => {
430
+ if (output.statusCode >= 300) {
431
+ return de_GetHomeRegionCommandError(output, context);
432
+ }
433
+ const data = await parseBody(output.body, context);
434
+ let contents = {};
435
+ contents = (0, import_smithy_client._json)(data);
436
+ const response = {
437
+ $metadata: deserializeMetadata(output),
438
+ ...contents
439
+ };
440
+ return response;
441
+ }, "de_GetHomeRegionCommand");
442
+ var de_GetHomeRegionCommandError = /* @__PURE__ */ __name(async (output, context) => {
443
+ const parsedOutput = {
444
+ ...output,
445
+ body: await parseErrorBody(output.body, context)
446
+ };
447
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
448
+ switch (errorCode) {
449
+ case "AccessDeniedException":
450
+ case "com.amazonaws.migrationhubconfig#AccessDeniedException":
451
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
452
+ case "InternalServerError":
453
+ case "com.amazonaws.migrationhubconfig#InternalServerError":
454
+ throw await de_InternalServerErrorRes(parsedOutput, context);
455
+ case "InvalidInputException":
456
+ case "com.amazonaws.migrationhubconfig#InvalidInputException":
457
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
458
+ case "ServiceUnavailableException":
459
+ case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
460
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
461
+ case "ThrottlingException":
462
+ case "com.amazonaws.migrationhubconfig#ThrottlingException":
463
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
464
+ default:
465
+ const parsedBody = parsedOutput.body;
466
+ return throwDefaultError({
467
+ output,
468
+ parsedBody,
469
+ errorCode
470
+ });
471
+ }
472
+ }, "de_GetHomeRegionCommandError");
473
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
474
+ const body = parsedOutput.body;
475
+ const deserialized = (0, import_smithy_client._json)(body);
476
+ const exception = new AccessDeniedException({
477
+ $metadata: deserializeMetadata(parsedOutput),
478
+ ...deserialized
479
+ });
480
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
481
+ }, "de_AccessDeniedExceptionRes");
482
+ var de_DryRunOperationRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
483
+ const body = parsedOutput.body;
484
+ const deserialized = (0, import_smithy_client._json)(body);
485
+ const exception = new DryRunOperation({
486
+ $metadata: deserializeMetadata(parsedOutput),
487
+ ...deserialized
488
+ });
489
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
490
+ }, "de_DryRunOperationRes");
491
+ var de_InternalServerErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
492
+ const body = parsedOutput.body;
493
+ const deserialized = (0, import_smithy_client._json)(body);
494
+ const exception = new InternalServerError({
495
+ $metadata: deserializeMetadata(parsedOutput),
496
+ ...deserialized
497
+ });
498
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
499
+ }, "de_InternalServerErrorRes");
500
+ var de_InvalidInputExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
501
+ const body = parsedOutput.body;
502
+ const deserialized = (0, import_smithy_client._json)(body);
503
+ const exception = new InvalidInputException({
504
+ $metadata: deserializeMetadata(parsedOutput),
505
+ ...deserialized
506
+ });
507
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
508
+ }, "de_InvalidInputExceptionRes");
509
+ var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
510
+ const body = parsedOutput.body;
511
+ const deserialized = (0, import_smithy_client._json)(body);
512
+ const exception = new ServiceUnavailableException({
513
+ $metadata: deserializeMetadata(parsedOutput),
514
+ ...deserialized
515
+ });
516
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
517
+ }, "de_ServiceUnavailableExceptionRes");
518
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
519
+ const body = parsedOutput.body;
520
+ const deserialized = (0, import_smithy_client._json)(body);
521
+ const exception = new ThrottlingException({
522
+ $metadata: deserializeMetadata(parsedOutput),
523
+ ...deserialized
524
+ });
525
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
526
+ }, "de_ThrottlingExceptionRes");
527
+ var de_CreateHomeRegionControlResult = /* @__PURE__ */ __name((output, context) => {
528
+ return (0, import_smithy_client.take)(output, {
529
+ HomeRegionControl: (_) => de_HomeRegionControl(_, context)
530
+ });
531
+ }, "de_CreateHomeRegionControlResult");
532
+ var de_DescribeHomeRegionControlsResult = /* @__PURE__ */ __name((output, context) => {
533
+ return (0, import_smithy_client.take)(output, {
534
+ HomeRegionControls: (_) => de_HomeRegionControls(_, context),
535
+ NextToken: import_smithy_client.expectString
536
+ });
537
+ }, "de_DescribeHomeRegionControlsResult");
538
+ var de_HomeRegionControl = /* @__PURE__ */ __name((output, context) => {
539
+ return (0, import_smithy_client.take)(output, {
540
+ ControlId: import_smithy_client.expectString,
541
+ HomeRegion: import_smithy_client.expectString,
542
+ RequestedTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
543
+ Target: import_smithy_client._json
544
+ });
545
+ }, "de_HomeRegionControl");
546
+ var de_HomeRegionControls = /* @__PURE__ */ __name((output, context) => {
547
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
548
+ return de_HomeRegionControl(entry, context);
549
+ });
550
+ return retVal;
551
+ }, "de_HomeRegionControls");
552
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
553
+ httpStatusCode: output.statusCode,
554
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
555
+ extendedRequestId: output.headers["x-amz-id-2"],
556
+ cfId: output.headers["x-amz-cf-id"]
557
+ }), "deserializeMetadata");
558
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
559
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(MigrationHubConfigServiceException);
560
+ var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
561
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
562
+ const contents = {
563
+ protocol,
564
+ hostname,
565
+ port,
566
+ method: "POST",
567
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
568
+ headers
569
+ };
570
+ if (resolvedHostname !== void 0) {
571
+ contents.hostname = resolvedHostname;
572
+ }
573
+ if (body !== void 0) {
574
+ contents.body = body;
575
+ }
576
+ return new import_protocol_http.HttpRequest(contents);
577
+ }, "buildHttpRpcRequest");
578
+ function sharedHeaders(operation) {
579
+ return {
580
+ "content-type": "application/x-amz-json-1.1",
581
+ "x-amz-target": `AWSMigrationHubMultiAccountService.${operation}`
582
+ };
583
+ }
584
+ __name(sharedHeaders, "sharedHeaders");
585
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
586
+ if (encoded.length) {
587
+ return JSON.parse(encoded);
588
+ }
589
+ return {};
590
+ }), "parseBody");
591
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
592
+ const value = await parseBody(errorBody, context);
593
+ value.message = value.message ?? value.Message;
594
+ return value;
595
+ }, "parseErrorBody");
596
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
597
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
598
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
599
+ let cleanValue = rawValue;
600
+ if (typeof cleanValue === "number") {
601
+ cleanValue = cleanValue.toString();
602
+ }
603
+ if (cleanValue.indexOf(",") >= 0) {
604
+ cleanValue = cleanValue.split(",")[0];
605
+ }
606
+ if (cleanValue.indexOf(":") >= 0) {
607
+ cleanValue = cleanValue.split(":")[0];
608
+ }
609
+ if (cleanValue.indexOf("#") >= 0) {
610
+ cleanValue = cleanValue.split("#")[1];
611
+ }
612
+ return cleanValue;
613
+ }, "sanitizeErrorCode");
614
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
615
+ if (headerKey !== void 0) {
616
+ return sanitizeErrorCode(output.headers[headerKey]);
617
+ }
618
+ if (data.code !== void 0) {
619
+ return sanitizeErrorCode(data.code);
620
+ }
621
+ if (data["__type"] !== void 0) {
622
+ return sanitizeErrorCode(data["__type"]);
623
+ }
624
+ }, "loadRestJsonErrorCode");
625
+
626
+ // src/commands/CreateHomeRegionControlCommand.ts
627
+ var _CreateHomeRegionControlCommand = class _CreateHomeRegionControlCommand extends import_smithy_client.Command.classBuilder().ep({
628
+ ...commonParams
629
+ }).m(function(Command, cs, config, o) {
630
+ return [
631
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
632
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
633
+ ];
634
+ }).s("AWSMigrationHubMultiAccountService", "CreateHomeRegionControl", {}).n("MigrationHubConfigClient", "CreateHomeRegionControlCommand").f(void 0, void 0).ser(se_CreateHomeRegionControlCommand).de(de_CreateHomeRegionControlCommand).build() {
635
+ };
636
+ __name(_CreateHomeRegionControlCommand, "CreateHomeRegionControlCommand");
637
+ var CreateHomeRegionControlCommand = _CreateHomeRegionControlCommand;
638
+
639
+ // src/commands/DeleteHomeRegionControlCommand.ts
640
+
641
+
642
+
643
+
644
+ var _DeleteHomeRegionControlCommand = class _DeleteHomeRegionControlCommand extends import_smithy_client.Command.classBuilder().ep({
645
+ ...commonParams
646
+ }).m(function(Command, cs, config, o) {
647
+ return [
648
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
649
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
650
+ ];
651
+ }).s("AWSMigrationHubMultiAccountService", "DeleteHomeRegionControl", {}).n("MigrationHubConfigClient", "DeleteHomeRegionControlCommand").f(void 0, void 0).ser(se_DeleteHomeRegionControlCommand).de(de_DeleteHomeRegionControlCommand).build() {
652
+ };
653
+ __name(_DeleteHomeRegionControlCommand, "DeleteHomeRegionControlCommand");
654
+ var DeleteHomeRegionControlCommand = _DeleteHomeRegionControlCommand;
655
+
656
+ // src/commands/DescribeHomeRegionControlsCommand.ts
657
+
658
+
659
+
660
+
661
+ var _DescribeHomeRegionControlsCommand = class _DescribeHomeRegionControlsCommand extends import_smithy_client.Command.classBuilder().ep({
662
+ ...commonParams
663
+ }).m(function(Command, cs, config, o) {
664
+ return [
665
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
666
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
667
+ ];
668
+ }).s("AWSMigrationHubMultiAccountService", "DescribeHomeRegionControls", {}).n("MigrationHubConfigClient", "DescribeHomeRegionControlsCommand").f(void 0, void 0).ser(se_DescribeHomeRegionControlsCommand).de(de_DescribeHomeRegionControlsCommand).build() {
669
+ };
670
+ __name(_DescribeHomeRegionControlsCommand, "DescribeHomeRegionControlsCommand");
671
+ var DescribeHomeRegionControlsCommand = _DescribeHomeRegionControlsCommand;
672
+
673
+ // src/commands/GetHomeRegionCommand.ts
674
+
675
+
676
+
677
+
678
+ var _GetHomeRegionCommand = class _GetHomeRegionCommand extends import_smithy_client.Command.classBuilder().ep({
679
+ ...commonParams
680
+ }).m(function(Command, cs, config, o) {
681
+ return [
682
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
683
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
684
+ ];
685
+ }).s("AWSMigrationHubMultiAccountService", "GetHomeRegion", {}).n("MigrationHubConfigClient", "GetHomeRegionCommand").f(void 0, void 0).ser(se_GetHomeRegionCommand).de(de_GetHomeRegionCommand).build() {
686
+ };
687
+ __name(_GetHomeRegionCommand, "GetHomeRegionCommand");
688
+ var GetHomeRegionCommand = _GetHomeRegionCommand;
689
+
690
+ // src/MigrationHubConfig.ts
691
+ var commands = {
692
+ CreateHomeRegionControlCommand,
693
+ DeleteHomeRegionControlCommand,
694
+ DescribeHomeRegionControlsCommand,
695
+ GetHomeRegionCommand
696
+ };
697
+ var _MigrationHubConfig = class _MigrationHubConfig extends MigrationHubConfigClient {
698
+ };
699
+ __name(_MigrationHubConfig, "MigrationHubConfig");
700
+ var MigrationHubConfig = _MigrationHubConfig;
701
+ (0, import_smithy_client.createAggregatedClient)(commands, MigrationHubConfig);
702
+
703
+ // src/pagination/DescribeHomeRegionControlsPaginator.ts
704
+ var import_core = require("@smithy/core");
705
+ var paginateDescribeHomeRegionControls = (0, import_core.createPaginator)(MigrationHubConfigClient, DescribeHomeRegionControlsCommand, "NextToken", "NextToken", "MaxResults");
706
+
707
+ // src/index.ts
708
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
709
+ // Annotate the CommonJS export names for ESM import in node:
710
+ 0 && (module.exports = {
711
+ AccessDeniedException,
712
+ CreateHomeRegionControlCommand,
713
+ DeleteHomeRegionControlCommand,
714
+ DescribeHomeRegionControlsCommand,
715
+ DryRunOperation,
716
+ GetHomeRegionCommand,
717
+ InternalServerError,
718
+ InvalidInputException,
719
+ MigrationHubConfig,
720
+ MigrationHubConfigClient,
721
+ MigrationHubConfigServiceException,
722
+ ServiceUnavailableException,
723
+ TargetType,
724
+ ThrottlingException,
725
+ __Client,
726
+ paginateDescribeHomeRegionControls
727
+ });