Skip to content

Commit fe4dd4f

Browse files
author
awstools
committed
feat(client-migrationhubstrategy): This release introduces multi-data-source feature in Migration Hub Strategy Recommendations. This feature now supports vCenter as a data source to fetch inventory in addition to ADS and Import from file workflow that is currently supported with MHSR collector.
1 parent 8a65e9f commit fe4dd4f

11 files changed

Lines changed: 645 additions & 14 deletions

File tree

clients/client-migrationhubstrategy/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ GetServerStrategies
288288

289289
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhubstrategy/classes/getserverstrategiescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhubstrategy/interfaces/getserverstrategiescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhubstrategy/interfaces/getserverstrategiescommandoutput.html)
290290

291+
</details>
292+
<details>
293+
<summary>
294+
ListAnalyzableServers
295+
</summary>
296+
297+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhubstrategy/classes/listanalyzableserverscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhubstrategy/interfaces/listanalyzableserverscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhubstrategy/interfaces/listanalyzableserverscommandoutput.html)
298+
291299
</details>
292300
<details>
293301
<summary>

clients/client-migrationhubstrategy/src/MigrationHubStrategy.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ import {
5252
GetServerStrategiesCommandInput,
5353
GetServerStrategiesCommandOutput,
5454
} from "./commands/GetServerStrategiesCommand";
55+
import {
56+
ListAnalyzableServersCommand,
57+
ListAnalyzableServersCommandInput,
58+
ListAnalyzableServersCommandOutput,
59+
} from "./commands/ListAnalyzableServersCommand";
5560
import {
5661
ListApplicationComponentsCommand,
5762
ListApplicationComponentsCommandInput,
@@ -116,6 +121,7 @@ const commands = {
116121
GetRecommendationReportDetailsCommand,
117122
GetServerDetailsCommand,
118123
GetServerStrategiesCommand,
124+
ListAnalyzableServersCommand,
119125
ListApplicationComponentsCommand,
120126
ListCollectorsCommand,
121127
ListImportFileTaskCommand,
@@ -294,6 +300,23 @@ export interface MigrationHubStrategy {
294300
cb: (err: any, data?: GetServerStrategiesCommandOutput) => void
295301
): void;
296302

303+
/**
304+
* @see {@link ListAnalyzableServersCommand}
305+
*/
306+
listAnalyzableServers(
307+
args: ListAnalyzableServersCommandInput,
308+
options?: __HttpHandlerOptions
309+
): Promise<ListAnalyzableServersCommandOutput>;
310+
listAnalyzableServers(
311+
args: ListAnalyzableServersCommandInput,
312+
cb: (err: any, data?: ListAnalyzableServersCommandOutput) => void
313+
): void;
314+
listAnalyzableServers(
315+
args: ListAnalyzableServersCommandInput,
316+
options: __HttpHandlerOptions,
317+
cb: (err: any, data?: ListAnalyzableServersCommandOutput) => void
318+
): void;
319+
297320
/**
298321
* @see {@link ListApplicationComponentsCommand}
299322
*/

clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ import {
8181
GetServerStrategiesCommandInput,
8282
GetServerStrategiesCommandOutput,
8383
} from "./commands/GetServerStrategiesCommand";
84+
import {
85+
ListAnalyzableServersCommandInput,
86+
ListAnalyzableServersCommandOutput,
87+
} from "./commands/ListAnalyzableServersCommand";
8488
import {
8589
ListApplicationComponentsCommandInput,
8690
ListApplicationComponentsCommandOutput,
@@ -132,6 +136,7 @@ export type ServiceInputTypes =
132136
| GetRecommendationReportDetailsCommandInput
133137
| GetServerDetailsCommandInput
134138
| GetServerStrategiesCommandInput
139+
| ListAnalyzableServersCommandInput
135140
| ListApplicationComponentsCommandInput
136141
| ListCollectorsCommandInput
137142
| ListImportFileTaskCommandInput
@@ -158,6 +163,7 @@ export type ServiceOutputTypes =
158163
| GetRecommendationReportDetailsCommandOutput
159164
| GetServerDetailsCommandOutput
160165
| GetServerStrategiesCommandOutput
166+
| ListAnalyzableServersCommandOutput
161167
| ListApplicationComponentsCommandOutput
162168
| ListCollectorsCommandOutput
163169
| ListImportFileTaskCommandOutput
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
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+
MigrationHubStrategyClientResolvedConfig,
19+
ServiceInputTypes,
20+
ServiceOutputTypes,
21+
} from "../MigrationHubStrategyClient";
22+
import { ListAnalyzableServersRequest, ListAnalyzableServersResponse } from "../models/models_0";
23+
import { de_ListAnalyzableServersCommand, se_ListAnalyzableServersCommand } from "../protocols/Aws_restJson1";
24+
25+
/**
26+
* @public
27+
*/
28+
export { __MetadataBearer, $Command };
29+
/**
30+
* @public
31+
*
32+
* The input for {@link ListAnalyzableServersCommand}.
33+
*/
34+
export interface ListAnalyzableServersCommandInput extends ListAnalyzableServersRequest {}
35+
/**
36+
* @public
37+
*
38+
* The output of {@link ListAnalyzableServersCommand}.
39+
*/
40+
export interface ListAnalyzableServersCommandOutput extends ListAnalyzableServersResponse, __MetadataBearer {}
41+
42+
/**
43+
* @public
44+
* Retrieves a list of all the servers fetched from customer vCenter using Strategy Recommendation Collector.
45+
* @example
46+
* Use a bare-bones client and the command you need to make an API call.
47+
* ```javascript
48+
* import { MigrationHubStrategyClient, ListAnalyzableServersCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import
49+
* // const { MigrationHubStrategyClient, ListAnalyzableServersCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import
50+
* const client = new MigrationHubStrategyClient(config);
51+
* const input = { // ListAnalyzableServersRequest
52+
* sort: "STRING_VALUE",
53+
* nextToken: "STRING_VALUE",
54+
* maxResults: Number("int"),
55+
* };
56+
* const command = new ListAnalyzableServersCommand(input);
57+
* const response = await client.send(command);
58+
* // { // ListAnalyzableServersResponse
59+
* // analyzableServers: [ // AnalyzableServerSummaryList
60+
* // { // AnalyzableServerSummary
61+
* // hostname: "STRING_VALUE",
62+
* // ipAddress: "STRING_VALUE",
63+
* // source: "STRING_VALUE",
64+
* // vmId: "STRING_VALUE",
65+
* // },
66+
* // ],
67+
* // nextToken: "STRING_VALUE",
68+
* // };
69+
*
70+
* ```
71+
*
72+
* @param ListAnalyzableServersCommandInput - {@link ListAnalyzableServersCommandInput}
73+
* @returns {@link ListAnalyzableServersCommandOutput}
74+
* @see {@link ListAnalyzableServersCommandInput} for command's `input` shape.
75+
* @see {@link ListAnalyzableServersCommandOutput} for command's `response` shape.
76+
* @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape.
77+
*
78+
* @throws {@link AccessDeniedException} (client fault)
79+
* <p> The user does not have permission to perform the action. Check the
80+
* AWS Identity and Access Management (IAM) policy associated with this user.</p>
81+
*
82+
* @throws {@link InternalServerException} (server fault)
83+
* <p> The server experienced an internal error. Try again. </p>
84+
*
85+
* @throws {@link ThrottlingException} (client fault)
86+
* <p> The request was denied due to request throttling. </p>
87+
*
88+
* @throws {@link ValidationException} (client fault)
89+
* <p> The request body isn't valid. </p>
90+
*
91+
* @throws {@link MigrationHubStrategyServiceException}
92+
* <p>Base exception class for all service exceptions from MigrationHubStrategy service.</p>
93+
*
94+
*/
95+
export class ListAnalyzableServersCommand extends $Command<
96+
ListAnalyzableServersCommandInput,
97+
ListAnalyzableServersCommandOutput,
98+
MigrationHubStrategyClientResolvedConfig
99+
> {
100+
// Start section: command_properties
101+
// End section: command_properties
102+
103+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
104+
return {
105+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
106+
Endpoint: { type: "builtInParams", name: "endpoint" },
107+
Region: { type: "builtInParams", name: "region" },
108+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
109+
};
110+
}
111+
112+
/**
113+
* @public
114+
*/
115+
constructor(readonly input: ListAnalyzableServersCommandInput) {
116+
// Start section: command_constructor
117+
super();
118+
// End section: command_constructor
119+
}
120+
121+
/**
122+
* @internal
123+
*/
124+
resolveMiddleware(
125+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
126+
configuration: MigrationHubStrategyClientResolvedConfig,
127+
options?: __HttpHandlerOptions
128+
): Handler<ListAnalyzableServersCommandInput, ListAnalyzableServersCommandOutput> {
129+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
130+
this.middlewareStack.use(
131+
getEndpointPlugin(configuration, ListAnalyzableServersCommand.getEndpointParameterInstructions())
132+
);
133+
134+
const stack = clientStack.concat(this.middlewareStack);
135+
136+
const { logger } = configuration;
137+
const clientName = "MigrationHubStrategyClient";
138+
const commandName = "ListAnalyzableServersCommand";
139+
const handlerExecutionContext: HandlerExecutionContext = {
140+
logger,
141+
clientName,
142+
commandName,
143+
inputFilterSensitiveLog: (_: any) => _,
144+
outputFilterSensitiveLog: (_: any) => _,
145+
[SMITHY_CONTEXT_KEY]: {
146+
service: "AWSMigrationHubStrategyRecommendation",
147+
operation: "ListAnalyzableServers",
148+
},
149+
};
150+
const { requestHandler } = configuration;
151+
return stack.resolve(
152+
(request: FinalizeHandlerArguments<any>) =>
153+
requestHandler.handle(request.request as __HttpRequest, options || {}),
154+
handlerExecutionContext
155+
);
156+
}
157+
158+
/**
159+
* @internal
160+
*/
161+
private serialize(input: ListAnalyzableServersCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
162+
return se_ListAnalyzableServersCommand(input, context);
163+
}
164+
165+
/**
166+
* @internal
167+
*/
168+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListAnalyzableServersCommandOutput> {
169+
return de_ListAnalyzableServersCommand(output, context);
170+
}
171+
172+
// Start section: command_body_extra
173+
// End section: command_body_extra
174+
}

clients/client-migrationhubstrategy/src/commands/StartAssessmentCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export interface StartAssessmentCommandOutput extends StartAssessmentResponse, _
6060
* ],
6161
* },
6262
* ],
63+
* assessmentDataSourceType: "STRING_VALUE",
6364
* };
6465
* const command = new StartAssessmentCommand(input);
6566
* const response = await client.send(command);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export * from "./GetPortfolioSummaryCommand";
99
export * from "./GetRecommendationReportDetailsCommand";
1010
export * from "./GetServerDetailsCommand";
1111
export * from "./GetServerStrategiesCommand";
12+
export * from "./ListAnalyzableServersCommand";
1213
export * from "./ListApplicationComponentsCommand";
1314
export * from "./ListCollectorsCommand";
1415
export * from "./ListImportFileTaskCommand";

0 commit comments

Comments
 (0)