/AWS1/IF_FRM=>LISTHOOKRESULTS()¶
About ListHookResults¶
Returns summaries of invoked Hooks. For more information, see View invocation summaries for CloudFormation Hooks in the CloudFormation Hooks User Guide.
This operation supports the following parameter combinations:
-
No parameters: Returns all Hook invocation summaries.
-
TypeArnonly: Returns summaries for a specific Hook. -
TypeArnandStatus: Returns summaries for a specific Hook filtered by status. -
TargetIdandTargetType: Returns summaries for a specific Hook invocation target.
Method Signature¶
METHODS /AWS1/IF_FRM~LISTHOOKRESULTS
IMPORTING
!IV_TARGETTYPE TYPE /AWS1/FRMLISTHOOKRSLTSTGTTYPE OPTIONAL
!IV_TARGETID TYPE /AWS1/FRMHOOKRESULTID OPTIONAL
!IV_TYPEARN TYPE /AWS1/FRMHOOKTYPEARN OPTIONAL
!IV_STATUS TYPE /AWS1/FRMHOOKSTATUS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/FRMNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_frmlisthookrsltsout
RAISING
/AWS1/CX_FRMHOOKRSLTNOTFOUNDEX
/AWS1/CX_FRMCLIENTEXC
/AWS1/CX_FRMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_targettype TYPE /AWS1/FRMLISTHOOKRSLTSTGTTYPE /AWS1/FRMLISTHOOKRSLTSTGTTYPE¶
Filters results by target type. Currently, only
CHANGE_SETandCLOUD_CONTROLare supported filter options.Required when
TargetIdis specified and cannot be used otherwise.
iv_targetid TYPE /AWS1/FRMHOOKRESULTID /AWS1/FRMHOOKRESULTID¶
Filters results by the unique identifier of the target the Hook was invoked against.
For change sets, this is the change set ARN. When the target is a Cloud Control API operation, this value must be the
HookRequestTokenreturned by the Cloud Control API request. For more information on theHookRequestToken, see ProgressEvent.Required when
TargetTypeis specified and cannot be used otherwise.
iv_typearn TYPE /AWS1/FRMHOOKTYPEARN /AWS1/FRMHOOKTYPEARN¶
Filters results by the ARN of the Hook. Can be used alone or in combination with
Status.
iv_status TYPE /AWS1/FRMHOOKSTATUS /AWS1/FRMHOOKSTATUS¶
Filters results by the status of Hook invocations. Can only be used in combination with
TypeArn. Valid values are:
HOOK_IN_PROGRESS: The Hook is currently running.
HOOK_COMPLETE_SUCCEEDED: The Hook completed successfully.
HOOK_COMPLETE_FAILED: The Hook completed but failed validation.
HOOK_FAILED: The Hook encountered an error during execution.
iv_nexttoken TYPE /AWS1/FRMNEXTTOKEN /AWS1/FRMNEXTTOKEN¶
The token for the next set of items to return. (You received this token from a previous call.)
RETURNING¶
oo_output TYPE REF TO /aws1/cl_frmlisthookrsltsout /AWS1/CL_FRMLISTHOOKRSLTSOUT¶
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->listhookresults(
iv_nexttoken = |string|
iv_status = |string|
iv_targetid = |string|
iv_targettype = |string|
iv_typearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_listhookresultstargetty = lo_result->get_targettype( ).
lv_hookresultid = lo_result->get_targetid( ).
LOOP AT lo_result->get_hookresults( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_hookinvocationid = lo_row_1->get_hookresultid( ).
lv_hookinvocationpoint = lo_row_1->get_invocationpoint( ).
lv_hookfailuremode = lo_row_1->get_failuremode( ).
lv_hooktypename = lo_row_1->get_typename( ).
lv_hooktypeversionid = lo_row_1->get_typeversionid( ).
lv_hooktypeconfigurationve = lo_row_1->get_typeconfversionid( ).
lv_hookstatus = lo_row_1->get_status( ).
lv_hookstatusreason = lo_row_1->get_hookstatusreason( ).
lv_timestamp = lo_row_1->get_invokedat( ).
lv_listhookresultstargetty = lo_row_1->get_targettype( ).
lv_hookresultid = lo_row_1->get_targetid( ).
lv_hooktypearn = lo_row_1->get_typearn( ).
lv_hookresultid = lo_row_1->get_hookexecutiontarget( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.