GetServerStrategiesCommand

Retrieves recommended strategies and tools for the specified server.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { MigrationHubStrategyClient, GetServerStrategiesCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import
// const { MigrationHubStrategyClient, GetServerStrategiesCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import
const client = new MigrationHubStrategyClient(config);
const input = { // GetServerStrategiesRequest
  serverId: "STRING_VALUE", // required
};
const command = new GetServerStrategiesCommand(input);
const response = await client.send(command);
// { // GetServerStrategiesResponse
//   serverStrategies: [ // ServerStrategies
//     { // ServerStrategy
//       recommendation: { // RecommendationSet
//         transformationTool: { // TransformationTool
//           name: "STRING_VALUE",
//           description: "STRING_VALUE",
//           tranformationToolInstallationLink: "STRING_VALUE",
//         },
//         targetDestination: "STRING_VALUE",
//         strategy: "STRING_VALUE",
//       },
//       status: "STRING_VALUE",
//       numberOfApplicationComponents: Number("int"),
//       isPreferred: true || false,
//     },
//   ],
// };

GetServerStrategiesCommand Input

See GetServerStrategiesCommandInput for more details

Parameter
Type
Description
serverId
Required
string | undefined

The ID of the server.

GetServerStrategiesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
serverStrategies
ServerStrategy[] | undefined

A list of strategy recommendations for the server.

Throws

Name
Fault
Details
AccessDeniedException
client

The user does not have permission to perform the action. Check the AWS Identity and Access Management (IAM) policy associated with this user.

InternalServerException
server

The server experienced an internal error. Try again.

ResourceNotFoundException
client

The specified ID in the request is not found.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The request body isn't valid.

MigrationHubStrategyServiceException
Base exception class for all service exceptions from MigrationHubStrategy service.