Skip to content

/AWS1/IF_SAG=>BATCHDELETETHREATMODELS()

About BatchDeleteThreatModels

Deletes one or more threat models from an agent space.

Method Signature

METHODS /AWS1/IF_SAG~BATCHDELETETHREATMODELS
  IMPORTING
    !IT_THREATMODELIDS TYPE /AWS1/CL_SAGTHRTMODELIDLIST_W=>TT_THREATMODELIDLIST OPTIONAL
    !IV_AGENTSPACEID TYPE /AWS1/SAGSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sagbtcdelthrtmodsout
  RAISING
    /AWS1/CX_SAGCLIENTEXC
    /AWS1/CX_SAGSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

it_threatmodelids TYPE /AWS1/CL_SAGTHRTMODELIDLIST_W=>TT_THREATMODELIDLIST TT_THREATMODELIDLIST

The list of threat model identifiers to delete.

iv_agentspaceid TYPE /AWS1/SAGSTRING /AWS1/SAGSTRING

The unique identifier of the agent space that contains the threat models to delete.

RETURNING

oo_output TYPE REF TO /aws1/cl_sagbtcdelthrtmodsout /AWS1/CL_SAGBTCDELTHRTMODSOUT

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->batchdeletethreatmodels(
  it_threatmodelids = VALUE /aws1/cl_sagthrtmodelidlist_w=>tt_threatmodelidlist(
    ( new /aws1/cl_sagthrtmodelidlist_w( |string| ) )
  )
  iv_agentspaceid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_deleted( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_failed( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_string = lo_row_3->get_threatmodelid( ).
      lv_string = lo_row_3->get_reason( ).
    ENDIF.
  ENDLOOP.
ENDIF.