Skip to content

/AWS1/IF_SSM=>GETCLOUDCONNECTOR()

About GetCloudConnector

Returns detailed information about a cloud connector.

Method Signature

METHODS /AWS1/IF_SSM~GETCLOUDCONNECTOR
  IMPORTING
    !IV_CLOUDCONNECTORID TYPE /AWS1/SSMCLOUDCONNECTORID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ssmgetcloudcnctrrslt
  RAISING
    /AWS1/CX_SSMINTERNALSERVERERR
    /AWS1/CX_SSMRESOURCENOTFOUNDEX
    /AWS1/CX_SSMCLIENTEXC
    /AWS1/CX_SSMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_cloudconnectorid TYPE /AWS1/SSMCLOUDCONNECTORID /AWS1/SSMCLOUDCONNECTORID

The ID of the cloud connector to retrieve information about.

RETURNING

oo_output TYPE REF TO /aws1/cl_ssmgetcloudcnctrrslt /AWS1/CL_SSMGETCLOUDCNCTRRSLT

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->getcloudconnector( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_cloudconnectorarn = lo_result->get_cloudconnectorarn( ).
  lv_displayname = lo_result->get_displayname( ).
  lv_cloudconnectordescripti = lo_result->get_description( ).
  lv_cloudconnectoriamrolear = lo_result->get_rolearn( ).
  lo_cloudconnectorconfigura = lo_result->get_configuration( ).
  IF lo_cloudconnectorconfigura IS NOT INITIAL.
    lo_azureconfiguration = lo_cloudconnectorconfigura->get_azureconfiguration( ).
    IF lo_azureconfiguration IS NOT INITIAL.
      lv_azuretenantid = lo_azureconfiguration->get_tenantid( ).
      lv_azuretenantdisplayname = lo_azureconfiguration->get_tenantdisplayname( ).
      lv_azureapplicationid = lo_azureconfiguration->get_applicationid( ).
      lv_azureapplicationdisplay = lo_azureconfiguration->get_applicationdisplayname( ).
      lo_configurationtargets = lo_azureconfiguration->get_targets( ).
      IF lo_configurationtargets IS NOT INITIAL.
        LOOP AT lo_configurationtargets->get_subscriptions( ) into lo_row.
          lo_row_1 = lo_row.
          IF lo_row_1 IS NOT INITIAL.
            lv_azuresubscriptionid = lo_row_1->get_id( ).
            lv_azuresubscriptiondispla = lo_row_1->get_displayname( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
  ENDIF.
  lv_configconnectorarn = lo_result->get_configconnectorarn( ).
  lv_datetime = lo_result->get_createdat( ).
  lv_datetime = lo_result->get_updatedat( ).
ENDIF.