Skip to content

/AWS1/CL_MHR=>CREATEAPPLICATION()

About CreateApplication

Creates an Amazon Web Services Migration Hub Refactor Spaces application. The account that owns the environment also owns the applications created inside the environment, regardless of the account that creates the application. Refactor Spaces provisions an Amazon API Gateway, API Gateway VPC link, and Network Load Balancer for the application proxy inside your account.

In environments created with a CreateEnvironment:NetworkFabricType of NONE you need to configure VPC to VPC connectivity between your service VPC and the application proxy VPC to route traffic through the application proxy to a service with a private URL endpoint. For more information, see Create an application in the Refactor Spaces User Guide.

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/MHRAPPLICATIONNAME /AWS1/MHRAPPLICATIONNAME

The name to use for the application.

iv_environmentidentifier TYPE /AWS1/MHRENVIRONMENTID /AWS1/MHRENVIRONMENTID

The unique identifier of the environment.

iv_vpcid TYPE /AWS1/MHRVPCID /AWS1/MHRVPCID

The ID of the virtual private cloud (VPC).

iv_proxytype TYPE /AWS1/MHRPROXYTYPE /AWS1/MHRPROXYTYPE

The proxy type of the proxy created within the application.

Optional arguments:

io_apigatewayproxy TYPE REF TO /AWS1/CL_MHRAPIGWPROXYINPUT /AWS1/CL_MHRAPIGWPROXYINPUT

A wrapper object holding the API Gateway endpoint type and stage name for the proxy.

it_tags TYPE /AWS1/CL_MHRTAGMAP_W=>TT_TAGMAP TT_TAGMAP

The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.

iv_clienttoken TYPE /AWS1/MHRCLIENTTOKEN /AWS1/MHRCLIENTTOKEN

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_mhrcreapplicationrsp /AWS1/CL_MHRCREAPPLICATIONRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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->/aws1/if_mhr~createapplication(
  io_apigatewayproxy = new /aws1/cl_mhrapigwproxyinput(
    iv_endpointtype = |string|
    iv_stagename = |string|
  )
  it_tags = VALUE /aws1/cl_mhrtagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_mhrtagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_mhrtagmap_w( |string| )
      )
    )
  )
  iv_clienttoken = |string|
  iv_environmentidentifier = |string|
  iv_name = |string|
  iv_proxytype = |string|
  iv_vpcid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_applicationname = lo_result->get_name( ).
  lv_resourcearn = lo_result->get_arn( ).
  lv_accountid = lo_result->get_owneraccountid( ).
  lv_accountid = lo_result->get_createdbyaccountid( ).
  lv_applicationid = lo_result->get_applicationid( ).
  lv_environmentid = lo_result->get_environmentid( ).
  lv_vpcid = lo_result->get_vpcid( ).
  lv_proxytype = lo_result->get_proxytype( ).
  lo_apigatewayproxyinput = lo_result->get_apigatewayproxy( ).
  IF lo_apigatewayproxyinput IS NOT INITIAL.
    lv_apigatewayendpointtype = lo_apigatewayproxyinput->get_endpointtype( ).
    lv_stagename = lo_apigatewayproxyinput->get_stagename( ).
  ENDIF.
  lv_applicationstate = lo_result->get_state( ).
  LOOP AT lo_result->get_tags( ) into ls_row.
    lv_key = ls_row-key.
    lo_value = ls_row-value.
    IF lo_value IS NOT INITIAL.
      lv_string = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_timestamp = lo_result->get_lastupdatedtime( ).
  lv_timestamp = lo_result->get_createdtime( ).
ENDIF.