Skip to content

/AWS1/IF_REV=>GETTESTTEMPLATE()

About GetTestTemplate

Retrieves a resilience test template by ARN, including the parameters it accepts and the fault actions it runs.

Method Signature

METHODS /AWS1/IF_REV~GETTESTTEMPLATE
  IMPORTING
    !IV_TESTTEMPLATEARN TYPE /AWS1/REVSERVICEOWNEDARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_revgettesttmplrsp
  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_testtemplatearn TYPE /AWS1/REVSERVICEOWNEDARN /AWS1/REVSERVICEOWNEDARN

The ARN of the test template to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_revgettesttmplrsp /AWS1/CL_REVGETTESTTMPLRSP

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

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_testtemplate = lo_result->get_testtemplate( ).
  IF lo_testtemplate IS NOT INITIAL.
    lv_serviceownedarn = lo_testtemplate->get_testtemplatearn( ).
    lv_string = lo_testtemplate->get_name( ).
    lv_string = lo_testtemplate->get_description( ).
    LOOP AT lo_testtemplate->get_parameters( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_string = lo_row_1->get_name( ).
        lv_string = lo_row_1->get_description( ).
        lv_parametertype = lo_row_1->get_type( ).
        lv_boolean = lo_row_1->get_required( ).
        lv_string = lo_row_1->get_defaultvalue( ).
        lv_integer = lo_row_1->get_maxvalues( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_testtemplate->get_actions( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_string = lo_row_3->get_actionid( ).
        lv_string = lo_row_3->get_description( ).
        lv_string = lo_row_3->get_resourcetype( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.