Skip to content

/AWS1/IF_SHB=>LISTCONNECTORS()

About ListConnectors

Lists the CSPM connectors and their metadata for the calling account.

Method Signature

METHODS /AWS1/IF_SHB~LISTCONNECTORS
  IMPORTING
    !IV_NEXTTOKEN TYPE /AWS1/SHBNEXTTOKEN OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/SHBMAXRESULTS OPTIONAL
    !IV_PROVIDERNAME TYPE /AWS1/SHBCSPMCNCTRPROVIDERNAME OPTIONAL
    !IV_CONNECTORSTATUS TYPE /AWS1/SHBCSPMCONNECTORSTATUS OPTIONAL
    !IV_ENABLEMENTSTATUS TYPE /AWS1/SHBCSPMENABLEMENTSTATUS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_shblistcnctresponse
  RAISING
    /AWS1/CX_SHBACCESSDENIEDEX
    /AWS1/CX_SHBCONFLICTEXCEPTION
    /AWS1/CX_SHBINTERNALSERVEREX
    /AWS1/CX_SHBINVALIDACCESSEX
    /AWS1/CX_SHBRESOURCENOTFOUNDEX
    /AWS1/CX_SHBTHROTTLINGEX
    /AWS1/CX_SHBVALIDATIONEX
    /AWS1/CX_SHBCLIENTEXC
    /AWS1/CX_SHBSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_nexttoken TYPE /AWS1/SHBNEXTTOKEN /AWS1/SHBNEXTTOKEN

The pagination token to request the next page of results.

iv_maxresults TYPE /AWS1/SHBMAXRESULTS /AWS1/SHBMAXRESULTS

The maximum number of results to return.

iv_providername TYPE /AWS1/SHBCSPMCNCTRPROVIDERNAME /AWS1/SHBCSPMCNCTRPROVIDERNAME

The name of the cloud provider to filter connectors by.

iv_connectorstatus TYPE /AWS1/SHBCSPMCONNECTORSTATUS /AWS1/SHBCSPMCONNECTORSTATUS

The connectivity status to filter connectors by.

iv_enablementstatus TYPE /AWS1/SHBCSPMENABLEMENTSTATUS /AWS1/SHBCSPMENABLEMENTSTATUS

The enablement status to filter connectors by.

RETURNING

oo_output TYPE REF TO /aws1/cl_shblistcnctresponse /AWS1/CL_SHBLISTCNCTRESPONSE

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(
  iv_connectorstatus = |string|
  iv_enablementstatus = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_providername = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_nexttoken = lo_result->get_nexttoken( ).
  LOOP AT lo_result->get_connectors( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_nonemptystring = lo_row_1->get_connectorarn( ).
      lv_nonemptystring = lo_row_1->get_connectorid( ).
      lv_nonemptystring = lo_row_1->get_name( ).
      lv_nonemptystring = lo_row_1->get_description( ).
      lo_cspmprovidersummary = lo_row_1->get_providersummary( ).
      IF lo_cspmprovidersummary IS NOT INITIAL.
        lv_cspmconnectorproviderna = lo_cspmprovidersummary->get_providername( ).
        lv_cspmconnectorstatus = lo_cspmprovidersummary->get_connectorstatus( ).
        lo_cspmproviderdetail = lo_cspmprovidersummary->get_providerconfiguration( ).
        IF lo_cspmproviderdetail IS NOT INITIAL.
          lo_azuredetail = lo_cspmproviderdetail->get_azure( ).
          IF lo_azuredetail IS NOT INITIAL.
            lv_nonemptystring = lo_azuredetail->get_awsconfigconnectorarn( ).
            lo_azurescopeconfiguration = lo_azuredetail->get_scopeconfiguration( ).
            IF lo_azurescopeconfiguration IS NOT INITIAL.
              lv_scopetype = lo_azurescopeconfiguration->get_scopetype( ).
              LOOP AT lo_azurescopeconfiguration->get_scopevalues( ) into lo_row_2.
                lo_row_3 = lo_row_2.
                IF lo_row_3 IS NOT INITIAL.
                  lv_nonemptystring = lo_row_3->get_value( ).
                ENDIF.
              ENDLOOP.
            ENDIF.
            LOOP AT lo_azuredetail->get_azureregions( ) into lo_row_4.
              lo_row_5 = lo_row_4.
              IF lo_row_5 IS NOT INITIAL.
                lv_nonemptystring = lo_row_5->get_value( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.
      lv_timestamp = lo_row_1->get_createdat( ).
      lv_nonemptystring = lo_row_1->get_createdby( ).
      lv_cspmenablementstatus = lo_row_1->get_enablementstatus( ).
    ENDIF.
  ENDLOOP.
ENDIF.

To list CSPM connectors

This operation lists the CSPM connectors for the calling account.

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