|
| 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 | +} |
0 commit comments