@aws-sdk/client-imagebuilder 3.43.0 → 3.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/Imagebuilder.js +15 -0
  3. package/dist-cjs/commands/ImportVmImageCommand.js +36 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/endpoints.js +1 -0
  6. package/dist-cjs/models/models_0.js +32 -104
  7. package/dist-cjs/protocols/Aws_restJson1.js +132 -2
  8. package/dist-cjs/runtimeConfig.browser.js +7 -2
  9. package/dist-cjs/runtimeConfig.js +9 -3
  10. package/dist-es/Imagebuilder.js +15 -0
  11. package/dist-es/commands/ImportVmImageCommand.js +39 -0
  12. package/dist-es/commands/index.js +1 -0
  13. package/dist-es/endpoints.js +1 -0
  14. package/dist-es/models/models_0.js +24 -68
  15. package/dist-es/protocols/Aws_restJson1.js +136 -2
  16. package/dist-es/runtimeConfig.browser.js +12 -3
  17. package/dist-es/runtimeConfig.js +13 -6
  18. package/dist-types/Imagebuilder.d.ts +15 -0
  19. package/dist-types/ImagebuilderClient.d.ts +8 -3
  20. package/dist-types/commands/ImportVmImageCommand.d.ts +43 -0
  21. package/dist-types/commands/index.d.ts +1 -0
  22. package/dist-types/models/models_0.d.ts +238 -111
  23. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  24. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  25. package/dist-types/runtimeConfig.d.ts +4 -3
  26. package/dist-types/runtimeConfig.native.d.ts +1 -0
  27. package/dist-types/ts3.4/Imagebuilder.d.ts +5 -0
  28. package/dist-types/ts3.4/ImagebuilderClient.d.ts +6 -3
  29. package/dist-types/ts3.4/commands/ImportVmImageCommand.d.ts +17 -0
  30. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  31. package/dist-types/ts3.4/models/models_0.d.ts +69 -68
  32. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  33. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  34. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  35. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  36. package/package.json +39 -46
@@ -16,14 +16,17 @@ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
16
16
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
19
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
19
20
  const getRuntimeConfig = (config) => {
20
21
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
21
- smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
22
+ const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
24
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
23
25
  return {
24
26
  ...clientSharedValues,
25
27
  ...config,
26
28
  runtime: "node",
29
+ defaultsMode,
27
30
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
28
31
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
29
32
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
@@ -31,8 +34,11 @@ const getRuntimeConfig = (config) => {
31
34
  defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
32
35
  maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
33
36
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
34
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
35
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
37
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
38
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
39
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
41
+ }),
36
42
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
37
43
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
38
44
  useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
@@ -26,6 +26,7 @@ import { GetImageRecipeCommand, } from "./commands/GetImageRecipeCommand";
26
26
  import { GetImageRecipePolicyCommand, } from "./commands/GetImageRecipePolicyCommand";
27
27
  import { GetInfrastructureConfigurationCommand, } from "./commands/GetInfrastructureConfigurationCommand";
28
28
  import { ImportComponentCommand, } from "./commands/ImportComponentCommand";
29
+ import { ImportVmImageCommand, } from "./commands/ImportVmImageCommand";
29
30
  import { ListComponentBuildVersionsCommand, } from "./commands/ListComponentBuildVersionsCommand";
30
31
  import { ListComponentsCommand, } from "./commands/ListComponentsCommand";
31
32
  import { ListContainerRecipesCommand, } from "./commands/ListContainerRecipesCommand";
@@ -432,6 +433,20 @@ var Imagebuilder = (function (_super) {
432
433
  return this.send(command, optionsOrCb);
433
434
  }
434
435
  };
436
+ Imagebuilder.prototype.importVmImage = function (args, optionsOrCb, cb) {
437
+ var command = new ImportVmImageCommand(args);
438
+ if (typeof optionsOrCb === "function") {
439
+ this.send(command, optionsOrCb);
440
+ }
441
+ else if (typeof cb === "function") {
442
+ if (typeof optionsOrCb !== "object")
443
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
444
+ this.send(command, optionsOrCb || {}, cb);
445
+ }
446
+ else {
447
+ return this.send(command, optionsOrCb);
448
+ }
449
+ };
435
450
  Imagebuilder.prototype.listComponentBuildVersions = function (args, optionsOrCb, cb) {
436
451
  var command = new ListComponentBuildVersionsCommand(args);
437
452
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ImportVmImageRequest, ImportVmImageResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1ImportVmImageCommand, serializeAws_restJson1ImportVmImageCommand, } from "../protocols/Aws_restJson1";
6
+ var ImportVmImageCommand = (function (_super) {
7
+ __extends(ImportVmImageCommand, _super);
8
+ function ImportVmImageCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ImportVmImageCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ImagebuilderClient";
18
+ var commandName = "ImportVmImageCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ImportVmImageRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ImportVmImageResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ImportVmImageCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ImportVmImageCommand(input, context);
33
+ };
34
+ ImportVmImageCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ImportVmImageCommand(output, context);
36
+ };
37
+ return ImportVmImageCommand;
38
+ }($Command));
39
+ export { ImportVmImageCommand };
@@ -25,6 +25,7 @@ export * from "./GetImageRecipeCommand";
25
25
  export * from "./GetImageRecipePolicyCommand";
