Skip to content

/AWS1/IF_WAD=>GETAGENTPROFILE()

About GetAgentProfile

Retrieves detailed information about an optimization profile, including its configuration and metadata.

Method Signature

METHODS /AWS1/IF_WAD~GETAGENTPROFILE
  IMPORTING
    !IV_PROFILEARN TYPE /AWS1/WADAGENTPROFILEARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadgetagentprofilersp
  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 optimization profile to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_wadgetagentprofilersp /AWS1/CL_WADGETAGENTPROFILERSP

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

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_string = lo_result->get_name( ).
  lv_sensitivestring = lo_result->get_displayname( ).
  lv_sensitivestring = lo_result->get_description( ).
  lv_sensitivestring = lo_result->get_businessoverview( ).
  LOOP AT lo_result->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_boolean = lo_result->get_deletionprotection( ).
  lv_rolearn = lo_result->get_executionrolearn( ).
  LOOP AT lo_result->get_aggregationconfiguration( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_accountid = lo_row_3->get_accountid( ).
      LOOP AT lo_row_3->get_regions( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_region = lo_row_5->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_rolearn = lo_row_3->get_accessrolearn( ).
    ENDIF.
  ENDLOOP.
  lv_agentprofilearn = lo_result->get_arn( ).
  lv_boolean = lo_result->get_eligibleforschdgener( ).
  lv_boolean = lo_result->get_eligibleforarchitgener( ).
  LOOP AT lo_result->get_fielderrors( ) into ls_row_6.
    lv_key = ls_row_6-key.
    lo_value = ls_row_6-value.
    IF lo_value IS NOT INITIAL.
      lv_fielderrormessage = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_tags( ) into lo_row_7.
    lo_row_8 = lo_row_7.
    IF lo_row_8 IS NOT INITIAL.
      lv_string = lo_row_8->get_key( ).
      lv_string = lo_row_8->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_createdby( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_string = lo_result->get_lastmodifiedby( ).
  lv_timestamp = lo_result->get_lastmodifiedat( ).
ENDIF.