Skip to content

/AWS1/IF_CRL=>LISTTRAINEDMODELVERSIONS()

About ListTrainedModelVersions

Returns a list of trained model versions for a specified trained model. This operation allows you to view all versions of a trained model, including information about their status and creation details. You can use this to track the evolution of your trained models and select specific versions for inference or further training.

Method Signature

IMPORTING

Required arguments:

iv_membershipidentifier TYPE /AWS1/CRLUUID /AWS1/CRLUUID

The membership identifier for the collaboration that contains the trained model.

iv_trainedmodelarn TYPE /AWS1/CRLTRAINEDMODELARN /AWS1/CRLTRAINEDMODELARN

The Amazon Resource Name (ARN) of the trained model for which to list versions.

Optional arguments:

iv_nexttoken TYPE /AWS1/CRLNEXTTOKEN /AWS1/CRLNEXTTOKEN

The pagination token from a previous ListTrainedModelVersions request. Use this token to retrieve the next page of results.

iv_maxresults TYPE /AWS1/CRLMAXRESULTS /AWS1/CRLMAXRESULTS

The maximum number of trained model versions to return in a single page. The default value is 10, and the maximum value is 100.

iv_status TYPE /AWS1/CRLTRAINEDMODELSTATUS /AWS1/CRLTRAINEDMODELSTATUS

Filter the results to only include trained model versions with the specified status. Valid values include CREATE_PENDING, CREATE_IN_PROGRESS, ACTIVE, CREATE_FAILED, and others.

RETURNING

oo_output TYPE REF TO /aws1/cl_crllsttrainedmdelvr01 /AWS1/CL_CRLLSTTRAINEDMDELVR01

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->/aws1/if_crl~listtrainedmodelversions(
  iv_maxresults = 123
  iv_membershipidentifier = |string|
  iv_nexttoken = |string|
  iv_status = |string|
  iv_trainedmodelarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_nexttoken = lo_result->get_nexttoken( ).
  LOOP AT lo_result->get_trainedmodels( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_timestamp = lo_row_1->get_createtime( ).
      lv_timestamp = lo_row_1->get_updatetime( ).
      lv_trainedmodelarn = lo_row_1->get_trainedmodelarn( ).
      lv_uuid = lo_row_1->get_versionidentifier( ).
      LOOP AT lo_row_1->get_incrementaltrndatachnls( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_modeltrainingdatachanne = lo_row_3->get_channelname( ).
          lv_uuid = lo_row_3->get_versionidentifier( ).
          lv_namestring = lo_row_3->get_modelname( ).
        ENDIF.
      ENDLOOP.
      lv_namestring = lo_row_1->get_name( ).
      lv_resourcedescription = lo_row_1->get_description( ).
      lv_uuid = lo_row_1->get_membershipidentifier( ).
      lv_uuid = lo_row_1->get_collaborationidentifier( ).
      lv_trainedmodelstatus = lo_row_1->get_status( ).
      lv_configuredmodelalgorith = lo_row_1->get_cfguredmdelalgassociat01( ).
    ENDIF.
  ENDLOOP.
ENDIF.