Skip to content

/AWS1/IF_LMW=>CREATEWEBFUNCTIONENDPOINT()

About CreateWebFunctionEndpoint

Creates an endpoint for a web function. An endpoint exposes the web function over HTTPS and routes traffic to one or more revisions.

To use this operation, you must have the CreateWebFunctionEndpoint permission on the web function, not on the endpoint being created.

This API is experimental and for internal AWS use only. It is not yet available to external customers.

Method Signature

METHODS /AWS1/IF_LMW~CREATEWEBFUNCTIONENDPOINT
  IMPORTING
    !IV_FUNCTIONNAME TYPE /AWS1/LMWFUNCTIONNAME OPTIONAL
    !IV_ENDPOINTNAME TYPE /AWS1/LMWENDPOINTNAME OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/LMWDESCRIPTION OPTIONAL
    !IV_ENDPOINTTYPE TYPE /AWS1/LMWENDPOINTTYPE OPTIONAL
    !IV_AUTHTYPE TYPE /AWS1/LMWAUTHTYPE OPTIONAL
    !IV_AUTODEPLOYMENTMODE TYPE /AWS1/LMWAUTODEPLOYMENTMODE OPTIONAL
    !IT_REVISIONWEIGHTS TYPE /AWS1/CL_LMWREVISIONWEIGHT=>TT_REVISIONWEIGHTLIST OPTIONAL
    !IT_REGIONS TYPE /AWS1/CL_LMWREGIONLIST_W=>TT_REGIONLIST OPTIONAL
    !IO_SCALINGCONFIG TYPE REF TO /AWS1/CL_LMWSCALINGCONFIG OPTIONAL
    !IO_THROTTLECONFIG TYPE REF TO /AWS1/CL_LMWTHROTTLECONFIG OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmwcrewebfuncendptrsp
  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 to create the endpoint for. You can specify the function name or the function ARN. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

iv_endpointname TYPE /AWS1/LMWENDPOINTNAME /AWS1/LMWENDPOINTNAME

The name of the endpoint to create. 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 endpoint name, it is limited to 64 characters in length.

iv_endpointtype TYPE /AWS1/LMWENDPOINTTYPE /AWS1/LMWENDPOINTTYPE

The type of endpoint to create. Determines how traffic is served and routed across Regions.

iv_authtype TYPE /AWS1/LMWAUTHTYPE /AWS1/LMWAUTHTYPE

The authorization type for the endpoint.

Optional arguments:

iv_description TYPE /AWS1/LMWDESCRIPTION /AWS1/LMWDESCRIPTION

A description of the endpoint.

iv_autodeploymentmode TYPE /AWS1/LMWAUTODEPLOYMENTMODE /AWS1/LMWAUTODEPLOYMENTMODE

The auto-deployment mode for the endpoint. Controls whether the endpoint automatically serves the newest revision. If you don't specify a value, the default is Disabled, and this default is returned in the response.

it_revisionweights TYPE /AWS1/CL_LMWREVISIONWEIGHT=>TT_REVISIONWEIGHTLIST TT_REVISIONWEIGHTLIST

A list of revision weights that determine how traffic is distributed across revisions. Up to two revisions can be specified for canary or blue-green deployments.

it_regions TYPE /AWS1/CL_LMWREGIONLIST_W=>TT_REGIONLIST TT_REGIONLIST

The list of Regions for the endpoint. Required when the endpoint type is MultiRegion or PerRegion: specify at least one Region other than the Region where you create the endpoint (the home Region). The home Region is added automatically if you don't include it; specifying only the home Region isn't allowed. When the endpoint type is HomeRegion, omit this field or specify only the home Region.

io_scalingconfig TYPE REF TO /AWS1/CL_LMWSCALINGCONFIG /AWS1/CL_LMWSCALINGCONFIG

The scaling configuration for the endpoint. There is no default value. If you don't specify a scaling configuration, it is absent from the response.

io_throttleconfig TYPE REF TO /AWS1/CL_LMWTHROTTLECONFIG /AWS1/CL_LMWTHROTTLECONFIG

The throttling configuration for the endpoint. There is no default value. If you don't specify a throttling configuration, it is absent from the response.

RETURNING

oo_output TYPE REF TO /aws1/cl_lmwcrewebfuncendptrsp /AWS1/CL_LMWCREWEBFUNCENDPTRSP

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->createwebfunctionendpoint(
  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| ) )
  )
  it_revisionweights = VALUE /aws1/cl_lmwrevisionweight=>tt_revisionweightlist(
    (
      new /aws1/cl_lmwrevisionweight(
        iv_revisionid = |string|
        iv_weight = 123
      )
    )
  )
  iv_authtype = |string|
  iv_autodeploymentmode = |string|
  iv_description = |string|
  iv_endpointname = |string|
  iv_endpointtype = |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_functionarn = lo_result->get_functionarn( ).
  lv_endpointarn = lo_result->get_endpointarn( ).
  lv_endpointname = lo_result->get_endpointname( ).
  lv_description = lo_result->get_description( ).
  lv_endpointtype = lo_result->get_endpointtype( ).
  lv_domainname = lo_result->get_domainname( ).
  lv_authtype = lo_result->get_authtype( ).
  lv_autodeploymentmode = lo_result->get_autodeploymentmode( ).
  LOOP AT lo_result->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_result->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_result->get_scalingconfig( ).
  IF lo_scalingconfig IS NOT INITIAL.
    lv_integer = lo_scalingconfig->get_maxenvironments( ).
  ENDIF.
  lo_throttleconfig = lo_result->get_throttleconfig( ).
  IF lo_throttleconfig IS NOT INITIAL.
    lv_integer = lo_throttleconfig->get_ratelimit( ).
  ENDIF.
  lv_endpointstate = lo_result->get_state( ).
  lv_string = lo_result->get_statereason( ).
  lv_endpointupdatestatus = lo_result->get_updatestatus( ).
  lv_string = lo_result->get_updatestatusreason( ).
  LOOP AT lo_result->get_regionalendpoints( ) into ls_row_4.
    lv_key = ls_row_4-key.
    lo_value = ls_row_4-value.
    IF lo_value IS NOT INITIAL.
      lv_domainname = lo_value->get_domainname( ).
      lv_authtype = lo_value->get_authtype( ).
      LOOP AT lo_value->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.
      lo_scalingconfig = lo_value->get_scalingconfig( ).
      IF lo_scalingconfig IS NOT INITIAL.
        lv_integer = lo_scalingconfig->get_maxenvironments( ).
      ENDIF.
      lo_throttleconfig = lo_value->get_throttleconfig( ).
      IF lo_throttleconfig IS NOT INITIAL.
        lv_integer = lo_throttleconfig->get_ratelimit( ).
      ENDIF.
      lv_endpointstate = lo_value->get_state( ).
      lv_string = lo_value->get_statereason( ).
      lv_endpointupdatestatus = lo_value->get_updatestatus( ).
      lv_string = lo_value->get_updatestatusreason( ).
    ENDIF.
  ENDLOOP.
  lv_datetime = lo_result->get_createdat( ).
  lv_datetime = lo_result->get_updatedat( ).
ENDIF.