/AWS1/IF_WAD=>GETAGENTCONTEXT()¶
About GetAgentContext¶
Retrieves detailed information about a specific context associated with a profile.
Method Signature¶
METHODS /AWS1/IF_WAD~GETAGENTCONTEXT
IMPORTING
!IV_PROFILEARN TYPE /AWS1/WADAGENTPROFILEARN OPTIONAL
!IV_ID TYPE /AWS1/WADUUID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadgetagentcontextrsp
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 context.
iv_id TYPE /AWS1/WADUUID /AWS1/WADUUID¶
The unique identifier of the context to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wadgetagentcontextrsp /AWS1/CL_WADGETAGENTCONTEXTRSP¶
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->getagentcontext(
iv_id = |string|
iv_profilearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_contextsummary = lo_result->get_context( ).
IF lo_contextsummary IS NOT INITIAL.
lv_uuid = lo_contextsummary->get_id( ).
lv_agentprofilearn = lo_contextsummary->get_profilearn( ).
lv_sensitivestring = lo_contextsummary->get_title( ).
lv_contexttype = lo_contextsummary->get_contexttype( ).
lo_contextcontent = lo_contextsummary->get_content( ).
IF lo_contextcontent IS NOT INITIAL.
LOOP AT lo_contextcontent->get_accountids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_contextcontent->get_regions( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_contextcontent->get_awsservices( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_contextcontent->get_resourcetypes( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_string = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_contextcontent->get_resourcetags( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_string = lo_row_9->get_key( ).
lv_string = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lv_sensitivestring = lo_contextcontent->get_applicationoverview( ).
lv_sensitivestring = lo_contextcontent->get_industry( ).
lv_applicationtype = lo_contextcontent->get_applicationtype( ).
lv_criticality = lo_contextcontent->get_criticality( ).
lv_sensitivestring = lo_contextcontent->get_architectureoverview( ).
lv_sensitivestring = lo_contextcontent->get_additionalcontext( ).
ENDIF.
lv_applicationtype = lo_contextsummary->get_applicationtype( ).
lv_criticality = lo_contextsummary->get_criticality( ).
lv_string = lo_contextsummary->get_createdby( ).
lv_timestamp = lo_contextsummary->get_createdat( ).
lv_string = lo_contextsummary->get_lastmodifiedby( ).
lv_timestamp = lo_contextsummary->get_lastmodifiedat( ).
ENDIF.
ENDIF.