Skip to content

/AWS1/IF_MCI=>LISTCONNECTIONS()

About ListConnections

Lists all connection objects to which the caller has access.

Allows for optional filtering by the following properties:

  • state

  • environmentId

  • provider

  • attach point

Only Connection objects matching all filters will be returned.

Method Signature

METHODS /AWS1/IF_MCI~LISTCONNECTIONS
  IMPORTING
    !IV_MAXRESULTS TYPE /AWS1/MCIMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/MCINEXTTOKEN OPTIONAL
    !IV_STATE TYPE /AWS1/MCICONNECTIONSTATE OPTIONAL
    !IV_ENVIRONMENTID TYPE /AWS1/MCIENVIRONMENTID OPTIONAL
    !IO_PROVIDER TYPE REF TO /AWS1/CL_MCIPROVIDER OPTIONAL
    !IO_ATTACHPOINT TYPE REF TO /AWS1/CL_MCIATTACHPOINT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mcilistconnsresponse
  RAISING
    /AWS1/CX_MCIACCESSDENIEDEX
    /AWS1/CX_MCIINTERCNCTCLIENTEX
    /AWS1/CX_MCIINTERCNCTSERVEREX
    /AWS1/CX_MCIINTERCNCTVLDTNEX
    /AWS1/CX_MCIRESOURCENOTFOUNDEX
    /AWS1/CX_MCISERVICEQUOTAEXCDEX
    /AWS1/CX_MCITHROTTLINGEX
    /AWS1/CX_MCICLIENTEXC
    /AWS1/CX_MCISERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_maxresults TYPE /AWS1/MCIMAXRESULTS /AWS1/MCIMAXRESULTS

The max number of list results in a single paginated response.

iv_nexttoken TYPE /AWS1/MCINEXTTOKEN /AWS1/MCINEXTTOKEN

A pagination token from a previous paginated response indicating you wish to get the next page of results.

iv_state TYPE /AWS1/MCICONNECTIONSTATE /AWS1/MCICONNECTIONSTATE

Filter the results to only include Connection objects in the given Connection$state.

iv_environmentid TYPE /AWS1/MCIENVIRONMENTID /AWS1/MCIENVIRONMENTID

Filter the results to only include Connection objects on the given Environment.

io_provider TYPE REF TO /AWS1/CL_MCIPROVIDER /AWS1/CL_MCIPROVIDER

Filter the results to only include Connection objects to the given Provider.

io_attachpoint TYPE REF TO /AWS1/CL_MCIATTACHPOINT /AWS1/CL_MCIATTACHPOINT

Filter results to only include Connection objects attached to the given AttachPoint.

RETURNING

oo_output TYPE REF TO /aws1/cl_mcilistconnsresponse /AWS1/CL_MCILISTCONNSRESPONSE

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->listconnections(
  io_attachpoint = new /aws1/cl_mciattachpoint(
    iv_arn = |string|
    iv_directconnectgateway = |string|
  )
  io_provider = new /aws1/cl_mciprovider(
    iv_cloudserviceprovider = |string|
    iv_lastmileprovider = |string|
  )
  iv_environmentid = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_state = |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_connections( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_connectionid = lo_row_1->get_id( ).
      lv_amazonresourcename = lo_row_1->get_arn( ).
      lv_connectiondescription = lo_row_1->get_description( ).
      lv_connectionbandwidth = lo_row_1->get_bandwidth( ).
      lo_attachpoint = lo_row_1->get_attachpoint( ).
      IF lo_attachpoint IS NOT INITIAL.
        lv_directconnectgatewayatt = lo_attachpoint->get_directconnectgateway( ).
        lv_amazonresourcename = lo_attachpoint->get_arn( ).
      ENDIF.
      lv_environmentid = lo_row_1->get_environmentid( ).
      lo_provider = lo_row_1->get_provider( ).
      IF lo_provider IS NOT INITIAL.
        lv_cloudserviceprovider = lo_provider->get_cloudserviceprovider( ).
        lv_lastmileprovider = lo_provider->get_lastmileprovider( ).
      ENDIF.
      lv_location = lo_row_1->get_location( ).
      lv_producttype = lo_row_1->get_type( ).
      lv_connectionstate = lo_row_1->get_state( ).
      lv_connectionsharedid = lo_row_1->get_sharedid( ).
      lv_billingtier = lo_row_1->get_billingtier( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.

List All Connections

List All Connections

DATA(lo_result) = lo_client->listconnections( ).

List Connections in available state

List Connections in available state

DATA(lo_result) = lo_client->listconnections( iv_state = |available| ) .

List Connections on specific Environment

List Connections on specific Environment

DATA(lo_result) = lo_client->listconnections( iv_environmentid = |mce-aws-acme-1| ) .