Skip to content

Commit 967f0c2

Browse files
author
awstools
committed
feat(client-imagebuilder): Added support for EC2 Image Builder's integration with AWS Marketplace for Marketplace components.
1 parent 4ed232e commit 967f0c2

15 files changed

+570
-25
lines changed

Diff for: clients/client-imagebuilder/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,14 @@ GetLifecyclePolicy
469469

470470
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/imagebuilder/command/GetLifecyclePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/GetLifecyclePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/GetLifecyclePolicyCommandOutput/)
471471

472+
</details>
473+
<details>
474+
<summary>
475+
GetMarketplaceResource
476+
</summary>
477+
478+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/imagebuilder/command/GetMarketplaceResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/GetMarketplaceResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-imagebuilder/Interface/GetMarketplaceResourceCommandOutput/)
479+
472480
</details>
473481
<details>
474482
<summary>

Diff for: clients/client-imagebuilder/src/Imagebuilder.ts

+23
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ import {
155155
GetLifecyclePolicyCommandInput,
156156
GetLifecyclePolicyCommandOutput,
157157
} from "./commands/GetLifecyclePolicyCommand";
158+
import {
159+
GetMarketplaceResourceCommand,
160+
GetMarketplaceResourceCommandInput,
161+
GetMarketplaceResourceCommandOutput,
162+
} from "./commands/GetMarketplaceResourceCommand";
158163
import { GetWorkflowCommand, GetWorkflowCommandInput, GetWorkflowCommandOutput } from "./commands/GetWorkflowCommand";
159164
import {
160165
GetWorkflowExecutionCommand,
@@ -379,6 +384,7 @@ const commands = {
379384
GetInfrastructureConfigurationCommand,
380385
GetLifecycleExecutionCommand,
381386
GetLifecyclePolicyCommand,
387+
GetMarketplaceResourceCommand,
382388
GetWorkflowCommand,
383389
GetWorkflowExecutionCommand,
384390
GetWorkflowStepExecutionCommand,
@@ -941,6 +947,23 @@ export interface Imagebuilder {
941947
cb: (err: any, data?: GetLifecyclePolicyCommandOutput) => void
942948
): void;
943949

950+
/**
951+
* @see {@link GetMarketplaceResourceCommand}
952+
*/
953+
getMarketplaceResource(
954+
args: GetMarketplaceResourceCommandInput,
955+
options?: __HttpHandlerOptions
956+
): Promise<GetMarketplaceResourceCommandOutput>;
957+
getMarketplaceResource(
958+
args: GetMarketplaceResourceCommandInput,
959+
cb: (err: any, data?: GetMarketplaceResourceCommandOutput) => void
960+
): void;
961+
getMarketplaceResource(
962+
args: GetMarketplaceResourceCommandInput,
963+
options: __HttpHandlerOptions,
964+
cb: (err: any, data?: GetMarketplaceResourceCommandOutput) => void
965+
): void;
966+
944967
/**
945968
* @see {@link GetWorkflowCommand}
946969
*/

Diff for: clients/client-imagebuilder/src/ImagebuilderClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ import {
137137
GetLifecycleExecutionCommandOutput,
138138
} from "./commands/GetLifecycleExecutionCommand";
139139
import { GetLifecyclePolicyCommandInput, GetLifecyclePolicyCommandOutput } from "./commands/GetLifecyclePolicyCommand";
140+
import {
141+
GetMarketplaceResourceCommandInput,
142+
GetMarketplaceResourceCommandOutput,
143+
} from "./commands/GetMarketplaceResourceCommand";
140144
import { GetWorkflowCommandInput, GetWorkflowCommandOutput } from "./commands/GetWorkflowCommand";
141145
import {
142146
GetWorkflowExecutionCommandInput,
@@ -306,6 +310,7 @@ export type ServiceInputTypes =
306310
| GetInfrastructureConfigurationCommandInput
307311
| GetLifecycleExecutionCommandInput
308312
| GetLifecyclePolicyCommandInput
313+
| GetMarketplaceResourceCommandInput
309314
| GetWorkflowCommandInput
310315
| GetWorkflowExecutionCommandInput
311316
| GetWorkflowStepExecutionCommandInput
@@ -384,6 +389,7 @@ export type ServiceOutputTypes =
384389
| GetInfrastructureConfigurationCommandOutput
385390
| GetLifecycleExecutionCommandOutput
386391
| GetLifecyclePolicyCommandOutput
392+
| GetMarketplaceResourceCommandOutput
387393
| GetWorkflowCommandOutput
388394
| GetWorkflowExecutionCommandOutput
389395
| GetWorkflowStepExecutionCommandOutput

Diff for: clients/client-imagebuilder/src/commands/GetComponentCommand.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export interface GetComponentCommandOutput extends GetComponentResponse, __Metad
5454
* // "STRING_VALUE",
5555
* // ],
5656
* // state: { // ComponentState
57-
* // status: "DEPRECATED",
57+
* // status: "DEPRECATED" || "DISABLED" || "ACTIVE",
5858
* // reason: "STRING_VALUE",
5959
* // },
6060
* // parameters: [ // ComponentParameterDetailList
@@ -77,6 +77,12 @@ export interface GetComponentCommandOutput extends GetComponentResponse, __Metad
7777
* // },
7878
* // publisher: "STRING_VALUE",
7979
* // obfuscate: true || false,
80+
* // productCodes: [ // ProductCodeList
81+
* // { // ProductCodeListItem
82+
* // productCodeId: "STRING_VALUE", // required
83+
* // productCodeType: "marketplace", // required
84+
* // },
85+
* // ],
8086
* // },
8187
* // };
8288
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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 { GetMarketplaceResourceRequest, GetMarketplaceResourceResponse } from "../models/models_0";
10+
import { de_GetMarketplaceResourceCommand, se_GetMarketplaceResourceCommand } 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 GetMarketplaceResourceCommand}.
21+
*/
22+
export interface GetMarketplaceResourceCommandInput extends GetMarketplaceResourceRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link GetMarketplaceResourceCommand}.
27+
*/
28+
export interface GetMarketplaceResourceCommandOutput extends GetMarketplaceResourceResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Verify the subscription and perform resource dependency checks on the requested
32+
* Amazon Web Services Marketplace resource. For Amazon Web Services Marketplace components, the response contains fields to download the
33+
* components and their artifacts.</p>
34+
* @example
35+
* Use a bare-bones client and the command you need to make an API call.
36+
* ```javascript
37+
* import { ImagebuilderClient, GetMarketplaceResourceCommand } from "@aws-sdk/client-imagebuilder"; // ES Modules import
38+
* // const { ImagebuilderClient, GetMarketplaceResourceCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
39+
* const client = new ImagebuilderClient(config);
40+
* const input = { // GetMarketplaceResourceRequest
41+
* resourceType: "COMPONENT_DATA" || "COMPONENT_ARTIFACT", // required
42+
* resourceArn: "STRING_VALUE", // required
43+
* resourceLocation: "STRING_VALUE",
44+
* };
45+
* const command = new GetMarketplaceResourceCommand(input);
46+
* const response = await client.send(command);
47+
* // { // GetMarketplaceResourceResponse
48+
* // resourceArn: "STRING_VALUE",
49+
* // url: "STRING_VALUE",
50+
* // data: "STRING_VALUE",
51+
* // };
52+
*
53+
* ```
54+
*
55+
* @param GetMarketplaceResourceCommandInput - {@link GetMarketplaceResourceCommandInput}
56+
* @returns {@link GetMarketplaceResourceCommandOutput}
57+
* @see {@link GetMarketplaceResourceCommandInput} for command's `input` shape.
58+
* @see {@link GetMarketplaceResourceCommandOutput} for command's `response` shape.
59+
* @see {@link ImagebuilderClientResolvedConfig | config} for ImagebuilderClient's `config` shape.
60+
*
61+
* @throws {@link CallRateLimitExceededException} (client fault)
62+
* <p>You have exceeded the permitted request rate for the specific operation.</p>
63+
*
64+
* @throws {@link ClientException} (client fault)
65+
* <p>These errors are usually caused by a client action, such as using an action or
66+
* resource on behalf of a user that doesn't have permissions to use the action or
67+
* resource, or specifying an invalid resource identifier.</p>
68+
*
69+
* @throws {@link ForbiddenException} (client fault)
70+
* <p>You are not authorized to perform the requested operation.</p>
71+
*
72+
* @throws {@link InvalidRequestException} (client fault)
73+
* <p>You have requested an action that that the service doesn't support.</p>
74+
*
75+
* @throws {@link ServiceException} (server fault)
76+
* <p>This exception is thrown when the service encounters an unrecoverable
77+
* exception.</p>
78+
*
79+
* @throws {@link ServiceUnavailableException} (server fault)
80+
* <p>The service is unable to process your request at this time.</p>
81+
*
82+
* @throws {@link ImagebuilderServiceException}
83+
* <p>Base exception class for all service exceptions from Imagebuilder service.</p>
84+
*
85+
* @public
86+
*/
87+
export class GetMarketplaceResourceCommand extends $Command
88+
.classBuilder<
89+
GetMarketplaceResourceCommandInput,
90+
GetMarketplaceResourceCommandOutput,
91+
ImagebuilderClientResolvedConfig,
92+
ServiceInputTypes,
93+
ServiceOutputTypes
94+
>()
95+
.ep(commonParams)
96+
.m(function (this: any, Command: any, cs: any, config: ImagebuilderClientResolvedConfig, o: any) {
97+
return [
98+
getSerdePlugin(config, this.serialize, this.deserialize),
99+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
100+
];
101+
})
102+
.s("imagebuilder", "GetMarketplaceResource", {})
103+
.n("ImagebuilderClient", "GetMarketplaceResourceCommand")
104+
.f(void 0, void 0)
105+
.ser(se_GetMarketplaceResourceCommand)
106+
.de(de_GetMarketplaceResourceCommand)
107+
.build() {
108+
/** @internal type navigation helper, not in runtime. */
109+
protected declare static __types: {
110+
api: {
111+
input: GetMarketplaceResourceRequest;
112+
output: GetMarketplaceResourceResponse;
113+
};
114+
sdk: {
115+
input: GetMarketplaceResourceCommandInput;
116+
output: GetMarketplaceResourceCommandOutput;
117+
};
118+
};
119+
}

Diff for: clients/client-imagebuilder/src/commands/ListComponentBuildVersionsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface ListComponentBuildVersionsCommandOutput extends ListComponentBu
5555
* // "STRING_VALUE",
5656
* // ],
5757
* // state: { // ComponentState
58-
* // status: "DEPRECATED",
58+
* // status: "DEPRECATED" || "DISABLED" || "ACTIVE",
5959
* // reason: "STRING_VALUE",
6060
* // },
6161
* // type: "BUILD" || "TEST",

Diff for: clients/client-imagebuilder/src/commands/ListComponentsCommand.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface ListComponentsCommandOutput extends ListComponentsResponse, __M
4747
* // const { ImagebuilderClient, ListComponentsCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
4848
* const client = new ImagebuilderClient(config);
4949
* const input = { // ListComponentsRequest
50-
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty",
50+
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty" || "AWSMarketplace",
5151
* filters: [ // FilterList
5252
* { // Filter
5353
* name: "STRING_VALUE",
@@ -77,6 +77,13 @@ export interface ListComponentsCommandOutput extends ListComponentsResponse, __M
7777
* // type: "BUILD" || "TEST",
7878
* // owner: "STRING_VALUE",
7979
* // dateCreated: "STRING_VALUE",
80+
* // status: "DEPRECATED" || "DISABLED" || "ACTIVE",
81+
* // productCodes: [ // ProductCodeList
82+
* // { // ProductCodeListItem
83+
* // productCodeId: "STRING_VALUE", // required
84+
* // productCodeType: "marketplace", // required
85+
* // },
86+
* // ],
8087
* // },
8188
* // ],
8289
* // nextToken: "STRING_VALUE",

Diff for: clients/client-imagebuilder/src/commands/ListContainerRecipesCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface ListContainerRecipesCommandOutput extends ListContainerRecipesR
3636
* // const { ImagebuilderClient, ListContainerRecipesCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
3737
* const client = new ImagebuilderClient(config);
3838
* const input = { // ListContainerRecipesRequest
39-
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty",
39+
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty" || "AWSMarketplace",
4040
* filters: [ // FilterList
4141
* { // Filter
4242
* name: "STRING_VALUE",

Diff for: clients/client-imagebuilder/src/commands/ListImageRecipesCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface ListImageRecipesCommandOutput extends ListImageRecipesResponse,
3636
* // const { ImagebuilderClient, ListImageRecipesCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
3737
* const client = new ImagebuilderClient(config);
3838
* const input = { // ListImageRecipesRequest
39-
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty",
39+
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty" || "AWSMarketplace",
4040
* filters: [ // FilterList
4141
* { // Filter
4242
* name: "STRING_VALUE",

Diff for: clients/client-imagebuilder/src/commands/ListImagesCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface ListImagesCommandOutput extends ListImagesResponse, __MetadataB
3737
* // const { ImagebuilderClient, ListImagesCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
3838
* const client = new ImagebuilderClient(config);
3939
* const input = { // ListImagesRequest
40-
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty",
40+
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty" || "AWSMarketplace",
4141
* filters: [ // FilterList
4242
* { // Filter
4343
* name: "STRING_VALUE",

Diff for: clients/client-imagebuilder/src/commands/ListWorkflowsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface ListWorkflowsCommandOutput extends ListWorkflowsResponse, __Met
3636
* // const { ImagebuilderClient, ListWorkflowsCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
3737
* const client = new ImagebuilderClient(config);
3838
* const input = { // ListWorkflowsRequest
39-
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty",
39+
* owner: "Self" || "Shared" || "Amazon" || "ThirdParty" || "AWSMarketplace",
4040
* filters: [ // FilterList
4141
* { // Filter
4242
* name: "STRING_VALUE",

Diff for: clients/client-imagebuilder/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export * from "./GetImageRecipePolicyCommand";
3232
export * from "./GetInfrastructureConfigurationCommand";
3333
export * from "./GetLifecycleExecutionCommand";
3434
export * from "./GetLifecyclePolicyCommand";
35+
export * from "./GetMarketplaceResourceCommand";
3536
export * from "./GetWorkflowCommand";
3637
export * from "./GetWorkflowExecutionCommand";
3738
export * from "./GetWorkflowStepExecutionCommand";

0 commit comments

Comments
 (0)