Skip to content

/AWS1/IF_REV=>GETSERVICE()

About GetService

Retrieves a service by ARN.

Method Signature

METHODS /AWS1/IF_REV~GETSERVICE
  IMPORTING
    !IV_SERVICEARN TYPE /AWS1/REVARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_revgetserviceresponse
  RAISING
    /AWS1/CX_REVACCESSDENIEDEX
    /AWS1/CX_REVINTERNALSERVEREX
    /AWS1/CX_REVRESOURCENOTFOUNDEX
    /AWS1/CX_REVVLDTNEXCEPTION
    /AWS1/CX_REVCLIENTEXC
    /AWS1/CX_REVSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_servicearn TYPE /AWS1/REVARN /AWS1/REVARN

ARN identifier.

RETURNING

oo_output TYPE REF TO /aws1/cl_revgetserviceresponse /AWS1/CL_REVGETSERVICERESPONSE

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

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_service = lo_result->get_service( ).
  IF lo_service IS NOT INITIAL.
    lv_arn = lo_service->get_servicearn( ).
    lv_entityname = lo_service->get_name( ).
    lv_longdescription = lo_service->get_description( ).
    LOOP AT lo_service->get_associatedsystems( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_arn = lo_row_1->get_systemarn( ).
        lv_entityname = lo_row_1->get_systemname( ).
        LOOP AT lo_row_1->get_userjourneyids( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_userjourneyid = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
    lv_arn = lo_service->get_policyarn( ).
    LOOP AT lo_service->get_regions( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_awsregion = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    lo_permissionmodel = lo_service->get_permissionmodel( ).
    IF lo_permissionmodel IS NOT INITIAL.
      lv_iamrolename = lo_permissionmodel->get_invokerrolename( ).
      LOOP AT lo_permissionmodel->get_crossaccountroles( ) into lo_row_6.
        lo_row_7 = lo_row_6.
        IF lo_row_7 IS NOT INITIAL.
          lv_iamrolearn = lo_row_7->get_crossaccountrolearn( ).
          lv_string = lo_row_7->get_externalid( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lo_dependencydiscoveryconf = lo_service->get_dependencydiscovery( ).
    IF lo_dependencydiscoveryconf IS NOT INITIAL.
      lv_dependencydiscoverystat = lo_dependencydiscoveryconf->get_status( ).
      lv_timestamp = lo_dependencydiscoveryconf->get_updatedat( ).
    ENDIF.
    lo_effectivepolicyvalues = lo_service->get_effectivepolicyvalues( ).
    IF lo_effectivepolicyvalues IS NOT INITIAL.
      lo_slosource = lo_effectivepolicyvalues->get_availabilityslo( ).
      IF lo_slosource IS NOT INITIAL.
        lv_double = lo_slosource->get_value( ).
        lv_entityname = lo_slosource->get_policyname( ).
        lv_policyvaluesource = lo_slosource->get_source( ).
      ENDIF.
      lo_targetsource = lo_effectivepolicyvalues->get_multiazrto( ).
      IF lo_targetsource IS NOT INITIAL.
        lv_integer = lo_targetsource->get_value( ).
        lv_entityname = lo_targetsource->get_policyname( ).
        lv_policyvaluesource = lo_targetsource->get_source( ).
      ENDIF.
      lo_targetsource = lo_effectivepolicyvalues->get_multiazrpo( ).
      IF lo_targetsource IS NOT INITIAL.
        lv_integer = lo_targetsource->get_value( ).
        lv_entityname = lo_targetsource->get_policyname( ).
        lv_policyvaluesource = lo_targetsource->get_source( ).
      ENDIF.
      lo_disasterrecoverysource = lo_effectivepolicyvalues->get_multiazdrapproach( ).
      IF lo_disasterrecoverysource IS NOT INITIAL.
        lv_string = lo_disasterrecoverysource->get_value( ).
        lv_entityname = lo_disasterrecoverysource->get_policyname( ).
        lv_policyvaluesource = lo_disasterrecoverysource->get_source( ).
      ENDIF.
      lo_targetsource = lo_effectivepolicyvalues->get_multiregionrto( ).
      IF lo_targetsource IS NOT INITIAL.
        lv_integer = lo_targetsource->get_value( ).
        lv_entityname = lo_targetsource->get_policyname( ).
        lv_policyvaluesource = lo_targetsource->get_source( ).
      ENDIF.
      lo_targetsource = lo_effectivepolicyvalues->get_multiregionrpo( ).
      IF lo_targetsource IS NOT INITIAL.
        lv_integer = lo_targetsource->get_value( ).
        lv_entityname = lo_targetsource->get_policyname( ).
        lv_policyvaluesource = lo_targetsource->get_source( ).
      ENDIF.
      lo_disasterrecoverysource = lo_effectivepolicyvalues->get_multiregiondrapproach( ).
      IF lo_disasterrecoverysource IS NOT INITIAL.
        lv_string = lo_disasterrecoverysource->get_value( ).
        lv_entityname = lo_disasterrecoverysource->get_policyname( ).
        lv_policyvaluesource = lo_disasterrecoverysource->get_source( ).
      ENDIF.
      lo_targetsource = lo_effectivepolicyvalues->get_datarectimebetweenbkups( ).
      IF lo_targetsource IS NOT INITIAL.
        lv_integer = lo_targetsource->get_value( ).
        lv_entityname = lo_targetsource->get_policyname( ).
        lv_policyvaluesource = lo_targetsource->get_source( ).
      ENDIF.
    ENDIF.
    lo_achievability = lo_service->get_achievability( ).
    IF lo_achievability IS NOT INITIAL.
      lv_achievabilitystatus = lo_achievability->get_availabilityslo( ).
      lv_achievabilitystatus = lo_achievability->get_multiazrtorpo( ).
      lv_achievabilitystatus = lo_achievability->get_multiregionrtorpo( ).
    ENDIF.
    lo_servicereportconfigurat = lo_service->get_reportconfiguration( ).
    IF lo_servicereportconfigurat IS NOT INITIAL.
      LOOP AT lo_servicereportconfigurat->get_reportoutputs( ) into lo_row_8.
        lo_row_9 = lo_row_8.
        IF lo_row_9 IS NOT INITIAL.
          lo_s3reportoutputconfigura = lo_row_9->get_s3( ).
          IF lo_s3reportoutputconfigura IS NOT INITIAL.
            lv_s3bucketpath = lo_s3reportoutputconfigura->get_bucketpath( ).
            lv_awsaccountid = lo_s3reportoutputconfigura->get_bucketowner( ).
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_kmskeyid = lo_service->get_kmskeyid( ).
    LOOP AT lo_service->get_tags( ) into ls_row_10.
      lv_key = ls_row_10-key.
      lo_value = ls_row_10-value.
      IF lo_value IS NOT INITIAL.
        lv_tagvalue = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
    lo_assessmentcost = lo_service->get_estimatedassessmentcost( ).
    IF lo_assessmentcost IS NOT INITIAL.
      lv_double = lo_assessmentcost->get_amount( ).
      lv_costcurrency = lo_assessmentcost->get_currency( ).
    ENDIF.
    lo_resourcediscoverystatus = lo_service->get_resourcediscovery( ).
    IF lo_resourcediscoverystatus IS NOT INITIAL.
      lv_resourcediscoveryrunsta = lo_resourcediscoverystatus->get_status( ).
      lv_timestamp = lo_resourcediscoverystatus->get_lastrunat( ).
      lv_resourcediscoveryerrorc = lo_resourcediscoverystatus->get_errorcode( ).
      lv_string = lo_resourcediscoverystatus->get_errormessage( ).
    ENDIF.
    lv_assessmentstatus = lo_service->get_assessmentstatus( ).
    lv_boolean = lo_service->get_rerunassessment( ).
    lv_integer = lo_service->get_openfindingscount( ).
    lv_integer = lo_service->get_resolvedfindingscount( ).
    lv_organizationid = lo_service->get_organizationid( ).
    lv_ouid = lo_service->get_ouid( ).
    lv_accountid = lo_service->get_accountid( ).
    lv_timestamp = lo_service->get_createdat( ).
    lv_timestamp = lo_service->get_updatedat( ).
  ENDIF.
ENDIF.