/AWS1/IF_APY=>UPDATEFUNCTION()¶
About UpdateFunction¶
Updates a Function object.
Method Signature¶
METHODS /AWS1/IF_APY~UPDATEFUNCTION
IMPORTING
!IV_APIID TYPE /AWS1/APYSTRING OPTIONAL
!IV_NAME TYPE /AWS1/APYRESOURCENAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/APYSTRING OPTIONAL
!IV_FUNCTIONID TYPE /AWS1/APYRESOURCENAME OPTIONAL
!IV_DATASOURCENAME TYPE /AWS1/APYRESOURCENAME OPTIONAL
!IV_REQUESTMAPPINGTEMPLATE TYPE /AWS1/APYMAPPINGTEMPLATE OPTIONAL
!IV_RESPONSEMAPPINGTEMPLATE TYPE /AWS1/APYMAPPINGTEMPLATE OPTIONAL
!IV_FUNCTIONVERSION TYPE /AWS1/APYSTRING OPTIONAL
!IO_SYNCCONFIG TYPE REF TO /AWS1/CL_APYSYNCCONFIG OPTIONAL
!IV_MAXBATCHSIZE TYPE /AWS1/APYMAXBATCHSIZE OPTIONAL
!IO_RUNTIME TYPE REF TO /AWS1/CL_APYAPPSYNCRUNTIME OPTIONAL
!IV_CODE TYPE /AWS1/APYCODE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_apyupdatefuncresponse
RAISING
/AWS1/CX_APYBADREQUESTEX
/AWS1/CX_APYCONCURRENTMODEX
/AWS1/CX_APYINTERNALFAILUREEX
/AWS1/CX_APYNOTFOUNDEXCEPTION
/AWS1/CX_APYUNAUTHORIZEDEX
/AWS1/CX_APYCLIENTEXC
/AWS1/CX_APYSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_apiid TYPE /AWS1/APYSTRING /AWS1/APYSTRING¶
The GraphQL API ID.
iv_name TYPE /AWS1/APYRESOURCENAME /AWS1/APYRESOURCENAME¶
The
Functionname.
iv_functionid TYPE /AWS1/APYRESOURCENAME /AWS1/APYRESOURCENAME¶
The function ID.
iv_datasourcename TYPE /AWS1/APYRESOURCENAME /AWS1/APYRESOURCENAME¶
The
FunctionDataSourcename.
Optional arguments:¶
iv_description TYPE /AWS1/APYSTRING /AWS1/APYSTRING¶
The
Functiondescription.
iv_requestmappingtemplate TYPE /AWS1/APYMAPPINGTEMPLATE /AWS1/APYMAPPINGTEMPLATE¶
The
Functionrequest mapping template. Functions support only the 2018-05-29 version of the request mapping template.
iv_responsemappingtemplate TYPE /AWS1/APYMAPPINGTEMPLATE /AWS1/APYMAPPINGTEMPLATE¶
The
Functionrequest mapping template.
iv_functionversion TYPE /AWS1/APYSTRING /AWS1/APYSTRING¶
The
versionof the request mapping template. Currently, the supported value is 2018-05-29. Note that when using VTL and mapping templates, thefunctionVersionis required.
io_syncconfig TYPE REF TO /AWS1/CL_APYSYNCCONFIG /AWS1/CL_APYSYNCCONFIG¶
syncConfig
iv_maxbatchsize TYPE /AWS1/APYMAXBATCHSIZE /AWS1/APYMAXBATCHSIZE¶
The maximum batching size for a resolver.
io_runtime TYPE REF TO /AWS1/CL_APYAPPSYNCRUNTIME /AWS1/CL_APYAPPSYNCRUNTIME¶
runtime
iv_code TYPE /AWS1/APYCODE /AWS1/APYCODE¶
The
functioncode that contains the request and response functions. When code is used, theruntimeis required. Theruntimevalue must beAPPSYNC_JS.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_apyupdatefuncresponse /AWS1/CL_APYUPDATEFUNCRESPONSE¶
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->updatefunction(
io_runtime = new /aws1/cl_apyappsyncruntime(
iv_name = |string|
iv_runtimeversion = |string|
)
io_syncconfig = new /aws1/cl_apysyncconfig(
io_lambdaconflicthandlercfg = new /aws1/cl_apylambdaconflictha00( |string| )
iv_conflictdetection = |string|
iv_conflicthandler = |string|
)
iv_apiid = |string|
iv_code = |string|
iv_datasourcename = |string|
iv_description = |string|
iv_functionid = |string|
iv_functionversion = |string|
iv_maxbatchsize = 123
iv_name = |string|
iv_requestmappingtemplate = |string|
iv_responsemappingtemplate = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_functionconfiguration = lo_result->get_functionconfiguration( ).
IF lo_functionconfiguration IS NOT INITIAL.
lv_string = lo_functionconfiguration->get_functionid( ).
lv_string = lo_functionconfiguration->get_functionarn( ).
lv_resourcename = lo_functionconfiguration->get_name( ).
lv_string = lo_functionconfiguration->get_description( ).
lv_resourcename = lo_functionconfiguration->get_datasourcename( ).
lv_mappingtemplate = lo_functionconfiguration->get_requestmappingtemplate( ).
lv_mappingtemplate = lo_functionconfiguration->get_responsemappingtemplate( ).
lv_string = lo_functionconfiguration->get_functionversion( ).
lo_syncconfig = lo_functionconfiguration->get_syncconfig( ).
IF lo_syncconfig IS NOT INITIAL.
lv_conflicthandlertype = lo_syncconfig->get_conflicthandler( ).
lv_conflictdetectiontype = lo_syncconfig->get_conflictdetection( ).
lo_lambdaconflicthandlerco = lo_syncconfig->get_lambdaconflicthandlercfg( ).
IF lo_lambdaconflicthandlerco IS NOT INITIAL.
lv_string = lo_lambdaconflicthandlerco->get_lambdaconflicthandlerarn( ).
ENDIF.
ENDIF.
lv_maxbatchsize = lo_functionconfiguration->get_maxbatchsize( ).
lo_appsyncruntime = lo_functionconfiguration->get_runtime( ).
IF lo_appsyncruntime IS NOT INITIAL.
lv_runtimename = lo_appsyncruntime->get_name( ).
lv_string = lo_appsyncruntime->get_runtimeversion( ).
ENDIF.
lv_code = lo_functionconfiguration->get_code( ).
ENDIF.
ENDIF.