26
26
  export * from "./GetInfrastructureConfigurationCommand";
27
27
  export * from "./ImportComponentCommand";
28
+ export * from "./ImportVmImageCommand";
28
29
  export * from "./ListComponentBuildVersionsCommand";
29
30
  export * from "./ListComponentsCommand";
30
31
  export * from "./ListContainerRecipesCommand";
@@ -12,6 +12,7 @@ var partitionHash = {
12
12
  "ap-south-1",
13
13
  "ap-southeast-1",
14
14
  "ap-southeast-2",
15
+ "ap-southeast-3",
15
16
  "ca-central-1",
16
17
  "eu-central-1",
17
18
  "eu-north-1",
@@ -37,10 +37,12 @@ export var AmiDistributionConfiguration;
37
37
  (function (AmiDistributionConfiguration) {
38
38
  AmiDistributionConfiguration.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
39
39
  })(AmiDistributionConfiguration || (AmiDistributionConfiguration = {}));
40
- export var CallRateLimitExceededException;
41
- (function (CallRateLimitExceededException) {
42
- CallRateLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
43
- })(CallRateLimitExceededException || (CallRateLimitExceededException = {}));
40
+ export var BuildType;
41
+ (function (BuildType) {
42
+ BuildType["IMPORT"] = "IMPORT";
43
+ BuildType["SCHEDULED"] = "SCHEDULED";
44
+ BuildType["USER_INITIATED"] = "USER_INITIATED";
45
+ })(BuildType || (BuildType = {}));
44
46
  export var CancelImageCreationRequest;
45
47
  (function (CancelImageCreationRequest) {
46
48
  CancelImageCreationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -49,34 +51,6 @@ export var CancelImageCreationResponse;
49
51
  (function (CancelImageCreationResponse) {
50
52
  CancelImageCreationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
51
53
  })(CancelImageCreationResponse || (CancelImageCreationResponse = {}));
52
- export var ClientException;
53
- (function (ClientException) {
54
- ClientException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
55
- })(ClientException || (ClientException = {}));
56
- export var ForbiddenException;
57
- (function (ForbiddenException) {
58
- ForbiddenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
59
- })(ForbiddenException || (ForbiddenException = {}));
60
- export var IdempotentParameterMismatchException;
61
- (function (IdempotentParameterMismatchException) {
62
- IdempotentParameterMismatchException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
63
- })(IdempotentParameterMismatchException || (IdempotentParameterMismatchException = {}));
64
- export var InvalidRequestException;
65
- (function (InvalidRequestException) {
66
- InvalidRequestException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
67
- })(InvalidRequestException || (InvalidRequestException = {}));
68
- export var ResourceInUseException;
69
- (function (ResourceInUseException) {
70
- ResourceInUseException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
71
- })(ResourceInUseException || (ResourceInUseException = {}));
72
- export var ServiceException;
73
- (function (ServiceException) {
74
- ServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
75
- })(ServiceException || (ServiceException = {}));
76
- export var ServiceUnavailableException;
77
- (function (ServiceUnavailableException) {
78
- ServiceUnavailableException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
79
- })(ServiceUnavailableException || (ServiceUnavailableException = {}));
80
54
  export var ComponentParameterDetail;
81
55
  (function (ComponentParameterDetail) {
82
56
  ComponentParameterDetail.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -181,18 +155,6 @@ export var CreateComponentResponse;
181
155
  (function (CreateComponentResponse) {
182
156
  CreateComponentResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
183
157
  })(CreateComponentResponse || (CreateComponentResponse = {}));
184
- export var InvalidParameterCombinationException;
185
- (function (InvalidParameterCombinationException) {
186
- InvalidParameterCombinationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
187
- })(InvalidParameterCombinationException || (InvalidParameterCombinationException = {}));
188
- export var InvalidVersionNumberException;
189
- (function (InvalidVersionNumberException) {
190
- InvalidVersionNumberException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
191
- })(InvalidVersionNumberException || (InvalidVersionNumberException = {}));
192
- export var ServiceQuotaExceededException;
193
- (function (ServiceQuotaExceededException) {
194
- ServiceQuotaExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
195
- })(ServiceQuotaExceededException || (ServiceQuotaExceededException = {}));
196
158
  export var CreateContainerRecipeRequest;
197
159
  (function (CreateContainerRecipeRequest) {
198
160
  CreateContainerRecipeRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -201,14 +163,20 @@ export var CreateContainerRecipeResponse;
201
163
  (function (CreateContainerRecipeResponse) {
202
164
  CreateContainerRecipeResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
203
165
  })(CreateContainerRecipeResponse || (CreateContainerRecipeResponse = {}));
204
- export var ResourceAlreadyExistsException;
205
- (function (ResourceAlreadyExistsException) {
206
- ResourceAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
207
- })(ResourceAlreadyExistsException || (ResourceAlreadyExistsException = {}));
208
166
  export var LaunchTemplateConfiguration;
209
167
  (function (LaunchTemplateConfiguration) {
210
168
  LaunchTemplateConfiguration.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
211
169
  })(LaunchTemplateConfiguration || (LaunchTemplateConfiguration = {}));
170
+ export var DiskImageFormat;
171
+ (function (DiskImageFormat) {
172
+ DiskImageFormat["RAW"] = "RAW";
173
+ DiskImageFormat["VHD"] = "VHD";
174
+ DiskImageFormat["VMDK"] = "VMDK";
175
+ })(DiskImageFormat || (DiskImageFormat = {}));
176
+ export var S3ExportConfiguration;
177
+ (function (S3ExportConfiguration) {
178
+ S3ExportConfiguration.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
179
+ })(S3ExportConfiguration || (S3ExportConfiguration = {}));
212
180
  export var Distribution;
213
181
  (function (Distribution) {
214
182
  Distribution.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -291,10 +259,6 @@ export var DeleteComponentResponse;
291
259
  (function (DeleteComponentResponse) {
292
260
  DeleteComponentResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
293
261
  })(DeleteComponentResponse || (DeleteComponentResponse = {}));
294
- export var ResourceDependencyException;
295
- (function (ResourceDependencyException) {
296
- ResourceDependencyException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
297
- })(ResourceDependencyException || (ResourceDependencyException = {}));
298
262
  export var DeleteContainerRecipeRequest;
299
263
  (function (DeleteContainerRecipeRequest) {
300
264
  DeleteContainerRecipeRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -371,10 +335,6 @@ export var GetComponentPolicyResponse;
371
335
  (function (GetComponentPolicyResponse) {
372
336
  GetComponentPolicyResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
373
337
  })(GetComponentPolicyResponse || (GetComponentPolicyResponse = {}));
374
- export var ResourceNotFoundException;
375
- (function (ResourceNotFoundException) {
376
- ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
377
- })(ResourceNotFoundException || (ResourceNotFoundException = {}));
378
338
  export var GetContainerRecipeRequest;
379
339
  (function (GetContainerRecipeRequest) {
380
340
  GetContainerRecipeRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -480,10 +440,14 @@ export var ImportComponentResponse;
480
440
  (function (ImportComponentResponse) {
481
441
  ImportComponentResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
482
442
  })(ImportComponentResponse || (ImportComponentResponse = {}));
483
- export var InvalidPaginationTokenException;
484
- (function (InvalidPaginationTokenException) {
485
- InvalidPaginationTokenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
486
- })(InvalidPaginationTokenException || (InvalidPaginationTokenException = {}));
443
+ export var ImportVmImageRequest;
444
+ (function (ImportVmImageRequest) {
445
+ ImportVmImageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
446
+ })(ImportVmImageRequest || (ImportVmImageRequest = {}));
447
+ export var ImportVmImageResponse;
448
+ (function (ImportVmImageResponse) {
449
+ ImportVmImageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
450
+ })(ImportVmImageResponse || (ImportVmImageResponse = {}));
487
451
  export var ListComponentBuildVersionsRequest;
488
452
  (function (ListComponentBuildVersionsRequest) {
489
453
  ListComponentBuildVersionsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -598,10 +562,6 @@ export var ListInfrastructureConfigurationsResponse;
598
562
  (function (ListInfrastructureConfigurationsResponse) {
599
563
  ListInfrastructureConfigurationsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
600
564
  })(ListInfrastructureConfigurationsResponse || (ListInfrastructureConfigurationsResponse = {}));
601
- export var InvalidParameterException;
602
- (function (InvalidParameterException) {
603
- InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
604
- })(InvalidParameterException || (InvalidParameterException = {}));
605
565
  export var ListTagsForResourceRequest;
606
566
  (function (ListTagsForResourceRequest) {
607
567
  ListTagsForResourceRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -610,10 +570,6 @@ export var ListTagsForResourceResponse;
610
570
  (function (ListTagsForResourceResponse) {
611
571
  ListTagsForResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
612
572
  })(ListTagsForResourceResponse || (ListTagsForResourceResponse = {}));
613
- export var InvalidParameterValueException;
614
- (function (InvalidParameterValueException) {
615
- InvalidParameterValueException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
616
- })(InvalidParameterValueException || (InvalidParameterValueException = {}));
617
573
  export var PutComponentPolicyRequest;
618
574
  (function (PutComponentPolicyRequest) {
619
575
  PutComponentPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -730,6 +730,33 @@ export var serializeAws_restJson1ImportComponentCommand = function (input, conte
730
730
  }
731
731
  });
732
732
  }); };
733
+ export var serializeAws_restJson1ImportVmImageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
734
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
735
+ var _c;
736
+ return __generator(this, function (_d) {
737
+ switch (_d.label) {
738
+ case 0: return [4, context.endpoint()];
739
+ case 1:
740
+ _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
741
+ headers = {
742
+ "content-type": "application/json",
743
+ };
744
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/ImportVmImage";
745
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.description !== undefined && input.description !== null && { description: input.description })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.osVersion !== undefined && input.osVersion !== null && { osVersion: input.osVersion })), (input.platform !== undefined && input.platform !== null && { platform: input.platform })), (input.semanticVersion !== undefined &&
746
+ input.semanticVersion !== null && { semanticVersion: input.semanticVersion })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })), (input.vmImportTaskId !== undefined &&
747
+ input.vmImportTaskId !== null && { vmImportTaskId: input.vmImportTaskId })));
748
+ return [2, new __HttpRequest({
749
+ protocol: protocol,
750
+ hostname: hostname,
751
+ port: port,
752
+ method: "PUT",
753
+ headers: headers,
754
+ path: resolvedPath,
755
+ body: body,
756
+ })];
757
+ }
758
+ });
759
+ }); };
733
760
  export var serializeAws_restJson1ListComponentBuildVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
734
761
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
735
762
  return __generator(this, function (_c) {
@@ -4595,6 +4622,92 @@ var deserializeAws_restJson1ImportComponentCommandError = function (output, cont
4595
4622
  }
4596
4623
  });
4597
4624
  }); };
