Skip to content

/AWS1/IF_WAD=>STARTAGENTRECGENERATION()

About StartAgentRecommendationGeneration

Initiates a new recommendation generation process for the specified optimization profile. This asynchronous operation analyzes your Amazon Web Services resources and generates optimization recommendations based on the configured pillars and scope. Use GetAgentRecommendationGeneration to check status.

Method Signature

METHODS /AWS1/IF_WAD~STARTAGENTRECGENERATION
  IMPORTING
    !IV_PROFILEARN TYPE /AWS1/WADAGENTPROFILEARN OPTIONAL
    !IT_TYPES TYPE /AWS1/CL_WADRECTYPES_W=>TT_RECOMMENDATIONTYPES OPTIONAL
    !IV_NAME TYPE /AWS1/WADSTRING OPTIONAL
    !IO_ADDITIONALCONTEXT TYPE REF TO /AWS1/CL_RT_DOCUMENT OPTIONAL
    !IO_SCOPE TYPE REF TO /AWS1/CL_WADSCOPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadstrtagentrecgenrsp
  RAISING
    /AWS1/CX_WADACCESSDENIEDEX
    /AWS1/CX_WADCONFLICTEXCEPTION
    /AWS1/CX_WADINTERNALSERVEREX
    /AWS1/CX_WADSERVICEQUOTAEXCDEX
    /AWS1/CX_WADTHROTTLINGEX
    /AWS1/CX_WADVALIDATIONEX
    /AWS1/CX_WADCLIENTEXC
    /AWS1/CX_WADSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_profilearn TYPE /AWS1/WADAGENTPROFILEARN /AWS1/WADAGENTPROFILEARN

The Amazon Resource Name (ARN) of the optimization profile to use for generating recommendations.

it_types TYPE /AWS1/CL_WADRECTYPES_W=>TT_RECOMMENDATIONTYPES TT_RECOMMENDATIONTYPES

The types of recommendations to generate.

io_scope TYPE REF TO /AWS1/CL_WADSCOPE /AWS1/CL_WADSCOPE

Scope configuration to focus the generation on specific pillars or goals.

Optional arguments:

iv_name TYPE /AWS1/WADSTRING /AWS1/WADSTRING

An optional name for this generation process to help identify it in lists and logs.

io_additionalcontext TYPE REF TO /AWS1/CL_RT_DOCUMENT /AWS1/CL_RT_DOCUMENT

Optional additional context to guide the recommendation generation, such as specific business requirements or constraints.

RETURNING

oo_output TYPE REF TO /aws1/cl_wadstrtagentrecgenrsp /AWS1/CL_WADSTRTAGENTRECGENRSP

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->startagentrecgeneration(
  io_additionalcontext = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
  io_scope = new /aws1/cl_wadscope(
    it_goalids = VALUE /aws1/cl_wadgoalidlist_w=>tt_goalidlist(
      ( new /aws1/cl_wadgoalidlist_w( |string| ) )
    )
    it_items = VALUE /aws1/cl_wadpillaritem=>tt_pillaritems(
      (
        new /aws1/cl_wadpillaritem(
          it_ids = VALUE /aws1/cl_waditemids_w=>tt_itemids(
            ( new /aws1/cl_waditemids_w( |string| ) )
          )
          iv_pillar = |string|
        )
      )
    )
    it_pillars = VALUE /aws1/cl_wadpillars_w=>tt_pillars(
      ( new /aws1/cl_wadpillars_w( |string| ) )
    )
  )
  it_types = VALUE /aws1/cl_wadrectypes_w=>tt_recommendationtypes(
    ( new /aws1/cl_wadrectypes_w( |string| ) )
  )
  iv_name = |string|
  iv_profilearn = |string|
).

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_id( ).
  lv_agentprofilearn = lo_result->get_profilearn( ).
  lv_string = lo_result->get_name( ).
  lv_generationstatus = lo_result->get_status( ).
  lv_timestamp = lo_result->get_estimatedcompletiontime( ).
  lv_string = lo_result->get_createdby( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_string = lo_result->get_lastmodifiedby( ).
  lv_timestamp = lo_result->get_lastmodifiedat( ).
ENDIF.