Skip to content

/AWS1/IF_SGM=>DESCRIBEAIRECOMMENDATIONJOB()

About DescribeAIRecommendationJob

Returns details of an AI recommendation job, including its status, model source, performance targets, optimization recommendations, and deployment configurations.

Method Signature

METHODS /AWS1/IF_SGM~DESCRIBEAIRECOMMENDATIONJOB
  IMPORTING
    !IV_AIRECOMMENDATIONJOBNAME TYPE /AWS1/SGMAIENTITYNAME OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmdescrairecjobrsp
  RAISING
    /AWS1/CX_SGMRESOURCENOTFOUND
    /AWS1/CX_SGMCLIENTEXC
    /AWS1/CX_SGMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_airecommendationjobname TYPE /AWS1/SGMAIENTITYNAME /AWS1/SGMAIENTITYNAME

The name of the AI recommendation job to describe.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmdescrairecjobrsp /AWS1/CL_SGMDESCRAIRECJOBRSP

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->describeairecommendationjob( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_aientityname = lo_result->get_airecommendationjobname( ).
  lv_airecommendationjobarn = lo_result->get_airecommendationjobarn( ).
  lv_airecommendationjobstat = lo_result->get_airecjobstatus( ).
  lv_failurereason = lo_result->get_failurereason( ).
  lo_aimodelsource = lo_result->get_modelsource( ).
  IF lo_aimodelsource IS NOT INITIAL.
    lo_aimodelsources3 = lo_aimodelsource->get_s3( ).
    IF lo_aimodelsources3 IS NOT INITIAL.
      lv_s3uri = lo_aimodelsources3->get_s3uri( ).
    ENDIF.
  ENDIF.
  lo_airecommendationoutputr = lo_result->get_outputconfig( ).
  IF lo_airecommendationoutputr IS NOT INITIAL.
    lv_s3uri = lo_airecommendationoutputr->get_s3outputlocation( ).
    lv_airesourceidentifier = lo_airecommendationoutputr->get_modelpackagegroupid( ).
    lo_aimlflowconfig = lo_airecommendationoutputr->get_mlflowconfig( ).
    IF lo_aimlflowconfig IS NOT INITIAL.
      lv_aimlflowresourcearn = lo_aimlflowconfig->get_mlflowresourcearn( ).
      lv_aimlflowexperimentname = lo_aimlflowconfig->get_mlflowexperimentname( ).
      lv_aimlflowrunname = lo_aimlflowconfig->get_mlflowrunname( ).
    ENDIF.
  ENDIF.
  lo_airecommendationinferen = lo_result->get_inferencespecification( ).
  IF lo_airecommendationinferen IS NOT INITIAL.
    lv_airecommendationinferen_1 = lo_airecommendationinferen->get_framework( ).
  ENDIF.
  lv_airesourceidentifier = lo_result->get_aiworkloadconfigid( ).
  lv_airecommendationallowop = lo_result->get_optimizemodel( ).
  lo_airecommendationperform = lo_result->get_performancetarget( ).
  IF lo_airecommendationperform IS NOT INITIAL.
    LOOP AT lo_airecommendationperform->get_constraints( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_airecommendationmetric = lo_row_1->get_metric( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
  LOOP AT lo_result->get_recommendations( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_string = lo_row_3->get_recdescription( ).
      LOOP AT lo_row_3->get_optimizationdetails( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_airecommendationoptimiz = lo_row_5->get_optimizationtype( ).
          LOOP AT lo_row_5->get_optimizationconfig( ) into ls_row_6.
            lv_key = ls_row_6-key.
            lo_value = ls_row_6-value.
            IF lo_value IS NOT INITIAL.
              lv_string = lo_value->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
      lo_airecommendationmodelde = lo_row_3->get_modeldetails( ).
      IF lo_airecommendationmodelde IS NOT INITIAL.
        lv_modelpackagearn = lo_airecommendationmodelde->get_modelpackagearn( ).
        lv_aiinferencespecificatio = lo_airecommendationmodelde->get_inferencespecname( ).
        LOOP AT lo_airecommendationmodelde->get_instancedetails( ) into lo_row_7.
          lo_row_8 = lo_row_7.
          IF lo_row_8 IS NOT INITIAL.
            lv_airecommendationinstanc = lo_row_8->get_instancetype( ).
            lv_airecommendationinstanc_1 = lo_row_8->get_instancecount( ).
            lv_airecommendationcopycou = lo_row_8->get_copycountperinstance( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_airecommendationdeploym = lo_row_3->get_deploymentconfiguration( ).
      IF lo_airecommendationdeploym IS NOT INITIAL.
        LOOP AT lo_airecommendationdeploym->get_s3( ) into lo_row_9.
          lo_row_10 = lo_row_9.
          IF lo_row_10 IS NOT INITIAL.
            lv_aichannelname = lo_row_10->get_channelname( ).
            lv_s3uri = lo_row_10->get_uri( ).
          ENDIF.
        ENDLOOP.
        lv_string = lo_airecommendationdeploym->get_imageuri( ).
        lv_airecommendationinstanc = lo_airecommendationdeploym->get_instancetype( ).
        lv_airecommendationinstanc_1 = lo_airecommendationdeploym->get_instancecount( ).
        lv_airecommendationcopycou = lo_airecommendationdeploym->get_copycountperinstance( ).
        LOOP AT lo_airecommendationdeploym->get_environmentvariables( ) into ls_row_11.
          lv_key_1 = ls_row_11-key.
          lo_value_1 = ls_row_11-value.
          IF lo_value_1 IS NOT INITIAL.
            lv_environmentvalue = lo_value_1->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lv_aibenchmarkjobarn = lo_row_3->get_aibenchmarkjobarn( ).
      LOOP AT lo_row_3->get_expectedperformance( ) into lo_row_12.
        lo_row_13 = lo_row_12.
        IF lo_row_13 IS NOT INITIAL.
          lv_string = lo_row_13->get_metric( ).
          lv_string = lo_row_13->get_stat( ).
          lv_string = lo_row_13->get_value( ).
          lv_string = lo_row_13->get_unit( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  lv_rolearn = lo_result->get_rolearn( ).
  lo_airecommendationcompute = lo_result->get_computespec( ).
  IF lo_airecommendationcompute IS NOT INITIAL.
    LOOP AT lo_airecommendationcompute->get_instancetypes( ) into lo_row_14.
      lo_row_15 = lo_row_14.
      IF lo_row_15 IS NOT INITIAL.
        lv_airecommendationinstanc = lo_row_15->get_value( ).
      ENDIF.
    ENDLOOP.
    lo_aicapacityreservationco = lo_airecommendationcompute->get_capreservationconfig( ).
    IF lo_aicapacityreservationco IS NOT INITIAL.
      lv_aicapacityreservationpr = lo_aicapacityreservationco->get_capreservationpreference( ).
      LOOP AT lo_aicapacityreservationco->get_mlreservationarns( ) into lo_row_16.
        lo_row_17 = lo_row_16.
        IF lo_row_17 IS NOT INITIAL.
          lv_aimlreservationarn = lo_row_17->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
  lv_timestamp = lo_result->get_creationtime( ).
  lv_timestamp = lo_result->get_starttime( ).
  lv_timestamp = lo_result->get_endtime( ).
  LOOP AT lo_result->get_tags( ) into lo_row_18.
    lo_row_19 = lo_row_18.
    IF lo_row_19 IS NOT INITIAL.
      lv_tagkey = lo_row_19->get_key( ).
      lv_tagvalue = lo_row_19->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.