/AWS1/IF_REV=>IMPORTAPP()¶
About ImportApp¶
Imports a V1 app into the V2 resource model, creating a service with the same name.
Method Signature¶
METHODS /AWS1/IF_REV~IMPORTAPP
IMPORTING
!IV_V1APPARN TYPE /AWS1/REVARN OPTIONAL
!IV_POLICYARN TYPE /AWS1/REVARN OPTIONAL
!IV_KMSKEYID TYPE /AWS1/REVKMSKEYID OPTIONAL
!IV_SKIPMANUALLYADDEDRES TYPE /AWS1/REVBOOLEAN OPTIONAL
!IT_ASSOCIATEDSYSTEMS TYPE /AWS1/CL_REVASSOCIATEDSYSTEM=>TT_ASSOCIATEDSYSTEMLIST OPTIONAL
!IT_TAGS TYPE /AWS1/CL_REVTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/REVCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_revimportappresponse
RAISING
/AWS1/CX_REVACCESSDENIEDEX
/AWS1/CX_REVCONFLICTEXCEPTION
/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_v1apparn TYPE /AWS1/REVARN /AWS1/REVARN¶
ARN identifier.
Optional arguments:¶
iv_policyarn TYPE /AWS1/REVARN /AWS1/REVARN¶
ARN identifier.
iv_kmskeyid TYPE /AWS1/REVKMSKEYID /AWS1/REVKMSKEYID¶
KMS key identifier — accepts key ID, key ARN, alias name, or alias ARN.
iv_skipmanuallyaddedres TYPE /AWS1/REVBOOLEAN /AWS1/REVBOOLEAN¶
Whether to skip manually added resources during import.
it_associatedsystems TYPE /AWS1/CL_REVASSOCIATEDSYSTEM=>TT_ASSOCIATEDSYSTEMLIST TT_ASSOCIATEDSYSTEMLIST¶
The systems to associate with the imported service.
it_tags TYPE /AWS1/CL_REVTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
Resource tags.
iv_clienttoken TYPE /AWS1/REVCLIENTTOKEN /AWS1/REVCLIENTTOKEN¶
Idempotency token.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_revimportappresponse /AWS1/CL_REVIMPORTAPPRESPONSE¶
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->importapp(
it_associatedsystems = VALUE /aws1/cl_revassociatedsystem=>tt_associatedsystemlist(
(
new /aws1/cl_revassociatedsystem(
it_userjourneyids = VALUE /aws1/cl_revuserjrnyidlist_w=>tt_userjourneyidlist(
( new /aws1/cl_revuserjrnyidlist_w( |string| ) )
)
iv_systemarn = |string|
iv_systemname = |string|
)
)
)
it_tags = VALUE /aws1/cl_revtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_revtagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_revtagmap_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_kmskeyid = |string|
iv_policyarn = |string|
iv_skipmanuallyaddedres = ABAP_TRUE
iv_v1apparn = |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.