StopImportCommand

Stops a specified import.

Example Syntax

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

import { CloudTrailClient, StopImportCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import
// const { CloudTrailClient, StopImportCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import
const client = new CloudTrailClient(config);
const input = { // StopImportRequest
  ImportId: "STRING_VALUE", // required
};
const command = new StopImportCommand(input);
const response = await client.send(command);
// { // StopImportResponse
//   ImportId: "STRING_VALUE",
//   ImportSource: { // ImportSource
//     S3: { // S3ImportSource
//       S3LocationUri: "STRING_VALUE", // required
//       S3BucketRegion: "STRING_VALUE", // required
//       S3BucketAccessRoleArn: "STRING_VALUE", // required
//     },
//   },
//   Destinations: [ // ImportDestinations
//     "STRING_VALUE",
//   ],
//   ImportStatus: "INITIALIZING" || "IN_PROGRESS" || "FAILED" || "STOPPED" || "COMPLETED",
//   CreatedTimestamp: new Date("TIMESTAMP"),
//   UpdatedTimestamp: new Date("TIMESTAMP"),
//   StartEventTime: new Date("TIMESTAMP"),
//   EndEventTime: new Date("TIMESTAMP"),
//   ImportStatistics: { // ImportStatistics
//     PrefixesFound: Number("long"),
//     PrefixesCompleted: Number("long"),
//     FilesCompleted: Number("long"),
//     EventsCompleted: Number("long"),
//     FailedEntries: Number("long"),
//   },
// };

StopImportCommand Input

See StopImportCommandInput for more details

Parameter
Type
Description
ImportId
Required
string | undefined

The ID of the import.

StopImportCommand Output

See StopImportCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
CreatedTimestamp
Date | undefined

The timestamp of the import's creation.

Destinations
string[] | undefined

The ARN of the destination event data store.

EndEventTime
Date | undefined

Used with StartEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

ImportId
string | undefined

The ID for the import.

ImportSource
ImportSource | undefined

The source S3 bucket for the import.

ImportStatistics
ImportStatistics | undefined

Returns information on the stopped import.

ImportStatus
ImportStatus | undefined

The status of the import.

StartEventTime
Date | undefined

Used with EndEventTime to bound a StartImport request, and limit imported trail events to only those events logged within a specified time period.

UpdatedTimestamp
Date | undefined

The timestamp of the import's last update.

Throws

Name
Fault
Details
ImportNotFoundException
client

The specified import was not found.

InvalidParameterException
client

The request includes a parameter that is not valid.

OperationNotPermittedException
client

This exception is thrown when the requested operation is not permitted.

UnsupportedOperationException
client

This exception is thrown when the requested operation is not supported.

CloudTrailServiceException
Base exception class for all service exceptions from CloudTrail service.