Skip to content

Commit d96b606

Browse files
author
awstools
committed
feat(client-marketplace-catalog): AWS Marketplace now supports a new API, BatchDescribeEntities, which returns metadata and content for multiple entities.
1 parent 0d9d3e8 commit d96b606

File tree

8 files changed

+693
-46
lines changed

8 files changed

+693
-46
lines changed

Diff for: clients/client-marketplace-catalog/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,14 @@ see LICENSE for more information.
208208

209209
## Client Commands (Operations List)
210210

211+
<details>
212+
<summary>
213+
BatchDescribeEntities
214+
</summary>
215+
216+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/marketplace-catalog/command/BatchDescribeEntitiesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-catalog/Interface/BatchDescribeEntitiesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-marketplace-catalog/Interface/BatchDescribeEntitiesCommandOutput/)
217+
218+
</details>
211219
<details>
212220
<summary>
213221
CancelChangeSet

Diff for: clients/client-marketplace-catalog/src/MarketplaceCatalog.ts

+23
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5+
import {
6+
BatchDescribeEntitiesCommand,
7+
BatchDescribeEntitiesCommandInput,
8+
BatchDescribeEntitiesCommandOutput,
9+
} from "./commands/BatchDescribeEntitiesCommand";
510
import {
611
CancelChangeSetCommand,
712
CancelChangeSetCommandInput,
@@ -61,6 +66,7 @@ import {
6166
import { MarketplaceCatalogClient, MarketplaceCatalogClientConfig } from "./MarketplaceCatalogClient";
6267

6368
const commands = {
69+
BatchDescribeEntitiesCommand,
6470
CancelChangeSetCommand,
6571
DeleteResourcePolicyCommand,
6672
DescribeChangeSetCommand,
@@ -76,6 +82,23 @@ const commands = {
7682
};
7783

7884
export interface MarketplaceCatalog {
85+
/**
86+
* @see {@link BatchDescribeEntitiesCommand}
87+
*/
88+
batchDescribeEntities(
89+
args: BatchDescribeEntitiesCommandInput,
90+
options?: __HttpHandlerOptions
91+
): Promise<BatchDescribeEntitiesCommandOutput>;
92+
batchDescribeEntities(
93+
args: BatchDescribeEntitiesCommandInput,
94+
cb: (err: any, data?: BatchDescribeEntitiesCommandOutput) => void
95+
): void;
96+
batchDescribeEntities(
97+
args: BatchDescribeEntitiesCommandInput,
98+
options: __HttpHandlerOptions,
99+
cb: (err: any, data?: BatchDescribeEntitiesCommandOutput) => void
100+
): void;
101+
79102
/**
80103
* @see {@link CancelChangeSetCommand}
81104
*/

Diff for: clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ import {
4848
UserAgent as __UserAgent,
4949
} from "@smithy/types";
5050

51+
import {
52+
BatchDescribeEntitiesCommandInput,
53+
BatchDescribeEntitiesCommandOutput,
54+
} from "./commands/BatchDescribeEntitiesCommand";
5155
import { CancelChangeSetCommandInput, CancelChangeSetCommandOutput } from "./commands/CancelChangeSetCommand";
5256
import {
5357
DeleteResourcePolicyCommandInput,
@@ -81,6 +85,7 @@ export { __Client };
8185
* @public
8286
*/
8387
export type ServiceInputTypes =
88+
| BatchDescribeEntitiesCommandInput
8489
| CancelChangeSetCommandInput
8590
| DeleteResourcePolicyCommandInput
8691
| DescribeChangeSetCommandInput
@@ -98,6 +103,7 @@ export type ServiceInputTypes =
98103
* @public
99104
*/
100105
export type ServiceOutputTypes =
106+
| BatchDescribeEntitiesCommandOutput
101107
| CancelChangeSetCommandOutput
102108
| DeleteResourcePolicyCommandOutput
103109
| DescribeChangeSetCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
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+
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
export * from "./BatchDescribeEntitiesCommand";
23
export * from "./CancelChangeSetCommand";
34
export * from "./DeleteResourcePolicyCommand";
45
export * from "./DescribeChangeSetCommand";

0 commit comments

Comments
 (0)