Skip to content

/AWS1/IF_WAD=>UPDATEAGENTGOAL()

About UpdateAgentGoal

Updates the pillars and title of an existing goal associated with a profile.

Method Signature

METHODS /AWS1/IF_WAD~UPDATEAGENTGOAL
  IMPORTING
    !IV_CLIENTTOKEN TYPE /AWS1/WADSTRING OPTIONAL
    !IV_PROFILEARN TYPE /AWS1/WADAGENTPROFILEARN OPTIONAL
    !IV_ID TYPE /AWS1/WADUUID OPTIONAL
    !IT_PILLARS TYPE /AWS1/CL_WADPILLARS_W=>TT_PILLARS OPTIONAL
    !IV_TITLE TYPE /AWS1/WADSENSITIVESTRING OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/WADSENSITIVESTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadupdateagentgoalrsp
  RAISING
    /AWS1/CX_WADACCESSDENIEDEX
    /AWS1/CX_WADINTERNALSERVEREX
    /AWS1/CX_WADRESOURCENOTFOUNDEX
    /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 profile containing the goal to update.

iv_id TYPE /AWS1/WADUUID /AWS1/WADUUID

The unique identifier of the goal to update.

Optional arguments:

iv_clienttoken TYPE /AWS1/WADSTRING /AWS1/WADSTRING

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

it_pillars TYPE /AWS1/CL_WADPILLARS_W=>TT_PILLARS TT_PILLARS

The updated pillars for the goal. Pillars define the optimization focus areas such as cost, performance, resilience, and operational excellence.

iv_title TYPE /AWS1/WADSENSITIVESTRING /AWS1/WADSENSITIVESTRING

The updated title for the goal. Maximum length of 1000 characters.

iv_description TYPE /AWS1/WADSENSITIVESTRING /AWS1/WADSENSITIVESTRING

A description of the goal.

RETURNING

oo_output TYPE REF TO /aws1/cl_wadupdateagentgoalrsp /AWS1/CL_WADUPDATEAGENTGOALRSP

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->updateagentgoal(
  it_pillars = VALUE /aws1/cl_wadpillars_w=>tt_pillars(
    ( new /aws1/cl_wadpillars_w( |string| ) )
  )
  iv_clienttoken = |string|
  iv_description = |string|
  iv_id = |string|
  iv_profilearn = |string|
  iv_title = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_goalsummary = lo_result->get_goal( ).
  IF lo_goalsummary IS NOT INITIAL.
    lv_uuid = lo_goalsummary->get_id( ).
    lv_agentprofilearn = lo_goalsummary->get_profilearn( ).
    LOOP AT lo_goalsummary->get_pillars( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_pillar = lo_row_1->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_sensitivestring = lo_goalsummary->get_title( ).
    lv_sensitivestring = lo_goalsummary->get_description( ).
    lv_string = lo_goalsummary->get_createdby( ).
    lv_timestamp = lo_goalsummary->get_createdat( ).
    lv_string = lo_goalsummary->get_lastmodifiedby( ).
    lv_timestamp = lo_goalsummary->get_lastmodifiedat( ).
  ENDIF.
ENDIF.