AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.
[ aws . cloudtrail ]
Starts an import of logged trail events from a source S3 bucket to a destination event data store. By default, CloudTrail only imports events contained in the S3 bucket's CloudTrail
prefix and the prefixes inside the CloudTrail
prefix, and does not check prefixes for other Amazon Web Services services. If you want to import CloudTrail events contained in another prefix, you must include the prefix in the S3LocationUri
. For more considerations about importing trail events, see Considerations for copying trail events in the CloudTrail User Guide .
When you start a new import, the Destinations
and ImportSource
parameters are required. Before starting a new import, disable any access control lists (ACLs) attached to the source S3 bucket. For more information about disabling ACLs, see Controlling ownership of objects and disabling ACLs for your bucket .
When you retry an import, the ImportID
parameter is required.
See also: AWS API Documentation
start-import
[--destinations <value>]
[--import-source <value>]
[--start-event-time <value>]
[--end-event-time <value>]
[--import-id <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
--destinations
(list)
The ARN of the destination event data store. Use this parameter for a new import.
(string)
Syntax:
"string" "string" ...
--import-source
(structure)
The source S3 bucket for the import. Use this parameter for a new import.
S3 -> (structure)
The source S3 bucket.
S3LocationUri -> (string)
The URI for the source S3 bucket.S3BucketRegion -> (string)
The Region associated with the source S3 bucket.S3BucketAccessRoleArn -> (string)
The IAM ARN role used to access the source S3 bucket.
Shorthand Syntax:
S3={S3LocationUri=string,S3BucketRegion=string,S3BucketAccessRoleArn=string}
JSON Syntax:
{
"S3": {
"S3LocationUri": "string",
"S3BucketRegion": "string",
"S3BucketAccessRoleArn": "string"
}
}
--start-event-time
(timestamp)
Use withEndEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specifiedStartEventTime
andEndEventTime
before attempting to import events.
--end-event-time
(timestamp)
Use withStartEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specifiedStartEventTime
andEndEventTime
before attempting to import events.
--import-id
(string)
The ID of the import. Use this parameter when you are retrying an import.
--cli-input-json
(string)
Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
--debug
(boolean)
Turn on debug logging.
--endpoint-url
(string)
Override command's default URL with the given URL.
--no-verify-ssl
(boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate
(boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output
(string)
The formatting style for command output.
--query
(string)
A JMESPath query to use in filtering the response data.
--profile
(string)
Use a specific profile from your credential file.
--region
(string)
The region to use. Overrides config/env settings.
--version
(string)
Display the version of this tool.
--color
(string)
Turn on/off color output.
--no-sign-request
(boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle
(string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout
(int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout
(int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
ImportId -> (string)
The ID of the import.
Destinations -> (list)
The ARN of the destination event data store.
(string)
ImportSource -> (structure)
The source S3 bucket for the import.
S3 -> (structure)
The source S3 bucket.
S3LocationUri -> (string)
The URI for the source S3 bucket.S3BucketRegion -> (string)
The Region associated with the source S3 bucket.S3BucketAccessRoleArn -> (string)
The IAM ARN role used to access the source S3 bucket.
StartEventTime -> (timestamp)
Used withEndEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.
EndEventTime -> (timestamp)
Used withStartEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.
ImportStatus -> (string)
Shows the status of the import after aStartImport
request. An import finishes with a status ofCOMPLETED
if there were no failures, orFAILED
if there were failures.
CreatedTimestamp -> (timestamp)
The timestamp for the import's creation.
UpdatedTimestamp -> (timestamp)
The timestamp of the import's last update, if applicable.