/AWS1/IF_LMD=>UPDATEFUNCTIONURLCONFIG()¶
About UpdateFunctionUrlConfig¶
Updates the configuration for a Lambda function URL.
Method Signature¶
METHODS /AWS1/IF_LMD~UPDATEFUNCTIONURLCONFIG
IMPORTING
!IV_FUNCTIONNAME TYPE /AWS1/LMDFUNCTIONNAME OPTIONAL
!IV_QUALIFIER TYPE /AWS1/LMDFUNCTIONURLQUALIFIER OPTIONAL
!IV_AUTHTYPE TYPE /AWS1/LMDFUNCTIONURLAUTHTYPE OPTIONAL
!IO_CORS TYPE REF TO /AWS1/CL_LMDCORS OPTIONAL
!IV_INVOKEMODE TYPE /AWS1/LMDINVOKEMODE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmdupdfuncurlcfgrsp
RAISING
/AWS1/CX_LMDINVPARAMVALUEEX
/AWS1/CX_LMDRESOURCECONFLICTEX
/AWS1/CX_LMDRESOURCENOTFOUNDEX
/AWS1/CX_LMDSERVICEEXCEPTION
/AWS1/CX_LMDTOOMANYREQUESTSEX
/AWS1/CX_LMDCLIENTEXC
/AWS1/CX_LMDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_functionname TYPE /AWS1/LMDFUNCTIONNAME /AWS1/LMDFUNCTIONNAME¶
The name or ARN of the Lambda function.
Name formats
Function name –
my-function.Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function.Partial ARN –
123456789012:function:my-function.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:¶
iv_qualifier TYPE /AWS1/LMDFUNCTIONURLQUALIFIER /AWS1/LMDFUNCTIONURLQUALIFIER¶
The alias name.
iv_authtype TYPE /AWS1/LMDFUNCTIONURLAUTHTYPE /AWS1/LMDFUNCTIONURLAUTHTYPE¶
The type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Control access to Lambda function URLs.
io_cors TYPE REF TO /AWS1/CL_LMDCORS /AWS1/CL_LMDCORS¶
The cross-origin resource sharing (CORS) settings for your function URL.
iv_invokemode TYPE /AWS1/LMDINVOKEMODE /AWS1/LMDINVOKEMODE¶
Use one of the following options:
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.
RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 200 MB.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmdupdfuncurlcfgrsp /AWS1/CL_LMDUPDFUNCURLCFGRSP¶
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->updatefunctionurlconfig(
io_cors = new /aws1/cl_lmdcors(
it_allowheaders = VALUE /aws1/cl_lmdheaderslist_w=>tt_headerslist(
( new /aws1/cl_lmdheaderslist_w( |string| ) )
)
it_allowmethods = VALUE /aws1/cl_lmdallowmethodslist_w=>tt_allowmethodslist(
( new /aws1/cl_lmdallowmethodslist_w( |string| ) )
)
it_alloworigins = VALUE /aws1/cl_lmdalloworiginslist_w=>tt_alloworiginslist(
( new /aws1/cl_lmdalloworiginslist_w( |string| ) )
)
it_exposeheaders = VALUE /aws1/cl_lmdheaderslist_w=>tt_headerslist(
( new /aws1/cl_lmdheaderslist_w( |string| ) )
)
iv_allowcredentials = ABAP_TRUE
iv_maxage = 123
)
iv_authtype = |string|
iv_functionname = |string|
iv_invokemode = |string|
iv_qualifier = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_functionurl = lo_result->get_functionurl( ).
lv_functionarn = lo_result->get_functionarn( ).
lv_functionurlauthtype = lo_result->get_authtype( ).
lo_cors = lo_result->get_cors( ).
IF lo_cors IS NOT INITIAL.
lv_allowcredentials = lo_cors->get_allowcredentials( ).
LOOP AT lo_cors->get_allowheaders( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_header = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_cors->get_allowmethods( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_method = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_cors->get_alloworigins( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_origin = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_cors->get_exposeheaders( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_header = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_maxage = lo_cors->get_maxage( ).
ENDIF.
lv_timestamp = lo_result->get_creationtime( ).
lv_timestamp = lo_result->get_lastmodifiedtime( ).
lv_invokemode = lo_result->get_invokemode( ).
ENDIF.