Skip to content

/AWS1/CL_FNT=>LISTFUNCTIONS()

About ListFunctions

Gets a list of all CloudFront functions in your Amazon Web Services account.

You can optionally apply a filter to return only the functions that are in the specified stage, either DEVELOPMENT or LIVE.

You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.

Method Signature

IMPORTING

Optional arguments:

iv_marker TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING

Use this field when paginating results to indicate where to begin in your list of functions. The response includes functions in the list that occur after the marker. To get the next page of the list, set this field's value to the value of NextMarker from the current page's response.

iv_maxitems TYPE /AWS1/FNTINTEGER /AWS1/FNTINTEGER

The maximum number of functions that you want in the response.

iv_stage TYPE /AWS1/FNTFUNCTIONSTAGE /AWS1/FNTFUNCTIONSTAGE

An optional filter to return only the functions that are in the specified stage, either DEVELOPMENT or LIVE.

RETURNING

oo_output TYPE REF TO /aws1/cl_fntlistfuncsresult /AWS1/CL_FNTLISTFUNCSRESULT

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->/aws1/if_fnt~listfunctions(
  iv_marker = |string|
  iv_maxitems = 123
  iv_stage = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_functionlist = lo_result->get_functionlist( ).
  IF lo_functionlist IS NOT INITIAL.
    lv_string = lo_functionlist->get_nextmarker( ).
    lv_integer = lo_functionlist->get_maxitems( ).
    lv_integer = lo_functionlist->get_quantity( ).
    LOOP AT lo_functionlist->get_items( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_functionname = lo_row_1->get_name( ).
        lv_string = lo_row_1->get_status( ).
        lo_functionconfig = lo_row_1->get_functionconfig( ).
        IF lo_functionconfig IS NOT INITIAL.
          lv_string = lo_functionconfig->get_comment( ).
          lv_functionruntime = lo_functionconfig->get_runtime( ).
          lo_keyvaluestoreassociatio = lo_functionconfig->get_keyvalstoreassociations( ).
          IF lo_keyvaluestoreassociatio IS NOT INITIAL.
            lv_integer = lo_keyvaluestoreassociatio->get_quantity( ).
            LOOP AT lo_keyvaluestoreassociatio->get_items( ) into lo_row_2.
              lo_row_3 = lo_row_2.
              IF lo_row_3 IS NOT INITIAL.
                lv_keyvaluestorearn = lo_row_3->get_keyvaluestorearn( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
        lo_functionmetadata = lo_row_1->get_functionmetadata( ).
        IF lo_functionmetadata IS NOT INITIAL.
          lv_string = lo_functionmetadata->get_functionarn( ).
          lv_functionstage = lo_functionmetadata->get_stage( ).
          lv_timestamp = lo_functionmetadata->get_createdtime( ).
          lv_timestamp = lo_functionmetadata->get_lastmodifiedtime( ).
        ENDIF.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.