4625
+ export var deserializeAws_restJson1ImportVmImageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4626
+ var contents, data, _a, _b;
4627
+ return __generator(this, function (_c) {
4628
+ switch (_c.label) {
4629
+ case 0:
4630
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4631
+ return [2, deserializeAws_restJson1ImportVmImageCommandError(output, context)];
4632
+ }
4633
+ contents = {
4634
+ $metadata: deserializeMetadata(output),
4635
+ clientToken: undefined,
4636
+ imageArn: undefined,
4637
+ requestId: undefined,
4638
+ };
4639
+ _a = __expectNonNull;
4640
+ _b = __expectObject;
4641
+ return [4, parseBody(output.body, context)];
4642
+ case 1:
4643
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4644
+ if (data.clientToken !== undefined && data.clientToken !== null) {
4645
+ contents.clientToken = __expectString(data.clientToken);
4646
+ }
4647
+ if (data.imageArn !== undefined && data.imageArn !== null) {
4648
+ contents.imageArn = __expectString(data.imageArn);
4649
+ }
4650
+ if (data.requestId !== undefined && data.requestId !== null) {
4651
+ contents.requestId = __expectString(data.requestId);
4652
+ }
4653
+ return [2, Promise.resolve(contents)];
4654
+ }
4655
+ });
4656
+ }); };
4657
+ var deserializeAws_restJson1ImportVmImageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4658
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
4659
+ var _f;
4660
+ return __generator(this, function (_g) {
4661
+ switch (_g.label) {
4662
+ case 0:
4663
+ _a = [__assign({}, output)];
4664
+ _f = {};
4665
+ return [4, parseBody(output.body, context)];
4666
+ case 1:
4667
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
4668
+ errorCode = "UnknownError";
4669
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4670
+ _b = errorCode;
4671
+ switch (_b) {
4672
+ case "ClientException": return [3, 2];
4673
+ case "com.amazonaws.imagebuilder#ClientException": return [3, 2];
4674
+ case "ServiceException": return [3, 4];
4675
+ case "com.amazonaws.imagebuilder#ServiceException": return [3, 4];
4676
+ case "ServiceUnavailableException": return [3, 6];
4677
+ case "com.amazonaws.imagebuilder#ServiceUnavailableException": return [3, 6];
4678
+ }
4679
+ return [3, 8];
4680
+ case 2:
4681
+ _c = [{}];
4682
+ return [4, deserializeAws_restJson1ClientExceptionResponse(parsedOutput, context)];
4683
+ case 3:
4684
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
4685
+ return [3, 9];
4686
+ case 4:
4687
+ _d = [{}];
4688
+ return [4, deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context)];
4689
+ case 5:
4690
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
4691
+ return [3, 9];
4692
+ case 6:
4693
+ _e = [{}];
4694
+ return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
4695
+ case 7:
4696
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
4697
+ return [3, 9];
4698
+ case 8:
4699
+ parsedBody = parsedOutput.body;
4700
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
4701
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
4702
+ _g.label = 9;
4703
+ case 9:
4704
+ message = response.message || response.Message || errorCode;
4705
+ response.message = message;
4706
+ delete response.Message;
4707
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
4708
+ }
4709
+ });
4710
+ }); };
4598
4711
  export var deserializeAws_restJson1ListComponentBuildVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4599
