Skip to content

/AWS1/IF_SGM=>DESCRIBEAIWORKLOADCONFIG()

About DescribeAIWorkloadConfig

Returns details of an AI workload configuration, including the dataset configuration, benchmark tool settings, tags, and creation time.

Method Signature

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

IMPORTING

Required arguments:

iv_aiworkloadconfigname TYPE /AWS1/SGMAIENTITYNAME /AWS1/SGMAIENTITYNAME

The name of the AI workload configuration to describe.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmdescraiwkldcfgrsp /AWS1/CL_SGMDESCRAIWKLDCFGRSP

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->describeaiworkloadconfig( |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_aiworkloadconfigname( ).
  lv_aiworkloadconfigarn = lo_result->get_aiworkloadconfigarn( ).
  lo_aidatasetconfig = lo_result->get_datasetconfig( ).
  IF lo_aidatasetconfig IS NOT INITIAL.
    LOOP AT lo_aidatasetconfig->get_inputdataconfig( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_aichannelname = lo_row_1->get_channelname( ).
        lo_aiworkloaddatasource = lo_row_1->get_datasource( ).
        IF lo_aiworkloaddatasource IS NOT INITIAL.
          lo_aiworkloads3datasource = lo_aiworkloaddatasource->get_s3datasource( ).
          IF lo_aiworkloads3datasource IS NOT INITIAL.
            lv_s3uri = lo_aiworkloads3datasource->get_s3uri( ).
          ENDIF.
        ENDIF.
      ENDIF.
    ENDLOOP.
  ENDIF.
  lo_aiworkloadconfigs = lo_result->get_aiworkloadconfigs( ).
  IF lo_aiworkloadconfigs IS NOT INITIAL.
    lo_workloadspec = lo_aiworkloadconfigs->get_workloadspec( ).
    IF lo_workloadspec IS NOT INITIAL.
      lv_string = lo_workloadspec->get_inline( ).
    ENDIF.
  ENDIF.
  LOOP AT lo_result->get_tags( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_tagkey = lo_row_3->get_key( ).
      lv_tagvalue = lo_row_3->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_timestamp = lo_result->get_creationtime( ).
ENDIF.