Skip to content

Commit 225a408

Browse files
author
awstools
committed
feat(client-imagebuilder): This release adds support for importing images from ISO disk files. Added new ImportDiskImage API operation.
1 parent b2cbba5 commit 225a408

12 files changed

+476
-18
lines changed

clients/client-imagebuilder/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,14 @@ ImportComponent
509509

510510
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/imagebuilder/command/ImportComponentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/ImportComponentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/ImportComponentCommandOutput/)
511511

512+
</details>
513+
<details>
514+
<summary>
515+
ImportDiskImage
516+
</summary>
517+
518+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/imagebuilder/command/ImportDiskImageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/ImportDiskImageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/ImportDiskImageCommandOutput/)
519+
512520
</details>
513521
<details>
514522
<summary>

clients/client-imagebuilder/src/Imagebuilder.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ import {
176176
ImportComponentCommandInput,
177177
ImportComponentCommandOutput,
178178
} from "./commands/ImportComponentCommand";
179+
import {
180+
ImportDiskImageCommand,
181+
ImportDiskImageCommandInput,
182+
ImportDiskImageCommandOutput,
183+
} from "./commands/ImportDiskImageCommand";
179184
import {
180185
ImportVmImageCommand,
181186
ImportVmImageCommandInput,
@@ -389,6 +394,7 @@ const commands = {
389394
GetWorkflowExecutionCommand,
390395
GetWorkflowStepExecutionCommand,
391396
ImportComponentCommand,
397+
ImportDiskImageCommand,
392398
ImportVmImageCommand,
393399
ListComponentBuildVersionsCommand,
394400
ListComponentsCommand,
@@ -1023,6 +1029,20 @@ export interface Imagebuilder {
10231029
cb: (err: any, data?: ImportComponentCommandOutput) => void
10241030
): void;
10251031

1032+
/**
1033+
* @see {@link ImportDiskImageCommand}
1034+
*/
1035+
importDiskImage(
1036+
args: ImportDiskImageCommandInput,
1037+
options?: __HttpHandlerOptions
1038+
): Promise<ImportDiskImageCommandOutput>;
1039+
importDiskImage(args: ImportDiskImageCommandInput, cb: (err: any, data?: ImportDiskImageCommandOutput) => void): void;
1040+
importDiskImage(
1041+
args: ImportDiskImageCommandInput,
1042+
options: __HttpHandlerOptions,
1043+
cb: (err: any, data?: ImportDiskImageCommandOutput) => void
1044+
): void;
1045+
10261046
/**
10271047
* @see {@link ImportVmImageCommand}
10281048
*/

clients/client-imagebuilder/src/ImagebuilderClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ import {
151151
GetWorkflowStepExecutionCommandOutput,
152152
} from "./commands/GetWorkflowStepExecutionCommand";
153153
import { ImportComponentCommandInput, ImportComponentCommandOutput } from "./commands/ImportComponentCommand";
154+
import { ImportDiskImageCommandInput, ImportDiskImageCommandOutput } from "./commands/ImportDiskImageCommand";
154155
import { ImportVmImageCommandInput, ImportVmImageCommandOutput } from "./commands/ImportVmImageCommand";
155156
import {
156157
ListComponentBuildVersionsCommandInput,
@@ -315,6 +316,7 @@ export type ServiceInputTypes =
315316
| GetWorkflowExecutionCommandInput
316317
| GetWorkflowStepExecutionCommandInput
317318
| ImportComponentCommandInput
319+
| ImportDiskImageCommandInput
318320
| ImportVmImageCommandInput
319321
| ListComponentBuildVersionsCommandInput
320322
| ListComponentsCommandInput
@@ -394,6 +396,7 @@ export type ServiceOutputTypes =
394396
| GetWorkflowExecutionCommandOutput
395397
| GetWorkflowStepExecutionCommandOutput
396398
| ImportComponentCommandOutput
399+
| ImportDiskImageCommandOutput
397400
| ImportVmImageCommandOutput
398401
| ListComponentBuildVersionsCommandOutput
399402
| ListComponentsCommandOutput

clients/client-imagebuilder/src/commands/GetImageCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export interface GetImageCommandOutput extends GetImageResponse, __MetadataBeare
311311
* // ],
312312
* // },
313313
* // tags: "<TagMap>",
314-
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT",
314+
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT" || "IMPORT_ISO",
315315
* // imageSource: "AMAZON_MANAGED" || "AWS_MARKETPLACE" || "IMPORTED" || "CUSTOM",
316316
* // scanState: { // ImageScanState
317317
* // status: "PENDING" || "SCANNING" || "COLLECTING" || "COMPLETED" || "ABANDONED" || "FAILED" || "TIMED_OUT",
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { ImagebuilderClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ImagebuilderClient";
9+
import { ImportDiskImageRequest, ImportDiskImageResponse } from "../models/models_0";
10+
import { de_ImportDiskImageCommand, se_ImportDiskImageCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link ImportDiskImageCommand}.
21+
*/
22+
export interface ImportDiskImageCommandInput extends ImportDiskImageRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link ImportDiskImageCommand}.
27+
*/
28+
export interface ImportDiskImageCommandOutput extends ImportDiskImageResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Import a Windows operating system image from a verified Microsoft ISO disk
32+
* file. The following disk images are supported:</p>
33+
* <ul>
34+
* <li>
35+
* <p>Windows 11 Enterprise</p>
36+
* </li>
37+
* </ul>
38+
* @example
39+
* Use a bare-bones client and the command you need to make an API call.
40+
* ```javascript
41+
* import { ImagebuilderClient, ImportDiskImageCommand } from "@aws-sdk/client-imagebuilder"; // ES Modules import
42+
* // const { ImagebuilderClient, ImportDiskImageCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
43+
* const client = new ImagebuilderClient(config);
44+
* const input = { // ImportDiskImageRequest
45+
* name: "STRING_VALUE", // required
46+
* semanticVersion: "STRING_VALUE", // required
47+
* description: "STRING_VALUE",
48+
* platform: "STRING_VALUE", // required
49+
* osVersion: "STRING_VALUE", // required
50+
* executionRole: "STRING_VALUE",
51+
* infrastructureConfigurationArn: "STRING_VALUE", // required
52+
* uri: "STRING_VALUE", // required
53+
* tags: { // TagMap
54+
* "<keys>": "STRING_VALUE",
55+
* },
56+
* clientToken: "STRING_VALUE", // required
57+
* };
58+
* const command = new ImportDiskImageCommand(input);
59+
* const response = await client.send(command);
60+
* // { // ImportDiskImageResponse
61+
* // clientToken: "STRING_VALUE",
62+
* // imageBuildVersionArn: "STRING_VALUE",
63+
* // };
64+
*
65+
* ```
66+
*
67+
* @param ImportDiskImageCommandInput - {@link ImportDiskImageCommandInput}
68+
* @returns {@link ImportDiskImageCommandOutput}
69+
* @see {@link ImportDiskImageCommandInput} for command's `input` shape.
70+
* @see {@link ImportDiskImageCommandOutput} for command's `response` shape.
71+
* @see {@link ImagebuilderClientResolvedConfig | config} for ImagebuilderClient's `config` shape.
72+
*
73+
* @throws {@link ClientException} (client fault)
74+
* <p>These errors are usually caused by a client action, such as using an action or
75+
* resource on behalf of a user that doesn't have permissions to use the action or
76+
* resource, or specifying an invalid resource identifier.</p>
77+
*
78+
* @throws {@link ServiceException} (server fault)
79+
* <p>This exception is thrown when the service encounters an unrecoverable
80+
* exception.</p>
81+
*
82+
* @throws {@link ServiceUnavailableException} (server fault)
83+
* <p>The service is unable to process your request at this time.</p>
84+
*
85+
* @throws {@link ImagebuilderServiceException}
86+
* <p>Base exception class for all service exceptions from Imagebuilder service.</p>
87+
*
88+
* @public
89+
*/
90+
export class ImportDiskImageCommand extends $Command
91+
.classBuilder<
92+
ImportDiskImageCommandInput,
93+
ImportDiskImageCommandOutput,
94+
ImagebuilderClientResolvedConfig,
95+
ServiceInputTypes,
96+
ServiceOutputTypes
97+
>()
98+
.ep(commonParams)
99+
.m(function (this: any, Command: any, cs: any, config: ImagebuilderClientResolvedConfig, o: any) {
100+
return [
101+
getSerdePlugin(config, this.serialize, this.deserialize),
102+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
103+
];
104+
})
105+
.s("imagebuilder", "ImportDiskImage", {})
106+
.n("ImagebuilderClient", "ImportDiskImageCommand")
107+
.f(void 0, void 0)
108+
.ser(se_ImportDiskImageCommand)
109+
.de(de_ImportDiskImageCommand)
110+
.build() {
111+
/** @internal type navigation helper, not in runtime. */
112+
protected declare static __types: {
113+
api: {
114+
input: ImportDiskImageRequest;
115+
output: ImportDiskImageResponse;
116+
};
117+
sdk: {
118+
input: ImportDiskImageCommandInput;
119+
output: ImportDiskImageCommandOutput;
120+
};
121+
};
122+
}

clients/client-imagebuilder/src/commands/ListImageBuildVersionsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface ListImageBuildVersionsCommandOutput extends ListImageBuildVersi
9292
* // tags: { // TagMap
9393
* // "<keys>": "STRING_VALUE",
9494
* // },
95-
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT",
95+
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT" || "IMPORT_ISO",
9696
* // imageSource: "AMAZON_MANAGED" || "AWS_MARKETPLACE" || "IMPORTED" || "CUSTOM",
9797
* // deprecationTime: new Date("TIMESTAMP"),
9898
* // lifecycleExecutionId: "STRING_VALUE",

clients/client-imagebuilder/src/commands/ListImagePipelineImagesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface ListImagePipelineImagesCommandOutput extends ListImagePipelineI
9292
* // tags: { // TagMap
9393
* // "<keys>": "STRING_VALUE",
9494
* // },
95-
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT",
95+
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT" || "IMPORT_ISO",
9696
* // imageSource: "AMAZON_MANAGED" || "AWS_MARKETPLACE" || "IMPORTED" || "CUSTOM",
9797
* // deprecationTime: new Date("TIMESTAMP"),
9898
* // lifecycleExecutionId: "STRING_VALUE",

clients/client-imagebuilder/src/commands/ListImagesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export interface ListImagesCommandOutput extends ListImagesResponse, __MetadataB
6565
* // osVersion: "STRING_VALUE",
6666
* // owner: "STRING_VALUE",
6767
* // dateCreated: "STRING_VALUE",
68-
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT",
68+
* // buildType: "USER_INITIATED" || "SCHEDULED" || "IMPORT" || "IMPORT_ISO",
6969
* // imageSource: "AMAZON_MANAGED" || "AWS_MARKETPLACE" || "IMPORTED" || "CUSTOM",
7070
* // },
7171
* // ],

clients/client-imagebuilder/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export * from "./GetWorkflowCommand";
3737
export * from "./GetWorkflowExecutionCommand";
3838
export * from "./GetWorkflowStepExecutionCommand";
3939
export * from "./ImportComponentCommand";
40+
export * from "./ImportDiskImageCommand";
4041
export * from "./ImportVmImageCommand";
4142
export * from "./ListComponentBuildVersionsCommand";
4243
export * from "./ListComponentsCommand";

0 commit comments

Comments
 (0)