/AWS1/IF_TRL=>STARTIMPORT()¶
About StartImport¶
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.
If the destination event data store is for an organization, you must use the management account to import trail events. You cannot use the delegated administrator account for the organization.
Method Signature¶
METHODS /AWS1/IF_TRL~STARTIMPORT
IMPORTING
!IT_DESTINATIONS TYPE /AWS1/CL_TRLIMPORTDSTS_W=>TT_IMPORTDESTINATIONS OPTIONAL
!IO_IMPORTSOURCE TYPE REF TO /AWS1/CL_TRLIMPORTSOURCE OPTIONAL
!IV_STARTEVENTTIME TYPE /AWS1/TRLDATE OPTIONAL
!IV_ENDEVENTTIME TYPE /AWS1/TRLDATE OPTIONAL
!IV_IMPORTID TYPE /AWS1/TRLUUID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trlstartimportrsp
RAISING
/AWS1/CX_TRLACHASONGOINGIMPEX
/AWS1/CX_TRLEVTDATASTOREARNI00
/AWS1/CX_TRLEVTDATASTORENOTF00
/AWS1/CX_TRLIMPORTNOTFOUNDEX
/AWS1/CX_TRLINACTEVTDATASTOR00
/AWS1/CX_TRLINSUFFICIENTENCP00
/AWS1/CX_TRLINVEVTDATASTOREC00
/AWS1/CX_TRLINVEVTDATASTORES00
/AWS1/CX_TRLINVIMPORTSOURCEEX
/AWS1/CX_TRLINVALIDPARAMETEREX
/AWS1/CX_TRLOPNOTPERMITTEDEX
/AWS1/CX_TRLUNSUPPORTEDOPEX
/AWS1/CX_TRLCLIENTEXC
/AWS1/CX_TRLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
it_destinations TYPE /AWS1/CL_TRLIMPORTDSTS_W=>TT_IMPORTDESTINATIONS TT_IMPORTDESTINATIONS¶
The ARN of the destination event data store. Use this parameter for a new import.
io_importsource TYPE REF TO /AWS1/CL_TRLIMPORTSOURCE /AWS1/CL_TRLIMPORTSOURCE¶
The source S3 bucket for the import. Use this parameter for a new import.
iv_starteventtime TYPE /AWS1/TRLDATE /AWS1/TRLDATE¶
Use with
EndEventTimeto bound aStartImportrequest, 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 specifiedStartEventTimeandEndEventTimebefore attempting to import events.
iv_endeventtime TYPE /AWS1/TRLDATE /AWS1/TRLDATE¶
Use with
StartEventTimeto bound aStartImportrequest, 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 specifiedStartEventTimeandEndEventTimebefore attempting to import events.
iv_importid TYPE /AWS1/TRLUUID /AWS1/TRLUUID¶
The ID of the import. Use this parameter when you are retrying an import.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trlstartimportrsp /AWS1/CL_TRLSTARTIMPORTRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->startimport(
io_importsource = new /aws1/cl_trlimportsource(
io_s3 = new /aws1/cl_trls3importsource(
iv_s3bucketaccessrolearn = |string|
iv_s3bucketregion = |string|
iv_s3locationuri = |string|
)
)
it_destinations = VALUE /aws1/cl_trlimportdsts_w=>tt_importdestinations(
( new /aws1/cl_trlimportdsts_w( |string| ) )
)
iv_endeventtime = '20150101000000.0000000'
iv_importid = |string|
iv_starteventtime = '20150101000000.0000000'
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_uuid = lo_result->get_importid( ).
LOOP AT lo_result->get_destinations( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_eventdatastorearn = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lo_importsource = lo_result->get_importsource( ).
IF lo_importsource IS NOT INITIAL.
lo_s3importsource = lo_importsource->get_s3( ).
IF lo_s3importsource IS NOT INITIAL.
lv_string = lo_s3importsource->get_s3locationuri( ).
lv_string = lo_s3importsource->get_s3bucketregion( ).
lv_string = lo_s3importsource->get_s3bucketaccessrolearn( ).
ENDIF.
ENDIF.
lv_date = lo_result->get_starteventtime( ).
lv_date = lo_result->get_endeventtime( ).
lv_importstatus = lo_result->get_importstatus( ).
lv_date = lo_result->get_createdtimestamp( ).
lv_date = lo_result->get_updatedtimestamp( ).
ENDIF.