/AWS1/IF_LMW=>CREATEWEBFUNCTION()¶
About CreateWebFunction¶
Creates a web function with an initial revision and endpoint. To create a web function, you provide the function name, revision configuration (code and service settings), and endpoint configuration.
To use this operation, you must have the CreateWebFunction permission on the web function. You don't need separate permissions for the initial revision or endpoint.
This API is experimental and for internal AWS use only. It is not yet available to external customers.
Method Signature¶
METHODS /AWS1/IF_LMW~CREATEWEBFUNCTION
IMPORTING
!IV_FUNCTIONNAME TYPE /AWS1/LMWFUNCTIONNAME OPTIONAL
!IO_REVISIONCONFIG TYPE REF TO /AWS1/CL_LMWREVISIONCONFIG OPTIONAL
!IO_ENDPOINTCONFIG TYPE REF TO /AWS1/CL_LMWENDPOINTCONFIG OPTIONAL
!IT_TAGS TYPE /AWS1/CL_LMWTAGS_W=>TT_TAGS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmwcreatewebfuncrsp
RAISING
/AWS1/CX_LMWACCESSDENIEDEX
/AWS1/CX_LMWCONFLICTEXCEPTION
/AWS1/CX_LMWINTERNALSERVEREX
/AWS1/CX_LMWRESOURCENOTFOUNDEX
/AWS1/CX_LMWSERVICEQUOTAEXCDEX
/AWS1/CX_LMWTHROTTLINGEX
/AWS1/CX_LMWVLDTNEXCEPTION
/AWS1/CX_LMWCLIENTEXC
/AWS1/CX_LMWSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_functionname TYPE /AWS1/LMWFUNCTIONNAME /AWS1/LMWFUNCTIONNAME¶
The name of the web function. The name can contain letters, numbers, hyphens (-), and underscores (_), and can't begin or end with a hyphen or an underscore. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Optional arguments:¶
io_revisionconfig TYPE REF TO /AWS1/CL_LMWREVISIONCONFIG /AWS1/CL_LMWREVISIONCONFIG¶
The configuration for the initial revision of the web function, including code and service settings.
io_endpointconfig TYPE REF TO /AWS1/CL_LMWENDPOINTCONFIG /AWS1/CL_LMWENDPOINTCONFIG¶
The configuration for the initial endpoint of the web function.
it_tags TYPE /AWS1/CL_LMWTAGS_W=>TT_TAGS TT_TAGS¶
A map of tag keys and values to apply to the web function.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmwcreatewebfuncrsp /AWS1/CL_LMWCREATEWEBFUNCRSP¶
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->createwebfunction(
io_endpointconfig = new /aws1/cl_lmwendpointconfig(
io_scalingconfig = new /aws1/cl_lmwscalingconfig( 123 )
io_throttleconfig = new /aws1/cl_lmwthrottleconfig( 123 )
it_regions = VALUE /aws1/cl_lmwregionlist_w=>tt_regionlist(
( new /aws1/cl_lmwregionlist_w( |string| ) )
)
iv_authtype = |string|
iv_autodeploymentmode = |string|
iv_description = |string|
iv_endpointname = |string|
iv_endpointtype = |string|
)
io_revisionconfig = new /aws1/cl_lmwrevisionconfig(
io_buildconfig = new /aws1/cl_lmwbuildconfig(
io_codeconfig = new /aws1/cl_lmwcodeconfig(
io_s3object = new /aws1/cl_lmws3object(
iv_bucket = |string|
iv_key = |string|
iv_versionid = |string|
)
)
io_runtimeconfig = new /aws1/cl_lmwruntimeconfig( |string| )
)
io_serviceconfig = new /aws1/cl_lmwserviceconfig(
io_telemetryconfig = new /aws1/cl_lmwtelemetryconfig(
io_loggingconfig = new /aws1/cl_lmwloggingconfig(
iv_applicationloglevel = |string|
iv_loggroup = |string|
iv_systemloglevel = |string|
)
)
it_environmentvariables = VALUE /aws1/cl_lmwenvvariables_w=>tt_environmentvariables(
(
VALUE /aws1/cl_lmwenvvariables_w=>ts_environmentvariables_maprow(
key = |string|
value = new /aws1/cl_lmwenvvariables_w( |string| )
)
)
)
iv_executionrolearn = |string|
iv_maxconcrperenvironment = 123
iv_timeoutseconds = 123
)
iv_description = |string|
iv_kmskeyarn = |string|
)
it_tags = VALUE /aws1/cl_lmwtags_w=>tt_tags(
(
VALUE /aws1/cl_lmwtags_w=>ts_tags_maprow(
key = |string|
value = new /aws1/cl_lmwtags_w( |string| )
)
)
)
iv_functionname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_functionname = lo_result->get_functionname( ).
lv_functionarn = lo_result->get_functionarn( ).
lv_functionstate = lo_result->get_state( ).
lv_string = lo_result->get_statereason( ).
lv_datetime = lo_result->get_createdat( ).
lv_datetime = lo_result->get_updatedat( ).
lo_functionrevisionsummary = lo_result->get_revision( ).
IF lo_functionrevisionsummary IS NOT INITIAL.
lv_revisionarn = lo_functionrevisionsummary->get_revisionarn( ).
lv_revisionid = lo_functionrevisionsummary->get_revisionid( ).
lv_description = lo_functionrevisionsummary->get_description( ).
lv_revisionstate = lo_functionrevisionsummary->get_state( ).
lv_string = lo_functionrevisionsummary->get_statereason( ).
lv_datetime = lo_functionrevisionsummary->get_createdat( ).
ENDIF.
lo_functionendpointsummary = lo_result->get_endpoint( ).
IF lo_functionendpointsummary IS NOT INITIAL.
lv_endpointarn = lo_functionendpointsummary->get_endpointarn( ).
lv_endpointname = lo_functionendpointsummary->get_endpointname( ).
lv_description = lo_functionendpointsummary->get_description( ).
lv_endpointtype = lo_functionendpointsummary->get_endpointtype( ).
lv_domainname = lo_functionendpointsummary->get_domainname( ).
lv_authtype = lo_functionendpointsummary->get_authtype( ).
lv_autodeploymentmode = lo_functionendpointsummary->get_autodeploymentmode( ).
LOOP AT lo_functionendpointsummary->get_revisionweights( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_revisionid = lo_row_1->get_revisionid( ).
lv_integer = lo_row_1->get_weight( ).
ENDIF.
ENDLOOP.
LOOP AT lo_functionendpointsummary->get_regions( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_region = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lo_scalingconfig = lo_functionendpointsummary->get_scalingconfig( ).
IF lo_scalingconfig IS NOT INITIAL.
lv_integer = lo_scalingconfig->get_maxenvironments( ).
ENDIF.
lo_throttleconfig = lo_functionendpointsummary->get_throttleconfig( ).
IF lo_throttleconfig IS NOT INITIAL.
lv_integer = lo_throttleconfig->get_ratelimit( ).
ENDIF.
lv_endpointstate = lo_functionendpointsummary->get_state( ).
lv_string = lo_functionendpointsummary->get_statereason( ).
lv_endpointupdatestatus = lo_functionendpointsummary->get_updatestatus( ).
lv_string = lo_functionendpointsummary->get_updatestatusreason( ).
lv_datetime = lo_functionendpointsummary->get_createdat( ).
lv_datetime = lo_functionendpointsummary->get_updatedat( ).
ENDIF.
LOOP AT lo_result->get_tags( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.