/AWS1/IF_OSR=>LISTINSIGHTS()¶
About ListInsights¶
Lists insights for an Amazon OpenSearch Service domain or Amazon Web Services account. Returns a paginated list of insights based on the specified entity, filters, time range, and sort order.
Method Signature¶
METHODS /AWS1/IF_OSR~LISTINSIGHTS
IMPORTING
!IO_ENTITY TYPE REF TO /AWS1/CL_OSRINSIGHTENTITY OPTIONAL
!IO_TIMERANGE TYPE REF TO /AWS1/CL_OSRINSIGHTTIMERANGE OPTIONAL
!IV_SORTORDER TYPE /AWS1/OSRINSIGHTSORTORDER OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/OSRINSIGHTPAGESIZE OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/OSRSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_osrlistinsghtsrsp
RAISING
/AWS1/CX_OSRBASEEXCEPTION
/AWS1/CX_OSRDISABLEDOPEX
/AWS1/CX_OSRINTERNALEXCEPTION
/AWS1/CX_OSRLIMITEXCEEDEDEX
/AWS1/CX_OSRRESOURCENOTFOUNDEX
/AWS1/CX_OSRVALIDATIONEX
/AWS1/CX_OSRCLIENTEXC
/AWS1/CX_OSRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_entity TYPE REF TO /AWS1/CL_OSRINSIGHTENTITY /AWS1/CL_OSRINSIGHTENTITY¶
The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.
Optional arguments:¶
io_timerange TYPE REF TO /AWS1/CL_OSRINSIGHTTIMERANGE /AWS1/CL_OSRINSIGHTTIMERANGE¶
The time range for filtering insights, specified as epoch millisecond timestamps.
iv_sortorder TYPE /AWS1/OSRINSIGHTSORTORDER /AWS1/OSRINSIGHTSORTORDER¶
The sort order for the results. Possible values are
ASC(ascending) andDESC(descending).
iv_maxresults TYPE /AWS1/OSRINSIGHTPAGESIZE /AWS1/OSRINSIGHTPAGESIZE¶
An optional parameter that specifies the maximum number of results to return. You can use
NextTokento get the next page of results. Valid values are 1 to 500.
iv_nexttoken TYPE /AWS1/OSRSTRING /AWS1/OSRSTRING¶
If your initial
ListInsightsoperation returns aNextToken, include the returnedNextTokenin subsequentListInsightsoperations to retrieve the next page of results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_osrlistinsghtsrsp /AWS1/CL_OSRLISTINSGHTSRSP¶
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->listinsights(
io_entity = new /aws1/cl_osrinsightentity(
iv_type = |string|
iv_value = |string|
)
io_timerange = new /aws1/cl_osrinsighttimerange(
iv_from = 123
iv_to = 123
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_sortorder = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_insights( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_guid = lo_row_1->get_insightid( ).
lv_string = lo_row_1->get_displayname( ).
lv_insighttype = lo_row_1->get_type( ).
lv_insightprioritylevel = lo_row_1->get_priority( ).
lv_insightstatus = lo_row_1->get_status( ).
lv_updatetimestamp = lo_row_1->get_creationtime( ).
lv_updatetimestamp = lo_row_1->get_updatetime( ).
lv_boolean = lo_row_1->get_isexperimental( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.