4712
  var contents, data, _a, _b;
4600
4713
  return __generator(this, function (_c) {
@@ -7489,7 +7602,7 @@ var serializeAws_restJson1ContainerDistributionConfiguration = function (input,
7489
7602
  }));
7490
7603
  };
7491
7604
  var serializeAws_restJson1Distribution = function (input, context) {
7492
- return __assign(__assign(__assign(__assign(__assign({}, (input.amiDistributionConfiguration !== undefined &&
7605
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.amiDistributionConfiguration !== undefined &&
7493
7606
  input.amiDistributionConfiguration !== null && {
7494
7607
  amiDistributionConfiguration: serializeAws_restJson1AmiDistributionConfiguration(input.amiDistributionConfiguration, context),
7495
7608
  })), (input.containerDistributionConfiguration !== undefined &&
@@ -7501,7 +7614,10 @@ var serializeAws_restJson1Distribution = function (input, context) {
7501
7614
  })), (input.licenseConfigurationArns !== undefined &&
7502
7615
  input.licenseConfigurationArns !== null && {
7503
7616
  licenseConfigurationArns: serializeAws_restJson1LicenseConfigurationArnList(input.licenseConfigurationArns, context),
7504
- })), (input.region !== undefined && input.region !== null && { region: input.region }));
7617
+ })), (input.region !== undefined && input.region !== null && { region: input.region })), (input.s3ExportConfiguration !== undefined &&
7618
+ input.s3ExportConfiguration !== null && {
7619
+ s3ExportConfiguration: serializeAws_restJson1S3ExportConfiguration(input.s3ExportConfiguration, context),
7620
+ }));
7505
7621
  };
