/AWS1/IF_CBO=>UPDATECUSTOMACTION()¶
About UpdateCustomAction¶
Updates a custom action.
Method Signature¶
METHODS /AWS1/IF_CBO~UPDATECUSTOMACTION
IMPORTING
!IV_CUSTOMACTIONARN TYPE /AWS1/CBOCUSTOMACTIONARN OPTIONAL
!IO_DEFINITION TYPE REF TO /AWS1/CL_CBOCUSTOMACTIONDEFN OPTIONAL
!IV_ALIASNAME TYPE /AWS1/CBOCUSTOMACTIONALIASNAME OPTIONAL
!IT_ATTACHMENTS TYPE /AWS1/CL_CBOCUSTACTATTACHMENT=>TT_CUSTOMACTIONATTACHMENTLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cboupdcustactionrslt
RAISING
/AWS1/CX_CBOINTERNALSVCERROR
/AWS1/CX_CBOINVALIDREQUESTEX
/AWS1/CX_CBORESOURCENOTFOUNDEX
/AWS1/CX_CBOUNAUTHORIZEDEX
/AWS1/CX_CBOCLIENTEXC
/AWS1/CX_CBOSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_customactionarn TYPE /AWS1/CBOCUSTOMACTIONARN /AWS1/CBOCUSTOMACTIONARN¶
The fully defined Amazon Resource Name (ARN) of the custom action.
io_definition TYPE REF TO /AWS1/CL_CBOCUSTOMACTIONDEFN /AWS1/CL_CBOCUSTOMACTIONDEFN¶
The definition of the command to run when invoked as an alias or as an action button.
Optional arguments:¶
iv_aliasname TYPE /AWS1/CBOCUSTOMACTIONALIASNAME /AWS1/CBOCUSTOMACTIONALIASNAME¶
The name used to invoke this action in the chat channel. For example,
@aws run my-alias.
it_attachments TYPE /AWS1/CL_CBOCUSTACTATTACHMENT=>TT_CUSTOMACTIONATTACHMENTLIST TT_CUSTOMACTIONATTACHMENTLIST¶
Defines when this custom action button should be attached to a notification.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cboupdcustactionrslt /AWS1/CL_CBOUPDCUSTACTIONRSLT¶
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->updatecustomaction(
io_definition = new /aws1/cl_cbocustomactiondefn( |string| )
it_attachments = VALUE /aws1/cl_cbocustactattachment=>tt_customactionattachmentlist(
(
new /aws1/cl_cbocustactattachment(
it_criteria = VALUE /aws1/cl_cbocustactattachmen00=>tt_custactattachmentcritlist(
(
new /aws1/cl_cbocustactattachmen00(
iv_operator = |string|
iv_value = |string|
iv_variablename = |string|
)
)
)
it_variables = VALUE /aws1/cl_cbocustactattachmen01=>tt_custactattachmentvariables(
(
VALUE /aws1/cl_cbocustactattachmen01=>ts_custactattachmentv00_maprow(
key = |string|
value = new /aws1/cl_cbocustactattachmen01( |string| )
)
)
)
iv_buttontext = |string|
iv_notificationtype = |string|
)
)
)
iv_aliasname = |string|
iv_customactionarn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_customactionarn = lo_result->get_customactionarn( ).
ENDIF.
Update the command definition of an existing action¶
Updates the command text of a custom action without altering the existing alias name or attachment criteria
DATA(lo_result) = lo_client->updatecustomaction(
io_definition = new /aws1/cl_cbocustomactiondefn( |lambda invoke MyNewFunction| )
iv_customactionarn = |arn:aws:chatbot::1234567890:custom-action/my-custom-action|
).