/AWS1/IF_CWE=>REMOVETARGETS()¶
About RemoveTargets¶
Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked.
When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Allow a short period of time for changes to take effect.
This action can partially fail if too many requests are made at the same time. If that
happens, FailedEntryCount is non-zero in the response and each entry in
FailedEntries provides the ID of the failed target and the error code.
Method Signature¶
METHODS /AWS1/IF_CWE~REMOVETARGETS
IMPORTING
!IV_RULE TYPE /AWS1/CWERULENAME OPTIONAL
!IV_EVENTBUSNAME TYPE /AWS1/CWEEVENTBUSNAMEORARN OPTIONAL
!IT_IDS TYPE /AWS1/CL_CWETARGETIDLIST_W=>TT_TARGETIDLIST OPTIONAL
!IV_FORCE TYPE /AWS1/CWEBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cweremovetargetsrsp
RAISING
/AWS1/CX_CWECONCURRENTMODEX
/AWS1/CX_CWEINTERNALEXCEPTION
/AWS1/CX_CWEMANAGEDRULEEX
/AWS1/CX_CWERESOURCENOTFOUNDEX
/AWS1/CX_CWECLIENTEXC
/AWS1/CX_CWESERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_rule TYPE /AWS1/CWERULENAME /AWS1/CWERULENAME¶
The name of the rule.
it_ids TYPE /AWS1/CL_CWETARGETIDLIST_W=>TT_TARGETIDLIST TT_TARGETIDLIST¶
The IDs of the targets to remove from the rule.
Optional arguments:¶
iv_eventbusname TYPE /AWS1/CWEEVENTBUSNAMEORARN /AWS1/CWEEVENTBUSNAMEORARN¶
The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
iv_force TYPE /AWS1/CWEBOOLEAN /AWS1/CWEBOOLEAN¶
If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify
ForceasTrueto remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by usingDescribeRuleorListRulesand checking theManagedByfield of the response.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cweremovetargetsrsp /AWS1/CL_CWEREMOVETARGETSRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->removetargets(
it_ids = VALUE /aws1/cl_cwetargetidlist_w=>tt_targetidlist(
( new /aws1/cl_cwetargetidlist_w( |string| ) )
)
iv_eventbusname = |string|
iv_force = ABAP_TRUE
iv_rule = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_integer = lo_result->get_failedentrycount( ).
LOOP AT lo_result->get_failedentries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_targetid = lo_row_1->get_targetid( ).
lv_errorcode = lo_row_1->get_errorcode( ).
lv_errormessage = lo_row_1->get_errormessage( ).
ENDIF.
ENDLOOP.
ENDIF.