7506
7622
  var serializeAws_restJson1DistributionList = function (input, context) {
7507
7623
  return input
@@ -7660,6 +7776,10 @@ var serializeAws_restJson1ResourceTagMap = function (input, context) {
7660
7776
  return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
7661
7777
  }, {});
7662
7778
  };
7779
+ var serializeAws_restJson1S3ExportConfiguration = function (input, context) {
7780
+ return __assign(__assign(__assign(__assign({}, (input.diskImageFormat !== undefined &&
7781
+ input.diskImageFormat !== null && { diskImageFormat: input.diskImageFormat })), (input.roleName !== undefined && input.roleName !== null && { roleName: input.roleName })), (input.s3Bucket !== undefined && input.s3Bucket !== null && { s3Bucket: input.s3Bucket })), (input.s3Prefix !== undefined && input.s3Prefix !== null && { s3Prefix: input.s3Prefix }));
7782
+ };
7663
7783
  var serializeAws_restJson1S3Logs = function (input, context) {
7664
7784
  return __assign(__assign({}, (input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName })), (input.s3KeyPrefix !== undefined && input.s3KeyPrefix !== null && { s3KeyPrefix: input.s3KeyPrefix }));
7665
7785
  };
@@ -8018,6 +8138,9 @@ var deserializeAws_restJson1Distribution = function (output, context) {
8018
8138
  ? deserializeAws_restJson1LicenseConfigurationArnList(output.licenseConfigurationArns, context)
8019
8139
  : undefined,
8020
8140
  region: __expectString(output.region),
8141
+ s3ExportConfiguration: output.s3ExportConfiguration !== undefined && output.s3ExportConfiguration !== null
8142
+ ? deserializeAws_restJson1S3ExportConfiguration(output.s3ExportConfiguration, context)
8143
+ : undefined,
8021
8144
  };
