/AWS1/IF_LMC=>CREATENETWORKCONNECTOR()¶
About CreateNetworkConnector¶
Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC. The network connector provisions elastic network interfaces (ENIs) in the subnets you specify, providing a managed network path to private resources such as databases, caches, and internal APIs.
This operation is asynchronous. The network connector starts in PENDING state while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). Use GetNetworkConnector to poll the connector state until it reaches ACTIVE. Once active, you can attach the connector to Lambda MicroVMs at run time using the egressNetworkConnectors parameter on RunMicroVm.
This operation is idempotent when you provide a ClientToken — if you retry a request that completed successfully using the same client token, the operation returns the existing connector without creating a duplicate.
Method Signature¶
METHODS /AWS1/IF_LMC~CREATENETWORKCONNECTOR
IMPORTING
!IV_NAME TYPE /AWS1/LMCNETWORKCONNECTORNAME OPTIONAL
!IO_CONFIGURATION TYPE REF TO /AWS1/CL_LMCNETWORKCNCTRCONF OPTIONAL
!IV_OPERATORROLE TYPE /AWS1/LMCNETWORKCNCTRROLEARN OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/LMCCLIENTTOKENSTRING OPTIONAL
!IT_TAGS TYPE /AWS1/CL_LMCNETWORKCNCTRTAGS_W=>TT_NETWORKCONNECTORTAGS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmccreatenetcnctrrsp
RAISING
/AWS1/CX_LMCINVPARAMVALUEEX
/AWS1/CX_LMCNETCNCTRLMTEXCDEX
/AWS1/CX_LMCRESOURCECONFLICTEX
/AWS1/CX_LMCSERVICEEXCEPTION
/AWS1/CX_LMCTOOMANYREQUESTSEX
/AWS1/CX_LMCCLIENTEXC
/AWS1/CX_LMCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/LMCNETWORKCONNECTORNAME /AWS1/LMCNETWORKCONNECTORNAME¶
A unique name for the network connector within your account and Region. You can use the name to identify the connector in subsequent API calls.
io_configuration TYPE REF TO /AWS1/CL_LMCNETWORKCNCTRCONF /AWS1/CL_LMCNETWORKCNCTRCONF¶
The network configuration for the connector. Specify a
VpcEgressConfigurationto enable outbound traffic routing through your VPC.
Optional arguments:¶
iv_operatorrole TYPE /AWS1/LMCNETWORKCNCTRROLEARN /AWS1/LMCNETWORKCNCTRROLEARN¶
The ARN of the IAM role that Lambda assumes to manage elastic network interfaces in your VPC. This role must have permissions for
ec2:CreateNetworkInterface,ec2:DeleteNetworkInterface, and related describe operations.
iv_clienttoken TYPE /AWS1/LMCCLIENTTOKENSTRING /AWS1/LMCCLIENTTOKENSTRING¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request with the same client token, the API returns the existing connector without creating a duplicate.
it_tags TYPE /AWS1/CL_LMCNETWORKCNCTRTAGS_W=>TT_NETWORKCONNECTORTAGS TT_NETWORKCONNECTORTAGS¶
A map of key-value pairs to associate with the network connector for organization, cost allocation, or access control.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmccreatenetcnctrrsp /AWS1/CL_LMCCREATENETCNCTRRSP¶
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->createnetworkconnector(
io_configuration = new /aws1/cl_lmcnetworkcnctrconf(
io_vpcegressconfiguration = new /aws1/cl_lmcnetcnctrvpcegrconf(
it_assoccomputeresourcetypes = VALUE /aws1/cl_lmcasccomprestyslst_w=>tt_assoccomputerestypeslist(
( new /aws1/cl_lmcasccomprestyslst_w( |string| ) )
)
it_securitygroupids = VALUE /aws1/cl_lmcnetcnrecuritygri00=>tt_networkcnctecuritygroupids(
( new /aws1/cl_lmcnetcnrecuritygri00( |string| ) )
)
it_subnetids = VALUE /aws1/cl_lmcnetcnctubnetids_w=>tt_networkconnectorsubnetids(
( new /aws1/cl_lmcnetcnctubnetids_w( |string| ) )
)
iv_networkprotocol = |string|
)
)
it_tags = VALUE /aws1/cl_lmcnetworkcnctrtags_w=>tt_networkconnectortags(
(
VALUE /aws1/cl_lmcnetworkcnctrtags_w=>ts_networkconnectortags_maprow(
key = |string|
value = new /aws1/cl_lmcnetworkcnctrtags_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_name = |string|
iv_operatorrole = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_networkconnectorarn = lo_result->get_arn( ).
lv_networkconnectorname = lo_result->get_name( ).
lv_networkconnectorid = lo_result->get_id( ).
lo_networkconnectorconfigu = lo_result->get_configuration( ).
IF lo_networkconnectorconfigu IS NOT INITIAL.
lo_networkconnectorvpcegre = lo_networkconnectorconfigu->get_vpcegressconfiguration( ).
IF lo_networkconnectorvpcegre IS NOT INITIAL.
LOOP AT lo_networkconnectorvpcegre->get_subnetids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_networkconnectorsubneti = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_networkconnectorvpcegre->get_securitygroupids( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_networkconnectorsecurit = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_networkprotocol = lo_networkconnectorvpcegre->get_networkprotocol( ).
LOOP AT lo_networkconnectorvpcegre->get_assoccomputerestypes( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_computeresourcetype = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_networkconnectorrolearn = lo_result->get_operatorrole( ).
lv_networkconnectorstate = lo_result->get_state( ).
ENDIF.