|
| 1 | +// smithy-typescript generated code |
| 2 | +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; |
| 5 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 6 | +import { |
| 7 | + FinalizeHandlerArguments, |
| 8 | + Handler, |
| 9 | + HandlerExecutionContext, |
| 10 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 11 | + MetadataBearer as __MetadataBearer, |
| 12 | + MiddlewareStack, |
| 13 | + SerdeContext as __SerdeContext, |
| 14 | + SMITHY_CONTEXT_KEY, |
| 15 | +} from "@smithy/types"; |
| 16 | + |
| 17 | +import { |
| 18 | + MarketplaceCatalogClientResolvedConfig, |
| 19 | + ServiceInputTypes, |
| 20 | + ServiceOutputTypes, |
| 21 | +} from "../MarketplaceCatalogClient"; |
| 22 | +import { BatchDescribeEntitiesRequest, BatchDescribeEntitiesResponse } from "../models/models_0"; |
| 23 | +import { de_BatchDescribeEntitiesCommand, se_BatchDescribeEntitiesCommand } from "../protocols/Aws_restJson1"; |
| 24 | + |
| 25 | +/** |
| 26 | + * @public |
| 27 | + */ |
| 28 | +export { __MetadataBearer, $Command }; |
| 29 | +/** |
| 30 | + * @public |
| 31 | + * |
| 32 | + * The input for {@link BatchDescribeEntitiesCommand}. |
| 33 | + */ |
| 34 | +export interface BatchDescribeEntitiesCommandInput extends BatchDescribeEntitiesRequest {} |
| 35 | +/** |
| 36 | + * @public |
| 37 | + * |
| 38 | + * The output of {@link BatchDescribeEntitiesCommand}. |
| 39 | + */ |
| 40 | +export interface BatchDescribeEntitiesCommandOutput extends BatchDescribeEntitiesResponse, __MetadataBearer {} |
| 41 | + |
| 42 | +/** |
| 43 | + * @public |
| 44 | + * <p>Returns metadata and content for multiple entities.</p> |
| 45 | + * @example |
| 46 | + * Use a bare-bones client and the command you need to make an API call. |
| 47 | + * ```javascript |
| 48 | + * import { MarketplaceCatalogClient, BatchDescribeEntitiesCommand } from "@aws-sdk/client-marketplace-catalog"; // ES Modules import |
| 49 | + * // const { MarketplaceCatalogClient, BatchDescribeEntitiesCommand } = require("@aws-sdk/client-marketplace-catalog"); // CommonJS import |
| 50 | + * const client = new MarketplaceCatalogClient(config); |
| 51 | + * const input = { // BatchDescribeEntitiesRequest |
| 52 | + * EntityRequestList: [ // EntityRequestList // required |
| 53 | + * { // EntityRequest |
| 54 | + * Catalog: "STRING_VALUE", // required |
| 55 | + * EntityId: "STRING_VALUE", // required |
| 56 | + * }, |
| 57 | + * ], |
| 58 | + * }; |
| 59 | + * const command = new BatchDescribeEntitiesCommand(input); |
| 60 | + * const response = await client.send(command); |
| 61 | + * // { // BatchDescribeEntitiesResponse |
| 62 | + * // EntityDetails: { // EntityDetails |
| 63 | + * // "<keys>": { // EntityDetail |
| 64 | + * // EntityType: "STRING_VALUE", |
| 65 | + * // EntityArn: "STRING_VALUE", |
| 66 | + * // EntityIdentifier: "STRING_VALUE", |
| 67 | + * // LastModifiedDate: "STRING_VALUE", |
| 68 | + * // DetailsDocument: "DOCUMENT_VALUE", |
| 69 | + * // }, |
| 70 | + * // }, |
| 71 | + * // Errors: { // Errors |
| 72 | + * // "<keys>": { // BatchDescribeErrorDetail |
| 73 | + * // ErrorCode: "STRING_VALUE", |
| 74 | + * // ErrorMessage: "STRING_VALUE", |
| 75 | + * // }, |
| 76 | + * // }, |
| 77 | + * // }; |
| 78 | + * |
| 79 | + * ``` |
| 80 | + * |
| 81 | + * @param BatchDescribeEntitiesCommandInput - {@link BatchDescribeEntitiesCommandInput} |
| 82 | + * @returns {@link BatchDescribeEntitiesCommandOutput} |
| 83 | + * @see {@link BatchDescribeEntitiesCommandInput} for command's `input` shape. |
| 84 | + * @see {@link BatchDescribeEntitiesCommandOutput} for command's `response` shape. |
| 85 | + * @see {@link MarketplaceCatalogClientResolvedConfig | config} for MarketplaceCatalogClient's `config` shape. |
| 86 | + * |
| 87 | + * @throws {@link AccessDeniedException} (client fault) |
| 88 | + * <p>Access is denied.</p> |
| 89 | + * <p>HTTP status code: 403</p> |
| 90 | + * |
| 91 | + * @throws {@link InternalServiceException} (server fault) |
| 92 | + * <p>There was an internal service exception.</p> |
| 93 | + * <p>HTTP status code: 500</p> |
| 94 | + * |
| 95 | + * @throws {@link ThrottlingException} (client fault) |
| 96 | + * <p>Too many requests.</p> |
| 97 | + * <p>HTTP status code: 429</p> |
| 98 | + * |
| 99 | + * @throws {@link ValidationException} (client fault) |
| 100 | + * <p>An error occurred during validation.</p> |
| 101 | + * <p>HTTP status code: 422</p> |
| 102 | + * |
| 103 | + * @throws {@link MarketplaceCatalogServiceException} |
| 104 | + * <p>Base exception class for all service exceptions from MarketplaceCatalog service.</p> |
| 105 | + * |
| 106 | + */ |
| 107 | +export class BatchDescribeEntitiesCommand extends $Command< |
| 108 | + BatchDescribeEntitiesCommandInput, |
| 109 | + BatchDescribeEntitiesCommandOutput, |
| 110 | + MarketplaceCatalogClientResolvedConfig |
| 111 | +> { |
| 112 | + public static getEndpointParameterInstructions(): EndpointParameterInstructions { |
| 113 | + return { |
| 114 | + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, |
| 115 | + Endpoint: { type: "builtInParams", name: "endpoint" }, |
| 116 | + Region: { type: "builtInParams", name: "region" }, |
| 117 | + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, |
| 118 | + }; |
| 119 | + } |
| 120 | + |
| 121 | + /** |
| 122 | + * @public |
| 123 | + */ |
| 124 | + constructor(readonly input: BatchDescribeEntitiesCommandInput) { |
| 125 | + super(); |
| 126 | + } |
| 127 | + |
| 128 | + /** |
| 129 | + * @internal |
| 130 | + */ |
| 131 | + resolveMiddleware( |
| 132 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 133 | + configuration: MarketplaceCatalogClientResolvedConfig, |
| 134 | + options?: __HttpHandlerOptions |
| 135 | + ): Handler<BatchDescribeEntitiesCommandInput, BatchDescribeEntitiesCommandOutput> { |
| 136 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 137 | + this.middlewareStack.use( |
| 138 | + getEndpointPlugin(configuration, BatchDescribeEntitiesCommand.getEndpointParameterInstructions()) |
| 139 | + ); |
| 140 | + |
| 141 | + const stack = clientStack.concat(this.middlewareStack); |
| 142 | + |
| 143 | + const { logger } = configuration; |
| 144 | + const clientName = "MarketplaceCatalogClient"; |
| 145 | + const commandName = "BatchDescribeEntitiesCommand"; |
| 146 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 147 | + logger, |
| 148 | + clientName, |
| 149 | + commandName, |
| 150 | + inputFilterSensitiveLog: (_: any) => _, |
| 151 | + outputFilterSensitiveLog: (_: any) => _, |
| 152 | + [SMITHY_CONTEXT_KEY]: { |
| 153 | + service: "AWSMPSeymour", |
| 154 | + operation: "BatchDescribeEntities", |
| 155 | + }, |
| 156 | + }; |
| 157 | + const { requestHandler } = configuration; |
| 158 | + return stack.resolve( |
| 159 | + (request: FinalizeHandlerArguments<any>) => |
| 160 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 161 | + handlerExecutionContext |
| 162 | + ); |
| 163 | + } |
| 164 | + |
| 165 | + /** |
| 166 | + * @internal |
| 167 | + */ |
| 168 | + private serialize(input: BatchDescribeEntitiesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 169 | + return se_BatchDescribeEntitiesCommand(input, context); |
| 170 | + } |
| 171 | + |
| 172 | + /** |
| 173 | + * @internal |
| 174 | + */ |
| 175 | + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<BatchDescribeEntitiesCommandOutput> { |
| 176 | + return de_BatchDescribeEntitiesCommand(output, context); |
| 177 | + } |
| 178 | +} |
0 commit comments