8022
8145
  };
8023
8146
  var deserializeAws_restJson1DistributionConfiguration = function (output, context) {
@@ -8086,6 +8209,7 @@ var deserializeAws_restJson1EbsInstanceBlockDeviceSpecification = function (outp
8086
8209
  var deserializeAws_restJson1Image = function (output, context) {
8087
8210
  return {
8088
8211
  arn: __expectString(output.arn),
8212
+ buildType: __expectString(output.buildType),
8089
8213
  containerRecipe: output.containerRecipe !== undefined && output.containerRecipe !== null
8090
8214
  ? deserializeAws_restJson1ContainerRecipe(output.containerRecipe, context)
8091
8215
  : undefined,
@@ -8232,6 +8356,7 @@ var deserializeAws_restJson1ImageState = function (output, context) {
8232
8356
  var deserializeAws_restJson1ImageSummary = function (output, context) {
8233
8357
  return {
8234
8358
  arn: __expectString(output.arn),
8359
+ buildType: __expectString(output.buildType),
8235
8360
  dateCreated: __expectString(output.dateCreated),
8236
8361
  name: __expectString(output.name),
8237
8362
  osVersion: __expectString(output.osVersion),
@@ -8269,6 +8394,7 @@ var deserializeAws_restJson1ImageTestsConfiguration = function (output, context)
8269
8394
  var deserializeAws_restJson1ImageVersion = function (output, context) {
8270
8395
  return {
8271
8396
  arn: __expectString(output.arn),
8397
+ buildType: __expectString(output.buildType),
8272
8398
  dateCreated: __expectString(output.dateCreated),
8273
8399
  name: __expectString(output.name),
8274
8400
  osVersion: __expectString(output.osVersion),
@@ -8503,6 +8629,14 @@ var deserializeAws_restJson1ResourceTagMap = function (output, context) {
8503
8629
  return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
8504
8630
  }, {});
8505
8631
  };
8632
+ var deserializeAws_restJson1S3ExportConfiguration = function (output, context) {
8633
+ return {
8634
+ diskImageFormat: __expectString(output.diskImageFormat),
8635
+ roleName: __expectString(output.roleName),
8636
+ s3Bucket: __expectString(output.s3Bucket),
8637
+ s3Prefix: __expectString(output.s3Prefix),
8638
+ };
8639
+ };
8506
8640
  var deserializeAws_restJson1S3Logs = function (output, context) {
8507
8641
  return {
8508
8642
  s3BucketName: __expectString(output.s3BucketName),
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,21 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
- import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
28
  };
@@ -26,6 +26,7 @@ import { GetImageRecipeCommandInput, GetImageRecipeCommandOutput } from "./comma
26
26
  import { GetImageRecipePolicyCommandInput, GetImageRecipePolicyCommandOutput } from "./commands/GetImageRecipePolicyCommand";
27
27
  import { GetInfrastructureConfigurationCommandInput, GetInfrastructureConfigurationCommandOutput } from "./commands/GetInfrastructureConfigurationCommand";
28
28
  import { ImportComponentCommandInput, ImportComponentCommandOutput } from "./commands/ImportComponentCommand";
29
+ import { ImportVmImageCommandInput, ImportVmImageCommandOutput } from "./commands/ImportVmImageCommand";
29
30
  import { ListComponentBuildVersionsCommandInput, ListComponentBuildVersionsCommandOutput } from "./commands/ListComponentBuildVersionsCommand";
30
31
  import { ListComponentsCommandInput, ListComponentsCommandOutput } from "./commands/ListComponentsCommand";
31
32
  import { ListContainerRecipesCommandInput, ListContainerRecipesCommandOutput } from "./commands/ListContainerRecipesCommand";
@@ -246,6 +247,20 @@ export declare class Imagebuilder extends ImagebuilderClient {
246
247
  importComponent(args: ImportComponentCommandInput, options?: __HttpHandlerOptions): Promise<ImportComponentCommandOutput>;
247
248
  importComponent(args: ImportComponentCommandInput, cb: (err: any, data?: ImportComponentCommandOutput) => void): void;
248
249
  importComponent(args: ImportComponentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportComponentCommandOutput) => void): void;
250
+ /**
251
+ * <p>When you export your virtual machine (VM) from its virtualization environment,
252
+ * that process creates a set of one or more disk container files that act as
253
+ * snapshots of your VM’s environment, settings, and data. The Amazon EC2 API
254
+ * <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportImage.html">ImportImage</a>
255
+ * action uses those files to import your VM and create an AMI. To import using the
256
+ * CLI command, see <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/import-image.html">import-image</a>
257
+ * </p>
258
+ * <p>You can reference the task ID from the VM import to pull in the AMI that
259
+ * the import created as the base image for your Image Builder recipe.</p>
260
+ */
261
+ importVmImage(args: ImportVmImageCommandInput, options?: __HttpHandlerOptions): Promise<ImportVmImageCommandOutput>;
262
+ importVmImage(args: ImportVmImageCommandInput, cb: (err: any, data?: ImportVmImageCommandOutput) => void): void;
263
+ importVmImage(args: ImportVmImageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportVmImageCommandOutput) => void): void;
249
264
  /**
250
265
  * <p> Returns the list of component build versions for the specified semantic version.</p>
251
266
  * <note>