ListImportsCommand

List imports.

Example Syntax

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

import { MgnClient, ListImportsCommand } from "@aws-sdk/client-mgn"; // ES Modules import
// const { MgnClient, ListImportsCommand } = require("@aws-sdk/client-mgn"); // CommonJS import
const client = new MgnClient(config);
const input = { // ListImportsRequest
  filters: { // ListImportsRequestFilters
    importIDs: [ // ImportIDsFilter
      "STRING_VALUE",
    ],
  },
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListImportsCommand(input);
const response = await client.send(command);
// { // ListImportsResponse
//   items: [ // ImportList
//     { // ImportTask
//       importID: "STRING_VALUE",
//       s3BucketSource: { // S3BucketSource
//         s3Bucket: "STRING_VALUE", // required
//         s3Key: "STRING_VALUE", // required
//         s3BucketOwner: "STRING_VALUE",
//       },
//       creationDateTime: "STRING_VALUE",
//       endDateTime: "STRING_VALUE",
//       status: "STRING_VALUE",
//       progressPercentage: Number("float"),
//       summary: { // ImportTaskSummary
//         waves: { // ImportTaskSummaryWaves
//           createdCount: Number("long"),
//           modifiedCount: Number("long"),
//         },
//         applications: { // ImportTaskSummaryApplications
//           createdCount: Number("long"),
//           modifiedCount: Number("long"),
//         },
//         servers: { // ImportTaskSummaryServers
//           createdCount: Number("long"),
//           modifiedCount: Number("long"),
//         },
//       },
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListImportsCommand Input

See ListImportsCommandInput for more details

Parameter
Type
Description
filters
ListImportsRequestFilters | undefined

List imports request filters.

maxResults
number | undefined

List imports request max results.

nextToken
string | undefined

List imports request next token.

ListImportsCommand Output

See ListImportsCommandOutput for details

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

List import response items.

nextToken
string | undefined

List import response next token.

Throws

Name
Fault
Details
UninitializedAccountException
client

Uninitialized account exception.

ValidationException
client

Validate exception.

MgnServiceException
Base exception class for all service exceptions from Mgn service.