Skip to content

/AWS1/IF_WKR=>LISTNETWORKS()

About ListNetworks

Retrieves a paginated list of all Wickr networks associated with your Amazon Web Services account. You can sort the results by network ID or name.

Method Signature

METHODS /AWS1/IF_WKR~LISTNETWORKS
  IMPORTING
    !IV_MAXRESULTS TYPE /AWS1/WKRINTEGER OPTIONAL
    !IV_SORTFIELDS TYPE /AWS1/WKRGENERICSTRING OPTIONAL
    !IV_SORTDIRECTION TYPE /AWS1/WKRSORTDIRECTION OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/WKRGENERICSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrlistnetworksrsp
  RAISING
    /AWS1/CX_WKRBADREQUESTERROR
    /AWS1/CX_WKRFORBIDDENERROR
    /AWS1/CX_WKRINTSERVERERROR
    /AWS1/CX_WKRRATELIMITERROR
    /AWS1/CX_WKRUNAUTHORIZEDERROR
    /AWS1/CX_WKRVALIDATIONERROR
    /AWS1/CX_WKRCLIENTEXC
    /AWS1/CX_WKRSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_maxresults TYPE /AWS1/WKRINTEGER /AWS1/WKRINTEGER

The maximum number of networks to return in a single page. Valid range is 1-100. Default is 10.

iv_sortfields TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING

The field to sort networks by. Accepted values are 'networkId' and 'networkName'. Default is 'networkId'.

iv_sortdirection TYPE /AWS1/WKRSORTDIRECTION /AWS1/WKRSORTDIRECTION

The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.

iv_nexttoken TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING

The token for retrieving the next page of results. This is returned from a previous request when there are more results available.

RETURNING

oo_output TYPE REF TO /aws1/cl_wkrlistnetworksrsp /AWS1/CL_WKRLISTNETWORKSRSP

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->listnetworks(
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_sortdirection = |string|
  iv_sortfields = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_networks( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_networkid = lo_row_1->get_networkid( ).
      lv_genericstring = lo_row_1->get_networkname( ).
      lv_accesslevel = lo_row_1->get_accesslevel( ).
      lv_genericstring = lo_row_1->get_awsaccountid( ).
      lv_genericstring = lo_row_1->get_networkarn( ).
      lv_integer = lo_row_1->get_standing( ).
      lv_genericstring = lo_row_1->get_freetrialexpiration( ).
      lv_integer = lo_row_1->get_migrationstate( ).
      lv_genericstring = lo_row_1->get_encryptionkeyarn( ).
    ENDIF.
  ENDLOOP.
  lv_genericstring = lo_result->get_nexttoken( ).
ENDIF.

List networks with pagination

List networks with pagination

DATA(lo_result) = lo_client->listnetworks(
  iv_maxresults = 10
  iv_sortdirection = |ASC|
  iv_sortfields = |networkName|
).

List networks - first page

List networks - first page

DATA(lo_result) = lo_client->listnetworks( iv_maxresults = 10 ) .