Skip to content

/AWS1/IF_MCI=>CREATECONNECTION()

About CreateConnection

Initiates the process to create a Connection across the specified Environment.

The Environment dictates the specified partner and location to which the other end of the connection should attach. You can see a list of the available Environments by calling ListEnvironments

The Attach Point specifies where within the AWS Network your connection will logically connect.

After a successful call to this method, the resulting Connection will return an Activation Key which will need to be brought to the specific partner's portal to confirm the Connection on both sides. (See Environment$activationPageUrl for a direct link to the partner portal).

Method Signature

METHODS /AWS1/IF_MCI~CREATECONNECTION
  IMPORTING
    !IV_DESCRIPTION TYPE /AWS1/MCICONNECTIONDESCRIPTION OPTIONAL
    !IV_BANDWIDTH TYPE /AWS1/MCICONNECTIONBANDWIDTH OPTIONAL
    !IO_ATTACHPOINT TYPE REF TO /AWS1/CL_MCIATTACHPOINT OPTIONAL
    !IV_ENVIRONMENTID TYPE /AWS1/MCIENVIRONMENTID OPTIONAL
    !IO_REMOTEACCOUNT TYPE REF TO /AWS1/CL_MCIREMOTEACCOUNTID OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_MCITAGMAP_W=>TT_TAGMAP OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/MCISTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mcicreateconnresponse
  RAISING
    /AWS1/CX_MCIACCESSDENIEDEX
    /AWS1/CX_MCIINTERCNCTCLIENTEX
    /AWS1/CX_MCIINTERCNCTSERVEREX
    /AWS1/CX_MCIINTERCNCTVLDTNEX
    /AWS1/CX_MCIRESOURCENOTFOUNDEX
    /AWS1/CX_MCISERVICEQUOTAEXCDEX
    /AWS1/CX_MCITHROTTLINGEX
    /AWS1/CX_MCICLIENTEXC
    /AWS1/CX_MCISERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_bandwidth TYPE /AWS1/MCICONNECTIONBANDWIDTH /AWS1/MCICONNECTIONBANDWIDTH

The desired bandwidth of the requested Connection

io_attachpoint TYPE REF TO /AWS1/CL_MCIATTACHPOINT /AWS1/CL_MCIATTACHPOINT

The Attach Point to which the connection should be associated."

iv_environmentid TYPE /AWS1/MCIENVIRONMENTID /AWS1/MCIENVIRONMENTID

The identifier of the Environment across which this Connection should be created.

The available Environment objects can be determined using ListEnvironments.

Optional arguments:

iv_description TYPE /AWS1/MCICONNECTIONDESCRIPTION /AWS1/MCICONNECTIONDESCRIPTION

A description to distinguish this Connection.

io_remoteaccount TYPE REF TO /AWS1/CL_MCIREMOTEACCOUNTID /AWS1/CL_MCIREMOTEACCOUNTID

Account and/or principal identifying information that can be verified by the partner of this specific Environment.

it_tags TYPE /AWS1/CL_MCITAGMAP_W=>TT_TAGMAP TT_TAGMAP

The tag to associate with the resulting Connection.

iv_clienttoken TYPE /AWS1/MCISTRING /AWS1/MCISTRING

Idempotency token used for the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_mcicreateconnresponse /AWS1/CL_MCICREATECONNRESPONSE

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->createconnection(
  io_attachpoint = new /aws1/cl_mciattachpoint(
    iv_arn = |string|
    iv_directconnectgateway = |string|
  )
  io_remoteaccount = new /aws1/cl_mciremoteaccountid( |string| )
  it_tags = VALUE /aws1/cl_mcitagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_mcitagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_mcitagmap_w( |string| )
      )
    )
  )
  iv_bandwidth = |string|
  iv_clienttoken = |string|
  iv_description = |string|
  iv_environmentid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_connection = lo_result->get_connection( ).
  IF lo_connection IS NOT INITIAL.
    lv_connectionid = lo_connection->get_id( ).
    lv_amazonresourcename = lo_connection->get_arn( ).
    lv_connectiondescription = lo_connection->get_description( ).
    lv_connectionbandwidth = lo_connection->get_bandwidth( ).
    lo_attachpoint = lo_connection->get_attachpoint( ).
    IF lo_attachpoint IS NOT INITIAL.
      lv_directconnectgatewayatt = lo_attachpoint->get_directconnectgateway( ).
      lv_amazonresourcename = lo_attachpoint->get_arn( ).
    ENDIF.
    lv_environmentid = lo_connection->get_environmentid( ).
    lo_provider = lo_connection->get_provider( ).
    IF lo_provider IS NOT INITIAL.
      lv_cloudserviceprovider = lo_provider->get_cloudserviceprovider( ).
      lv_lastmileprovider = lo_provider->get_lastmileprovider( ).
    ENDIF.
    lv_location = lo_connection->get_location( ).
    lv_producttype = lo_connection->get_type( ).
    lv_connectionstate = lo_connection->get_state( ).
    lv_connectionsharedid = lo_connection->get_sharedid( ).
    lv_billingtier = lo_connection->get_billingtier( ).
    lv_owneraccountid = lo_connection->get_owneraccount( ).
    lv_activationkey = lo_connection->get_activationkey( ).
    LOOP AT lo_connection->get_tags( ) into ls_row.
      lv_key = ls_row-key.
      lo_value = ls_row-value.
      IF lo_value IS NOT INITIAL.
        lv_tagvalue = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.

Create Connection on specific environment

Create Connection on specific environment

DATA(lo_result) = lo_client->createconnection(
  io_attachpoint = new /aws1/cl_mciattachpoint( iv_directconnectgateway = |90392BE3-219C-47FD-BBA5-03DF76D2542A| )
  io_remoteaccount = new /aws1/cl_mciremoteaccountid( |PartnerAccountDetails| )
  iv_bandwidth = |1Gbps|
  iv_environmentid = |mce-aws-acme-1|
).