Skip to content

/AWS1/IF_IN2=>LISTCONNECTORS()

About ListConnectors

Lists connectors in your account. Results are paginated. Use the nextToken parameter to retrieve the next page of results.

Method Signature

METHODS /AWS1/IF_IN2~LISTCONNECTORS
  IMPORTING
    !IV_MAXRESULTS TYPE /AWS1/IN2INTEGER OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/IN2CONNECTORNEXTTOKEN OPTIONAL
    !IO_FILTERCRITERIA TYPE REF TO /AWS1/CL_IN2CNCTRFILTERCRIT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_in2listcnctresponse
  RAISING
    /AWS1/CX_IN2ACCESSDENIEDEX
    /AWS1/CX_IN2INTERNALSERVEREX
    /AWS1/CX_IN2THROTTLINGEX
    /AWS1/CX_IN2VALIDATIONEX
    /AWS1/CX_IN2CLIENTEXC
    /AWS1/CX_IN2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_maxresults TYPE /AWS1/IN2INTEGER /AWS1/IN2INTEGER

The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the nextToken value returned from this request.

iv_nexttoken TYPE /AWS1/IN2CONNECTORNEXTTOKEN /AWS1/IN2CONNECTORNEXTTOKEN

A token to use for paginating results. Set this value to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

io_filtercriteria TYPE REF TO /AWS1/CL_IN2CNCTRFILTERCRIT /AWS1/CL_IN2CNCTRFILTERCRIT

The filter criteria to apply to the list of connectors.

RETURNING

oo_output TYPE REF TO /aws1/cl_in2listcnctresponse /AWS1/CL_IN2LISTCNCTRESPONSE

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->listconnectors(
  io_filtercriteria = new /aws1/cl_in2cnctrfiltercrit(
    it_accounts = VALUE /aws1/cl_in2stringfilter=>tt_stringfilterlist(
      (
        new /aws1/cl_in2stringfilter(
          iv_comparison = |string|
          iv_value = |string|
        )
      )
    )
    it_awsconfigconnectorarns = VALUE /aws1/cl_in2awscfgcnctrarnfilt=>tt_awsconfigcnctrarnfilterlist(
      (
        new /aws1/cl_in2awscfgcnctrarnfilt(
          iv_comparison = |string|
          iv_value = |string|
        )
      )
    )
    it_connectorarns = VALUE /aws1/cl_in2connectorarnfilter=>tt_connectorarnfilterlist(
      (
        new /aws1/cl_in2connectorarnfilter(
          iv_comparison = |string|
          iv_value = |string|
        )
      )
    )
    it_connectortype = VALUE /aws1/cl_in2cnctrtypefilter=>tt_connectortypefilterlist(
      (
        new /aws1/cl_in2cnctrtypefilter(
          iv_comparison = |string|
          iv_value = |string|
        )
      )
    )
    it_provider = VALUE /aws1/cl_in2providerfilter=>tt_providerfilterlist(
      (
        new /aws1/cl_in2providerfilter(
          iv_comparison = |string|
          iv_value = |string|
        )
      )
    )
  )
  iv_maxresults = 123
  iv_nexttoken = |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_items( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_connectorarn = lo_row_1->get_connectorarn( ).
      lv_connectorname = lo_row_1->get_name( ).
      lv_connectordescription = lo_row_1->get_description( ).
      lv_connectorcloudprovider = lo_row_1->get_provider( ).
      lv_enablementstatus = lo_row_1->get_enablementstatus( ).
      lv_string = lo_row_1->get_enablementstatusreason( ).
      lo_connectorhealth = lo_row_1->get_health( ).
      IF lo_connectorhealth IS NOT INITIAL.
        lv_connectorhealthstatus = lo_connectorhealth->get_connectorstatus( ).
        lv_timestamp = lo_connectorhealth->get_lastcheckedat( ).
        lv_string = lo_connectorhealth->get_message( ).
      ENDIF.
      lv_timestamp = lo_row_1->get_createdat( ).
      lv_timestamp = lo_row_1->get_updatedat( ).
      LOOP AT lo_row_1->get_azureregions( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_azureregion = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_awsconfigconnectorarn = lo_row_1->get_awsconfigconnectorarn( ).
      lo_azurescopeconfiguration = lo_row_1->get_scopeconfiguration( ).
      IF lo_azurescopeconfiguration IS NOT INITIAL.
        lo_scopeconfiguration = lo_azurescopeconfiguration->get_vmscanning( ).
        IF lo_scopeconfiguration IS NOT INITIAL.
          lv_scopetype = lo_scopeconfiguration->get_scopetype( ).
          LOOP AT lo_scopeconfiguration->get_scopevalues( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              lv_scopevalue = lo_row_5->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_scopestate = lo_scopeconfiguration->get_state( ).
          lv_string = lo_scopeconfiguration->get_statereason( ).
        ENDIF.
        lo_scopeconfiguration = lo_azurescopeconfiguration->get_containerimagescanning( ).
        IF lo_scopeconfiguration IS NOT INITIAL.
          lv_scopetype = lo_scopeconfiguration->get_scopetype( ).
          LOOP AT lo_scopeconfiguration->get_scopevalues( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              lv_scopevalue = lo_row_5->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_scopestate = lo_scopeconfiguration->get_state( ).
          lv_string = lo_scopeconfiguration->get_statereason( ).
        ENDIF.
        lo_scopeconfiguration = lo_azurescopeconfiguration->get_serverlessscanning( ).
        IF lo_scopeconfiguration IS NOT INITIAL.
          lv_scopetype = lo_scopeconfiguration->get_scopetype( ).
          LOOP AT lo_scopeconfiguration->get_scopevalues( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              lv_scopevalue = lo_row_5->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_scopestate = lo_scopeconfiguration->get_state( ).
          lv_string = lo_scopeconfiguration->get_statereason( ).
        ENDIF.
      ENDIF.
      LOOP AT lo_row_1->get_tags( ) into ls_row_6.
        lv_key = ls_row_6-key.
        lo_value = ls_row_6-value.
        IF lo_value IS NOT INITIAL.
          lv_connectortagvalue = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_boolean = lo_row_1->get_autoinstallvmscanner( ).
    ENDIF.
  ENDLOOP.
  lv_connectornexttoken = lo_result->get_nexttoken( ).
ENDIF.

List all Azure customer-managed connectors

List all Azure customer-managed connectors

DATA(lo_result) = lo_client->listconnectors(
  io_filtercriteria = new /aws1/cl_in2cnctrfiltercrit(
    it_connectortype = VALUE /aws1/cl_in2cnctrtypefilter=>tt_connectortypefilterlist(
      (
        new /aws1/cl_in2cnctrtypefilter(
          iv_comparison = |EQUALS|
          iv_value = |CUSTOMER_MANAGED|
        )
      )
    )
    it_provider = VALUE /aws1/cl_in2providerfilter=>tt_providerfilterlist(
      (
        new /aws1/cl_in2providerfilter(
          iv_comparison = |EQUALS|
          iv_value = |AZURE|
        )
      )
    )
  )
  iv_maxresults = 10
).