/AWS1/IF_BCO=>LISTRECOMMENDATIONS()¶
About ListRecommendations¶
Returns a list of recommendations.
Method Signature¶
METHODS /AWS1/IF_BCO~LISTRECOMMENDATIONS
IMPORTING
!IO_FILTER TYPE REF TO /AWS1/CL_BCOFILTER OPTIONAL
!IO_ORDERBY TYPE REF TO /AWS1/CL_BCOORDERBY OPTIONAL
!IV_INCLUDEALLRECOMMENDATIONS TYPE /AWS1/BCOPRIMITIVEBOOLEAN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/BCOMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/BCOSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bcolstrecommendatio01
RAISING
/AWS1/CX_BCOACCESSDENIEDEX
/AWS1/CX_BCOINTERNALSERVEREX
/AWS1/CX_BCOTHROTTLINGEX
/AWS1/CX_BCOVALIDATIONEX
/AWS1/CX_BCOCLIENTEXC
/AWS1/CX_BCOSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
io_filter TYPE REF TO /AWS1/CL_BCOFILTER /AWS1/CL_BCOFILTER¶
The constraints that you want all returned recommendations to match.
io_orderby TYPE REF TO /AWS1/CL_BCOORDERBY /AWS1/CL_BCOORDERBY¶
The ordering of recommendations by a dimension.
iv_includeallrecommendations TYPE /AWS1/BCOPRIMITIVEBOOLEAN /AWS1/BCOPRIMITIVEBOOLEAN¶
List of all recommendations for a resource, or a single recommendation if de-duped by
resourceId.
iv_maxresults TYPE /AWS1/BCOMAXRESULTS /AWS1/BCOMAXRESULTS¶
The maximum number of recommendations that are returned for the request.
iv_nexttoken TYPE /AWS1/BCOSTRING /AWS1/BCOSTRING¶
The token to retrieve the next set of results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bcolstrecommendatio01 /AWS1/CL_BCOLSTRECOMMENDATIO01¶
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->listrecommendations(
io_filter = new /aws1/cl_bcofilter(
it_accountids = VALUE /aws1/cl_bcoaccountidlist_w=>tt_accountidlist(
( new /aws1/cl_bcoaccountidlist_w( |string| ) )
)
it_actiontypes = VALUE /aws1/cl_bcoactiontypelist_w=>tt_actiontypelist(
( new /aws1/cl_bcoactiontypelist_w( |string| ) )
)
it_implementationefforts = VALUE /aws1/cl_bcoimplementationef00=>tt_implementationeffortlist(
( new /aws1/cl_bcoimplementationef00( |string| ) )
)
it_recommendationids = VALUE /aws1/cl_bcorecommendationid00=>tt_recommendationidlist(
( new /aws1/cl_bcorecommendationid00( |string| ) )
)
it_regions = VALUE /aws1/cl_bcoregionlist_w=>tt_regionlist(
( new /aws1/cl_bcoregionlist_w( |string| ) )
)
it_resourcearns = VALUE /aws1/cl_bcoresourcearnlist_w=>tt_resourcearnlist(
( new /aws1/cl_bcoresourcearnlist_w( |string| ) )
)
it_resourceids = VALUE /aws1/cl_bcoresourceidlist_w=>tt_resourceidlist(
( new /aws1/cl_bcoresourceidlist_w( |string| ) )
)
it_resourcetypes = VALUE /aws1/cl_bcoresourcetypelist_w=>tt_resourcetypelist(
( new /aws1/cl_bcoresourcetypelist_w( |string| ) )
)
it_tags = VALUE /aws1/cl_bcotag=>tt_taglist(
(
new /aws1/cl_bcotag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_restartneeded = ABAP_TRUE
iv_rollbackpossible = ABAP_TRUE
)
io_orderby = new /aws1/cl_bcoorderby(
iv_dimension = |string|
iv_order = |string|
)
iv_includeallrecommendations = ABAP_TRUE
iv_maxresults = 123
iv_nexttoken = |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_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_recommendationid( ).
lv_string = lo_row_1->get_accountid( ).
lv_string = lo_row_1->get_region( ).
lv_string = lo_row_1->get_resourceid( ).
lv_string = lo_row_1->get_resourcearn( ).
lv_string = lo_row_1->get_currentresourcetype( ).
lv_string = lo_row_1->get_recommendedresourcetype( ).
lv_double = lo_row_1->get_estimatedmonthlysavings( ).
lv_double = lo_row_1->get_estimatedsavingspercen00( ).
lv_double = lo_row_1->get_estimatedmonthlycost( ).
lv_string = lo_row_1->get_currencycode( ).
lv_string = lo_row_1->get_implementationeffort( ).
lv_boolean = lo_row_1->get_restartneeded( ).
lv_string = lo_row_1->get_actiontype( ).
lv_boolean = lo_row_1->get_rollbackpossible( ).
lv_string = lo_row_1->get_currentresourcesummary( ).
lv_string = lo_row_1->get_recommendedresourcesumm( ).
lv_datetime = lo_row_1->get_lastrefreshtimestamp( ).
lv_integer = lo_row_1->get_recommendationlookback00( ).
lv_source = lo_row_1->get_source( ).
LOOP AT lo_row_1->get_tags( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_key( ).
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.