- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ImportId Required | string | undefined | The ID of the import. |
StopImportCommand Output
Parameter | Type | Description |
---|
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 |
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 |
UpdatedTimestamp | Date | undefined | The timestamp of the import's last update. |
Throws
Name | Fault | Details |
---|
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. |