Skip to content

/AWS1/IF_OUT=>CREATEPRIVATECNNCTVYCONFIG()

About CreatePrivateConnectivityConfig

Creates the private connectivity configuration for the specified Outpost. Private connectivity establishes a service link VPN connection between the Outpost and its home Amazon Web Services Region using a VPC and subnet that you specify, which allows the service link traffic to flow through your VPC and minimizes public internet exposure.

Method Signature

METHODS /AWS1/IF_OUT~CREATEPRIVATECNNCTVYCONFIG
  IMPORTING
    !IV_OUTPOSTID TYPE /AWS1/OUTOUTPOSTID OPTIONAL
    !IT_VPCINFORMATIONLIST TYPE /AWS1/CL_OUTVPCINFORMATION=>TT_VPCINFORMATIONLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_outcreatepvtcvycfgout
  RAISING
    /AWS1/CX_OUTACCESSDENIEDEX
    /AWS1/CX_OUTCONFLICTEXCEPTION
    /AWS1/CX_OUTINTERNALSERVEREX
    /AWS1/CX_OUTNOTFOUNDEXCEPTION
    /AWS1/CX_OUTVALIDATIONEX
    /AWS1/CX_OUTCLIENTEXC
    /AWS1/CX_OUTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_outpostid TYPE /AWS1/OUTOUTPOSTID /AWS1/OUTOUTPOSTID

The ID or ARN of the Outpost.

it_vpcinformationlist TYPE /AWS1/CL_OUTVPCINFORMATION=>TT_VPCINFORMATIONLIST TT_VPCINFORMATIONLIST

Information about the VPC used for private connectivity, including the VPC, its subnets, and an associated VPC endpoint. You can specify at most one entry.

RETURNING

oo_output TYPE REF TO /aws1/cl_outcreatepvtcvycfgout /AWS1/CL_OUTCREATEPVTCVYCFGOUT

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->createprivatecnnctvyconfig(
  it_vpcinformationlist = VALUE /aws1/cl_outvpcinformation=>tt_vpcinformationlist(
    (
      new /aws1/cl_outvpcinformation(
        it_subnetids = VALUE /aws1/cl_outsubnetids_w=>tt_subnetids(
          ( new /aws1/cl_outsubnetids_w( |string| ) )
        )
        iv_vpcendpointid = |string|
        iv_vpcid = |string|
      )
    )
  )
  iv_outpostid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_privateconnectivityconf = lo_result->get_privatecnnctvyconfig( ).
  IF lo_privateconnectivityconf IS NOT INITIAL.
    lv_rolearn = lo_privateconnectivityconf->get_rolearn( ).
    lv_privateconnectivitystat = lo_privateconnectivityconf->get_privatecnnctvystatus( ).
    LOOP AT lo_privateconnectivityconf->get_vpcinformationlist( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_vpcid = lo_row_1->get_vpcid( ).
        LOOP AT lo_row_1->get_subnetids( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_subnetid = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
        lv_vpcendpointid = lo_row_1->get_vpcendpointid( ).
      ENDIF.
    ENDLOOP.
    lv_rolearn = lo_privateconnectivityconf->get_provisioningrolearn( ).
  ENDIF.
  lv_outpostid = lo_result->get_outpostid( ).
ENDIF.