/AWS1/IF_SHB=>DESCRIBEACTIONTARGETS()¶
About DescribeActionTargets¶
Returns a list of the custom action targets in Security Hub in your account.
Method Signature¶
METHODS /AWS1/IF_SHB~DESCRIBEACTIONTARGETS
IMPORTING
!IT_ACTIONTARGETARNS TYPE /AWS1/CL_SHBARNLIST_W=>TT_ARNLIST OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/SHBNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/SHBMAXRESULTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_shbdescractiontgtsrsp
RAISING
/AWS1/CX_SHBINTERNALEXCEPTION
/AWS1/CX_SHBINVALIDACCESSEX
/AWS1/CX_SHBINVALIDINPUTEX
/AWS1/CX_SHBRESOURCENOTFOUNDEX
/AWS1/CX_SHBCLIENTEXC
/AWS1/CX_SHBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
it_actiontargetarns TYPE /AWS1/CL_SHBARNLIST_W=>TT_ARNLIST TT_ARNLIST¶
A list of custom action target ARNs for the custom action targets to retrieve.
iv_nexttoken TYPE /AWS1/SHBNEXTTOKEN /AWS1/SHBNEXTTOKEN¶
The token that is required for pagination. On your first call to the
DescribeActionTargetsoperation, set the value of this parameter toNULL.For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.
iv_maxresults TYPE /AWS1/SHBMAXRESULTS /AWS1/SHBMAXRESULTS¶
The maximum number of results to return.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_shbdescractiontgtsrsp /AWS1/CL_SHBDESCRACTIONTGTSRSP¶
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->describeactiontargets(
it_actiontargetarns = VALUE /aws1/cl_shbarnlist_w=>tt_arnlist(
( new /aws1/cl_shbarnlist_w( |string| ) )
)
iv_maxresults = 123
iv_nexttoken = |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_actiontargets( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_actiontargetarn( ).
lv_nonemptystring = lo_row_1->get_name( ).
lv_nonemptystring = lo_row_1->get_description( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
To return custom action targets¶
The following example returns a list of custom action targets. You use custom actions on findings and insights in Security Hub to trigger target actions in Amazon CloudWatch Events.
DATA(lo_result) = lo_client->describeactiontargets(
it_actiontargetarns = VALUE /aws1/cl_shbarnlist_w=>tt_arnlist(
( new /aws1/cl_shbarnlist_w( |arn:aws:securityhub:us-west-1:123456789012:action/custom/Remediation| ) )
)
).