Skip to content

/AWS1/IF_IOS=>DESCRIBETASK()

About DescribeTask

Retrieves detailed information about a specific task in a workspace.

Method Signature

METHODS /AWS1/IF_IOS~DESCRIBETASK
  IMPORTING
    !IV_WORKSPACENAME TYPE /AWS1/IOSWORKSPACENAME OPTIONAL
    !IV_TASKNAME TYPE /AWS1/IOSRESOURCENAME OPTIONAL
    !IV_TASKVERSION TYPE /AWS1/IOSVERSION OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iosdescrtaskresponse
  RAISING
    /AWS1/CX_IOSACCESSDENIEDEX
    /AWS1/CX_IOSINTERNALFAILUREEX
    /AWS1/CX_IOSINVALIDREQUESTEX
    /AWS1/CX_IOSRESOURCENOTFOUNDEX
    /AWS1/CX_IOSTHROTTLINGEX
    /AWS1/CX_IOSCLIENTEXC
    /AWS1/CX_IOSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_workspacename TYPE /AWS1/IOSWORKSPACENAME /AWS1/IOSWORKSPACENAME

The name of the workspace.

iv_taskname TYPE /AWS1/IOSRESOURCENAME /AWS1/IOSRESOURCENAME

The name of the task.

Optional arguments:

iv_taskversion TYPE /AWS1/IOSVERSION /AWS1/IOSVERSION

The version number of the task to retrieve. If not specified, returns the latest version.

RETURNING

oo_output TYPE REF TO /aws1/cl_iosdescrtaskresponse /AWS1/CL_IOSDESCRTASKRESPONSE

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->describetask(
  iv_taskname = |string|
  iv_taskversion = |string|
  iv_workspacename = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_workspacename = lo_result->get_workspacename( ).
  lv_resourcename = lo_result->get_taskname( ).
  lv_description = lo_result->get_description( ).
  lv_arn = lo_result->get_taskarn( ).
  lv_version = lo_result->get_version( ).
  lo_taskconfiguration = lo_result->get_taskconfiguration( ).
  IF lo_taskconfiguration IS NOT INITIAL.
    lo_containertaskconfigurat = lo_taskconfiguration->get_containertaskconf( ).
    IF lo_containertaskconfigurat IS NOT INITIAL.
      lv_ecruri = lo_containertaskconfigurat->get_ecruri( ).
      lv_iamrolearn = lo_containertaskconfigurat->get_taskexecutionrole( ).
      lv_processingtype = lo_containertaskconfigurat->get_processingtype( ).
      lv_processingunit = lo_containertaskconfigurat->get_processingunit( ).
      LOOP AT lo_containertaskconfigurat->get_command( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_string = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_timeoutseconds = lo_containertaskconfigurat->get_timeoutseconds( ).
      LOOP AT lo_containertaskconfigurat->get_environmentvariables( ) into ls_row_2.
        lv_key = ls_row_2-key.
        lo_value = ls_row_2-value.
        IF lo_value IS NOT INITIAL.
          lv_environmentvariablevalu = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
  lo_resourcestatus = lo_result->get_status( ).
  IF lo_resourcestatus IS NOT INITIAL.
    lo_resourceerror = lo_resourcestatus->get_error( ).
    IF lo_resourceerror IS NOT INITIAL.
      lv_resourceerrorcode = lo_resourceerror->get_code( ).
      lv_string = lo_resourceerror->get_message( ).
    ENDIF.
    lv_resourcestate = lo_resourcestatus->get_state( ).
  ENDIF.
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
ENDIF.