Skip to content

/AWS1/IF_CWS=>GETINSTRCONFIGURATIONSTATUS()

About GetInstrumentationConfigurationStatus

Retrieves the status history for a single instrumentation configuration during a specified time range. The response lists when the configuration was ACTIVE, READY, ERROR, or DISABLED.

If no status or time window is provided, the operation defaults to ACTIVE events from the last hour.

Method Signature

METHODS /AWS1/IF_CWS~GETINSTRCONFIGURATIONSTATUS
  IMPORTING
    !IV_INSTRUMENTATIONTYPE TYPE /AWS1/CWSINSTRUMENTATIONTYPE OPTIONAL
    !IV_SERVICE TYPE /AWS1/CWSSTRING OPTIONAL
    !IV_ENVIRONMENT TYPE /AWS1/CWSSTRING OPTIONAL
    !IV_SIGNALTYPE TYPE /AWS1/CWSDYNINSTRSIGNALTYPE OPTIONAL
    !IO_LOCATIONIDENTIFIER TYPE REF TO /AWS1/CL_CWSLOCATIONIDENTIFIER OPTIONAL
    !IV_STATUS TYPE /AWS1/CWSINSTRCONFSTATUS OPTIONAL
    !IV_STARTTIME TYPE /AWS1/CWSTIMESTAMP OPTIONAL
    !IV_ENDTIME TYPE /AWS1/CWSTIMESTAMP OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/CWSINTEGER OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/CWSNEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwsgtinstrconfstatrsp
  RAISING
    /AWS1/CX_CWSRESOURCENOTFOUNDEX
    /AWS1/CX_CWSTHROTTLINGEX
    /AWS1/CX_CWSVALIDATIONEX
    /AWS1/CX_CWSCLIENTEXC
    /AWS1/CX_CWSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_instrumentationtype TYPE /AWS1/CWSINSTRUMENTATIONTYPE /AWS1/CWSINSTRUMENTATIONTYPE

Type of instrumentation configuration (BREAKPOINT or PROBE). Required to identify the configuration to retrieve.

iv_service TYPE /AWS1/CWSSTRING /AWS1/CWSSTRING

Service name for the instrumentation configuration.

iv_environment TYPE /AWS1/CWSSTRING /AWS1/CWSSTRING

Environment name for the instrumentation configuration.

iv_signaltype TYPE /AWS1/CWSDYNINSTRSIGNALTYPE /AWS1/CWSDYNINSTRSIGNALTYPE

Signal type for the instrumentation configuration.

io_locationidentifier TYPE REF TO /AWS1/CL_CWSLOCATIONIDENTIFIER /AWS1/CL_CWSLOCATIONIDENTIFIER

Location identifier - either full code location or a pre-computed hash.

Optional arguments:

iv_status TYPE /AWS1/CWSINSTRCONFSTATUS /AWS1/CWSINSTRCONFSTATUS

The single status to query for. If omitted, only ACTIVE status events are returned.

iv_starttime TYPE /AWS1/CWSTIMESTAMP /AWS1/CWSTIMESTAMP

The start of the time range to retrieve status events for. StartTime and EndTime must both be provided together or both be omitted. When both are omitted, the time range defaults to the last hour.

iv_endtime TYPE /AWS1/CWSTIMESTAMP /AWS1/CWSTIMESTAMP

The end of the time range to retrieve status events for. StartTime and EndTime must both be provided together or both be omitted. When both are omitted, the time range defaults to the last hour.

iv_maxresults TYPE /AWS1/CWSINTEGER /AWS1/CWSINTEGER

The maximum number of status events to return in one call. The default is 60.

iv_nexttoken TYPE /AWS1/CWSNEXTTOKEN /AWS1/CWSNEXTTOKEN

Use the token returned by a previous call to retrieve the next page of status events.

RETURNING

oo_output TYPE REF TO /aws1/cl_cwsgtinstrconfstatrsp /AWS1/CL_CWSGTINSTRCONFSTATRSP

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->getinstrconfigurationstatus(
  io_locationidentifier = new /aws1/cl_cwslocationidentifier(
    io_codelocation = new /aws1/cl_cwscodelocation(
      iv_classname = |string|
      iv_codeunit = |string|
      iv_filepath = |string|
      iv_language = |string|
      iv_linenumber = 123
      iv_methodname = |string|
    )
    iv_locationhash = |string|
  )
  iv_endtime = '20150101000000.0000000'
  iv_environment = |string|
  iv_instrumentationtype = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_service = |string|
  iv_signaltype = |string|
  iv_starttime = '20150101000000.0000000'
  iv_status = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_string = lo_result->get_service( ).
  lv_string = lo_result->get_environment( ).
  lv_dynamicinstrumentations = lo_result->get_signaltype( ).
  lo_location = lo_result->get_location( ).
  IF lo_location IS NOT INITIAL.
    lo_codelocation = lo_location->get_codelocation( ).
    IF lo_codelocation IS NOT INITIAL.
      lv_programminglanguage = lo_codelocation->get_language( ).
      lv_string = lo_codelocation->get_codeunit( ).
      lv_string = lo_codelocation->get_classname( ).
      lv_string = lo_codelocation->get_methodname( ).
      lv_string = lo_codelocation->get_filepath( ).
      lv_integer = lo_codelocation->get_linenumber( ).
    ENDIF.
  ENDIF.
  lv_instrumentationconfigur = lo_result->get_status( ).
  LOOP AT lo_result->get_events( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_timestamp = lo_row_1->get_time( ).
      lv_instrumentationerrorcau = lo_row_1->get_errorcause( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.