ListApplicationStatesCommand

Lists all the migration statuses for your applications. If you use the optional ApplicationIds parameter, only the migration statuses for those applications will be returned.

Example Syntax

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

import { MigrationHubClient, ListApplicationStatesCommand } from "@aws-sdk/client-migration-hub"; // ES Modules import
// const { MigrationHubClient, ListApplicationStatesCommand } = require("@aws-sdk/client-migration-hub"); // CommonJS import
const client = new MigrationHubClient(config);
const input = { // ListApplicationStatesRequest
  ApplicationIds: [ // ApplicationIds
    "STRING_VALUE",
  ],
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListApplicationStatesCommand(input);
const response = await client.send(command);
// { // ListApplicationStatesResult
//   ApplicationStateList: [ // ApplicationStateList
//     { // ApplicationState
//       ApplicationId: "STRING_VALUE",
//       ApplicationStatus: "NOT_STARTED" || "IN_PROGRESS" || "COMPLETED",
//       LastUpdatedTime: new Date("TIMESTAMP"),
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListApplicationStatesCommand Input

Parameter
Type
Description
ApplicationIds
string[] | undefined

The configurationIds from the Application Discovery Service that uniquely identifies your applications.

MaxResults
number | undefined

Maximum number of results to be returned per page.

NextToken
string | undefined

If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.

ListApplicationStatesCommand Output

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

A list of Applications that exist in Application Discovery Service.

NextToken
string | undefined

If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

HomeRegionNotSetException
client

The home region is not set. Set the home region to continue.

InternalServerError
server

Exception raised when an internal, configuration, or dependency error is encountered.

InvalidInputException
client

Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.

ServiceUnavailableException
server

Exception raised when there is an internal, configuration, or dependency error encountered.

ThrottlingException
client

The request was denied due to request throttling.

MigrationHubServiceException
Base exception class for all service exceptions from MigrationHub service.