/AWS1/IF_TRL=>GETINSIGHTSELECTORS()¶
About GetInsightSelectors¶
Describes the settings for the Insights event selectors that you configured for your
trail or event data store. GetInsightSelectors shows if CloudTrail Insights logging is enabled
and which Insights types are configured with corresponding event categories. If you run
GetInsightSelectors on a trail or event data store that does not have Insights events enabled,
the operation throws the exception InsightNotEnabledException
Specify either the EventDataStore parameter to get Insights event selectors for an event data store,
or the TrailName parameter to the get Insights event selectors for a trail. You cannot specify these parameters together.
For more information, see Working with CloudTrail Insights in the CloudTrail User Guide.
Method Signature¶
METHODS /AWS1/IF_TRL~GETINSIGHTSELECTORS
IMPORTING
!IV_TRAILNAME TYPE /AWS1/TRLSTRING OPTIONAL
!IV_EVENTDATASTORE TYPE /AWS1/TRLEVENTDATASTOREARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trlgetinsightselors01
RAISING
/AWS1/CX_TRLCLOUDTRAILARNINVEX
/AWS1/CX_TRLINSIGHTNOTENBDEX
/AWS1/CX_TRLINVPRMCOMBINATIO00
/AWS1/CX_TRLINVALIDPARAMETEREX
/AWS1/CX_TRLINVALIDTRAILNAMEEX
/AWS1/CX_TRLNOMANAGEMENTACCT00
/AWS1/CX_TRLOPNOTPERMITTEDEX
/AWS1/CX_TRLTHROTTLINGEX
/AWS1/CX_TRLTRAILNOTFOUNDEX
/AWS1/CX_TRLUNSUPPORTEDOPEX
/AWS1/CX_TRLCLIENTEXC
/AWS1/CX_TRLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_trailname TYPE /AWS1/TRLSTRING /AWS1/TRLSTRING¶
Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
Start with a letter or number, and end with a letter or number
Be between 3 and 128 characters
Have no adjacent periods, underscores or dashes. Names like
my-_namespaceandmy--namespaceare not valid.Not be in IP address format (for example, 192.168.5.4)
If you specify a trail ARN, it must be in the format:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrailYou cannot use this parameter with the
EventDataStoreparameter.
iv_eventdatastore TYPE /AWS1/TRLEVENTDATASTOREARN /AWS1/TRLEVENTDATASTOREARN¶
Specifies the ARN (or ID suffix of the ARN) of the event data store for which you want to get Insights selectors.
You cannot use this parameter with the
TrailNameparameter.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trlgetinsightselors01 /AWS1/CL_TRLGETINSIGHTSELORS01¶
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->getinsightselectors(
iv_eventdatastore = |string|
iv_trailname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_trailarn( ).
LOOP AT lo_result->get_insightselectors( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_insighttype = lo_row_1->get_insighttype( ).
LOOP AT lo_row_1->get_eventcategories( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_sourceeventcategory = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_eventdatastorearn = lo_result->get_eventdatastorearn( ).
lv_eventdatastorearn = lo_result->get_insightsdestination( ).
ENDIF.