/AWS1/IF_AAN=>GETFINDING()¶
About GetFinding¶
Retrieves information about the specified finding. GetFinding and GetFindingV2 both use access-analyzer:GetFinding in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:GetFinding action.
GetFinding is supported only for external access analyzers. You must use GetFindingV2 for internal and unused access analyzers.
Method Signature¶
METHODS /AWS1/IF_AAN~GETFINDING
IMPORTING
!IV_ANALYZERARN TYPE /AWS1/AANANALYZERARN OPTIONAL
!IV_ID TYPE /AWS1/AANFINDINGID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_aangetfindingresponse
RAISING
/AWS1/CX_AANACCESSDENIEDEX
/AWS1/CX_AANINTERNALSERVEREX
/AWS1/CX_AANRESOURCENOTFOUNDEX
/AWS1/CX_AANTHROTTLINGEX
/AWS1/CX_AANVALIDATIONEX
/AWS1/CX_AANCLIENTEXC
/AWS1/CX_AANSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_analyzerarn TYPE /AWS1/AANANALYZERARN /AWS1/AANANALYZERARN¶
The ARN of the analyzer that generated the finding.
iv_id TYPE /AWS1/AANFINDINGID /AWS1/AANFINDINGID¶
The ID of the finding to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_aangetfindingresponse /AWS1/CL_AANGETFINDINGRESPONSE¶
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->getfinding(
iv_analyzerarn = |string|
iv_id = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_finding = lo_result->get_finding( ).
IF lo_finding IS NOT INITIAL.
lv_findingid = lo_finding->get_id( ).
LOOP AT lo_finding->get_principal( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_finding->get_action( ) into lo_row_1.
lo_row_2 = lo_row_1.
IF lo_row_2 IS NOT INITIAL.
lv_string = lo_row_2->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_finding->get_resource( ).
lv_boolean = lo_finding->get_ispublic( ).
lv_resourcetype = lo_finding->get_resourcetype( ).
LOOP AT lo_finding->get_condition( ) into ls_row_3.
lv_key = ls_row_3-key.
lo_value_1 = ls_row_3-value.
IF lo_value_1 IS NOT INITIAL.
lv_string = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_finding->get_createdat( ).
lv_timestamp = lo_finding->get_analyzedat( ).
lv_timestamp = lo_finding->get_updatedat( ).
lv_findingstatus = lo_finding->get_status( ).
lv_string = lo_finding->get_resourceowneraccount( ).
lv_string = lo_finding->get_error( ).
LOOP AT lo_finding->get_sources( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_findingsourcetype = lo_row_5->get_type( ).
lo_findingsourcedetail = lo_row_5->get_detail( ).
IF lo_findingsourcedetail IS NOT INITIAL.
lv_string = lo_findingsourcedetail->get_accesspointarn( ).
lv_string = lo_findingsourcedetail->get_accesspointaccount( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_resourcecontrolpolicyre = lo_finding->get_resrcctlplyrestriction( ).
ENDIF.
ENDIF.