Skip to content

/AWS1/IF_MGN=>GETNETWORKMIGRATIONDEFN()

About GetNetworkMigrationDefinition

Retrieves the details of a network migration definition including source and target configurations.

Method Signature

METHODS /AWS1/IF_MGN~GETNETWORKMIGRATIONDEFN
  IMPORTING
    !IV_NETWORKMIGRATIONDEFNID TYPE /AWS1/MGNNETWORKMIGRDEFNID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mgnnetworkmigrdefn
  RAISING
    /AWS1/CX_MGNACCESSDENIEDEX
    /AWS1/CX_MGNRESOURCENOTFOUNDEX
    /AWS1/CX_MGNCLIENTEXC
    /AWS1/CX_MGNSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_networkmigrationdefnid TYPE /AWS1/MGNNETWORKMIGRDEFNID /AWS1/MGNNETWORKMIGRDEFNID

The unique identifier of the network migration definition to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_mgnnetworkmigrdefn /AWS1/CL_MGNNETWORKMIGRDEFN

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

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_arn( ).
  lv_networkmigrationdefinit = lo_result->get_networkmigrationdefnid( ).
  lv_networkmigrationdefinit_1 = lo_result->get_name( ).
  lv_networkmigrationdefinit_2 = lo_result->get_description( ).
  LOOP AT lo_result->get_sourceconfigurations( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_sourceenvironment = lo_row_1->get_sourceenvironment( ).
      lo_sources3configuration = lo_row_1->get_sources3configuration( ).
      IF lo_sources3configuration IS NOT INITIAL.
        lv_s3bucketname = lo_sources3configuration->get_s3bucket( ).
        lv_accountid = lo_sources3configuration->get_s3bucketowner( ).
        lv_s3keyname = lo_sources3configuration->get_s3key( ).
      ENDIF.
    ENDIF.
  ENDLOOP.
  lo_targets3configuration = lo_result->get_targets3configuration( ).
  IF lo_targets3configuration IS NOT INITIAL.
    lv_s3bucketname = lo_targets3configuration->get_s3bucket( ).
    lv_accountid = lo_targets3configuration->get_s3bucketowner( ).
  ENDIF.
  lo_targetnetwork = lo_result->get_targetnetwork( ).
  IF lo_targetnetwork IS NOT INITIAL.
    lv_targetnetworktopology = lo_targetnetwork->get_topology( ).
    lv_cidr = lo_targetnetwork->get_inboundcidr( ).
    lv_cidr = lo_targetnetwork->get_outboundcidr( ).
    lv_cidr = lo_targetnetwork->get_inspectioncidr( ).
  ENDIF.
  lv_targetdeployment = lo_result->get_targetdeployment( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
  LOOP AT lo_result->get_tags( ) into ls_row_2.
    lv_key = ls_row_2-key.
    lo_value = ls_row_2-value.
    IF lo_value IS NOT INITIAL.
      lv_tagvalue = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_scopetags( ) into ls_row_3.
    lv_key_1 = ls_row_3-key.
    lo_value_1 = ls_row_3-value.
    IF lo_value_1 IS NOT INITIAL.
      lv_scopetagvalue = lo_value_1->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Sample GetNetworkMigrationDefinition call

Sample GetNetworkMigrationDefinition call

DATA(lo_result) = lo_client->getnetworkmigrationdefn( |nmd-01234567891234567| ).