Skip to content

/AWS1/IF_CNT=>DESCRIBETESTCASE()

About DescribeTestCase

Describes the specified test case and allows you to get the content and metadata of the test case for the specified Amazon Connect instance.

Method Signature

METHODS /AWS1/IF_CNT~DESCRIBETESTCASE
  IMPORTING
    !IV_INSTANCEID TYPE /AWS1/CNTINSTANCEIDORARN OPTIONAL
    !IV_TESTCASEID TYPE /AWS1/CNTTESTCASEID OPTIONAL
    !IV_STATUS TYPE /AWS1/CNTTESTCASESTATUS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntdescrtestcasersp
  RAISING
    /AWS1/CX_CNTACCESSDENIEDEX
    /AWS1/CX_CNTINTERNALSERVICEEX
    /AWS1/CX_CNTINVALIDPARAMETEREX
    /AWS1/CX_CNTINVALIDREQUESTEX
    /AWS1/CX_CNTRESOURCENOTFOUNDEX
    /AWS1/CX_CNTTHROTTLINGEX
    /AWS1/CX_CNTCLIENTEXC
    /AWS1/CX_CNTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_instanceid TYPE /AWS1/CNTINSTANCEIDORARN /AWS1/CNTINSTANCEIDORARN

The identifier of the Amazon Connect instance.

iv_testcaseid TYPE /AWS1/CNTTESTCASEID /AWS1/CNTTESTCASEID

The identifier of the test case.

Optional arguments:

iv_status TYPE /AWS1/CNTTESTCASESTATUS /AWS1/CNTTESTCASESTATUS

The status of the test case version to retrieve. If not specified, returns the published version if available, otherwise returns the saved version.

RETURNING

oo_output TYPE REF TO /aws1/cl_cntdescrtestcasersp /AWS1/CL_CNTDESCRTESTCASERSP

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->describetestcase(
  iv_instanceid = |string|
  iv_status = |string|
  iv_testcaseid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_testcase = lo_result->get_testcase( ).
  IF lo_testcase IS NOT INITIAL.
    lv_arn = lo_testcase->get_arn( ).
    lv_testcaseid = lo_testcase->get_id( ).
    lv_testcasename = lo_testcase->get_name( ).
    lv_testcasecontent = lo_testcase->get_content( ).
    lo_testcaseentrypoint = lo_testcase->get_entrypoint( ).
    IF lo_testcaseentrypoint IS NOT INITIAL.
      lv_testcaseentrypointtype = lo_testcaseentrypoint->get_type( ).
      lo_voicecallentrypointpara = lo_testcaseentrypoint->get_voicecallentrypointparms( ).
      IF lo_voicecallentrypointpara IS NOT INITIAL.
        lv_phonenumber = lo_voicecallentrypointpara->get_sourcephonenumber( ).
        lv_phonenumber = lo_voicecallentrypointpara->get_destinationphonenumber( ).
        lv_contactflowid = lo_voicecallentrypointpara->get_flowid( ).
      ENDIF.
      lo_chatentrypointparameter = lo_testcaseentrypoint->get_chatentrypointparameters( ).
      IF lo_chatentrypointparameter IS NOT INITIAL.
        lv_contactflowid = lo_chatentrypointparameter->get_flowid( ).
      ENDIF.
    ENDIF.
    lv_testcaseinitializationd = lo_testcase->get_initializationdata( ).
    lv_testcasedescription = lo_testcase->get_description( ).
    lv_testcasestatus = lo_testcase->get_status( ).
    lv_timestamp = lo_testcase->get_lastmodifiedtime( ).
    lv_regionname = lo_testcase->get_lastmodifiedregion( ).
    LOOP AT lo_testcase->get_tags( ) into ls_row.
      lv_key = ls_row-key.
      lo_value = ls_row-value.
      IF lo_value IS NOT INITIAL.
        lv_tagvalue = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_testcasesha256 = lo_testcase->get_testcasesha256( ).
  ENDIF.
ENDIF.