Skip to content

/AWS1/IF_BDO=>CREATEONLINEEVALUATIONCONFIG()

About CreateOnlineEvaluationConfig

Creates an online evaluation configuration for continuous monitoring of agent performance. Online evaluation automatically samples live traffic from CloudWatch logs at specified rates and applies evaluators to assess agent quality in production.

Method Signature

METHODS /AWS1/IF_BDO~CREATEONLINEEVALUATIONCONFIG
  IMPORTING
    !IV_CLIENTTOKEN TYPE /AWS1/BDOCLIENTTOKEN OPTIONAL
    !IV_ONLINEEVALCONFIGNAME TYPE /AWS1/BDOEVALUATIONCONFIGNAME OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/BDOEVALUATIONCONFIGDESC OPTIONAL
    !IO_RULE TYPE REF TO /AWS1/CL_BDORULE OPTIONAL
    !IO_DATASOURCECONFIG TYPE REF TO /AWS1/CL_BDODATASOURCECONFIG OPTIONAL
    !IT_EVALUATORS TYPE /AWS1/CL_BDOEVALUATORREFERENCE=>TT_EVALUATORLIST OPTIONAL
    !IV_EVALEXECUTIONROLEARN TYPE /AWS1/BDOROLEARN OPTIONAL
    !IV_ENABLEONCREATE TYPE /AWS1/BDOBOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdocreonlineevalcfg01
  RAISING
    /AWS1/CX_BDOACCESSDENIEDEX
    /AWS1/CX_BDOCONFLICTEXCEPTION
    /AWS1/CX_BDOINTERNALSERVEREX
    /AWS1/CX_BDOSERVICEQUOTAEXCDEX
    /AWS1/CX_BDOTHROTTLINGEX
    /AWS1/CX_BDOVALIDATIONEX
    /AWS1/CX_BDOCLIENTEXC
    /AWS1/CX_BDOSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_onlineevalconfigname TYPE /AWS1/BDOEVALUATIONCONFIGNAME /AWS1/BDOEVALUATIONCONFIGNAME

The name of the online evaluation configuration. Must be unique within your account.

io_rule TYPE REF TO /AWS1/CL_BDORULE /AWS1/CL_BDORULE

The evaluation rule that defines sampling configuration, filters, and session detection settings for the online evaluation.

io_datasourceconfig TYPE REF TO /AWS1/CL_BDODATASOURCECONFIG /AWS1/CL_BDODATASOURCECONFIG

The data source configuration that specifies CloudWatch log groups and service names to monitor for agent traces.

it_evaluators TYPE /AWS1/CL_BDOEVALUATORREFERENCE=>TT_EVALUATORLIST TT_EVALUATORLIST

The list of evaluators to apply during online evaluation. Can include both built-in evaluators and custom evaluators created with CreateEvaluator.

iv_evalexecutionrolearn TYPE /AWS1/BDOROLEARN /AWS1/BDOROLEARN

The Amazon Resource Name (ARN) of the IAM role that grants permissions to read from CloudWatch logs, write evaluation results, and invoke Amazon Bedrock models for evaluation.

iv_enableoncreate TYPE /AWS1/BDOBOOLEAN /AWS1/BDOBOOLEAN

Whether to enable the online evaluation configuration immediately upon creation. If true, evaluation begins automatically.

Optional arguments:

iv_clienttoken TYPE /AWS1/BDOCLIENTTOKEN /AWS1/BDOCLIENTTOKEN

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.

iv_description TYPE /AWS1/BDOEVALUATIONCONFIGDESC /AWS1/BDOEVALUATIONCONFIGDESC

The description of the online evaluation configuration that explains its monitoring purpose and scope.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdocreonlineevalcfg01 /AWS1/CL_BDOCREONLINEEVALCFG01

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->createonlineevaluationconfig(
  io_datasourceconfig = new /aws1/cl_bdodatasourceconfig(
    io_cloudwatchlogs = new /aws1/cl_bdocloudwatchlogsin00(
      it_loggroupnames = VALUE /aws1/cl_bdologgrpnameslist_w=>tt_loggroupnameslist(
        ( new /aws1/cl_bdologgrpnameslist_w( |string| ) )
      )
      it_servicenames = VALUE /aws1/cl_bdoservicenameslist_w=>tt_servicenameslist(
        ( new /aws1/cl_bdoservicenameslist_w( |string| ) )
      )
    )
  )
  io_rule = new /aws1/cl_bdorule(
    io_samplingconfig = new /aws1/cl_bdosamplingconfig( '0.1' )
    io_sessionconfig = new /aws1/cl_bdosessionconfig( 123 )
    it_filters = VALUE /aws1/cl_bdofilter=>tt_filterlist(
      (
        new /aws1/cl_bdofilter(
          io_value = new /aws1/cl_bdofiltervalue(
            iv_booleanvalue = ABAP_TRUE
            iv_doublevalue = '0.1'
            iv_stringvalue = |string|
          )
          iv_key = |string|
          iv_operator = |string|
        )
      )
    )
  )
  it_evaluators = VALUE /aws1/cl_bdoevaluatorreference=>tt_evaluatorlist(
    ( new /aws1/cl_bdoevaluatorreference( |string| ) )
  )
  iv_clienttoken = |string|
  iv_description = |string|
  iv_enableoncreate = ABAP_TRUE
  iv_evalexecutionrolearn = |string|
  iv_onlineevalconfigname = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_onlineevaluationconfiga = lo_result->get_onlineevalconfigarn( ).
  lv_onlineevaluationconfigi = lo_result->get_onlineevaluationconfigid( ).
  lv_timestamp = lo_result->get_createdat( ).
  lo_outputconfig = lo_result->get_outputconfig( ).
  IF lo_outputconfig IS NOT INITIAL.
    lo_cloudwatchoutputconfig = lo_outputconfig->get_cloudwatchconfig( ).
    IF lo_cloudwatchoutputconfig IS NOT INITIAL.
      lv_loggroupname = lo_cloudwatchoutputconfig->get_loggroupname( ).
    ENDIF.
  ENDIF.
  lv_onlineevaluationconfigs = lo_result->get_status( ).
  lv_onlineevaluationexecuti = lo_result->get_executionstatus( ).
  lv_string = lo_result->get_failurereason( ).
ENDIF.