/AWS1/IF_REV=>GETTEST()¶
About GetTest¶
Retrieves a test by ID.
Method Signature¶
METHODS /AWS1/IF_REV~GETTEST
IMPORTING
!IV_TESTID TYPE /AWS1/REVTESTID OPTIONAL
!IV_SERVICEARN TYPE /AWS1/REVARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_revgettestresponse
RAISING
/AWS1/CX_REVACCESSDENIEDEX
/AWS1/CX_REVINTERNALSERVEREX
/AWS1/CX_REVRESOURCENOTFOUNDEX
/AWS1/CX_REVVLDTNEXCEPTION
/AWS1/CX_REVCLIENTEXC
/AWS1/CX_REVSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_testid TYPE /AWS1/REVTESTID /AWS1/REVTESTID¶
The identifier of the test to retrieve.
iv_servicearn TYPE /AWS1/REVARN /AWS1/REVARN¶
The ARN of the service the test belongs to.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_revgettestresponse /AWS1/CL_REVGETTESTRESPONSE¶
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->gettest(
iv_servicearn = |string|
iv_testid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_test = lo_result->get_test( ).
IF lo_test IS NOT INITIAL.
lv_testid = lo_test->get_testid( ).
lv_serviceownedarn = lo_test->get_testtemplatearn( ).
lv_arn = lo_test->get_servicearn( ).
lv_string = lo_test->get_name( ).
LOOP AT lo_test->get_actions( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_actionid( ).
lv_string = lo_row_1->get_description( ).
lv_string = lo_row_1->get_resourcetype( ).
ENDIF.
ENDLOOP.
lo_loggingconfiguration = lo_test->get_loggingconfiguration( ).
IF lo_loggingconfiguration IS NOT INITIAL.
lv_string = lo_loggingconfiguration->get_s3bucketname( ).
lv_arn = lo_loggingconfiguration->get_cloudwatchloggrouparn( ).
lv_string = lo_loggingconfiguration->get_logschemaversion( ).
ENDIF.
LOOP AT lo_test->get_stopconditions( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stopconditionsource = lo_row_3->get_source( ).
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_entityname = lo_test->get_rolename( ).
LOOP AT lo_test->get_parameters( ) into ls_row_4.
lv_key = ls_row_4-key.
LOOP AT ls_row_4-value into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_parametervalue = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
ENDLOOP.
lv_integer = lo_test->get_totaltestruns( ).
lv_integer = lo_test->get_successfultestruns( ).
lv_timestamp = lo_test->get_creationtime( ).
ENDIF.
ENDIF.