/AWS1/IF_EC2=>CREATEVPCENDPOINT()¶
About CreateVpcEndpoint¶
Creates a VPC endpoint. A VPC endpoint provides a private connection between the specified VPC and the specified endpoint service. You can use an endpoint service provided by Amazon Web Services, an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information, see the Amazon Web Services PrivateLink User Guide.
Method Signature¶
METHODS /AWS1/IF_EC2~CREATEVPCENDPOINT
IMPORTING
!IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
!IV_VPCENDPOINTTYPE TYPE /AWS1/EC2VPCENDPOINTTYPE OPTIONAL
!IV_VPCID TYPE /AWS1/EC2VPCID OPTIONAL
!IV_SERVICENAME TYPE /AWS1/EC2STRING OPTIONAL
!IV_POLICYDOCUMENT TYPE /AWS1/EC2STRING OPTIONAL
!IT_ROUTETABLEIDS TYPE /AWS1/CL_EC2VPCENDPTROUTETBL00=>TT_VPCENDPOINTROUTETABLEIDLIST OPTIONAL
!IT_SUBNETIDS TYPE /AWS1/CL_EC2VPCENDPTSNETIDLS00=>TT_VPCENDPOINTSUBNETIDLIST OPTIONAL
!IT_SECURITYGROUPIDS TYPE /AWS1/CL_EC2VPCENDPTSECGRIDL00=>TT_VPCENDPTSECURITYGROUPIDLIST OPTIONAL
!IV_IPADDRESSTYPE TYPE /AWS1/EC2IPADDRESSTYPE OPTIONAL
!IO_DNSOPTIONS TYPE REF TO /AWS1/CL_EC2DNSOPTIONSSPEC OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
!IV_PRIVATEDNSENABLED TYPE /AWS1/EC2BOOLEAN OPTIONAL
!IT_TAGSPECIFICATIONS TYPE /AWS1/CL_EC2TAGSPECIFICATION=>TT_TAGSPECIFICATIONLIST OPTIONAL
!IT_SUBNETCONFIGURATIONS TYPE /AWS1/CL_EC2SUBNETCONF=>TT_SUBNETCONFIGURATIONSLIST OPTIONAL
!IV_SERVICENETWORKARN TYPE /AWS1/EC2SERVICENETWORKARN OPTIONAL
!IV_RESOURCECONFIGURATIONARN TYPE /AWS1/EC2RESOURCECONFARN OPTIONAL
!IV_SERVICEREGION TYPE /AWS1/EC2STRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2createvpcendptrslt
RAISING
/AWS1/CX_EC2CLIENTEXC
/AWS1/CX_EC2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_vpcid TYPE /AWS1/EC2VPCID /AWS1/EC2VPCID¶
The ID of the VPC.
Optional arguments:¶
iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.
iv_vpcendpointtype TYPE /AWS1/EC2VPCENDPOINTTYPE /AWS1/EC2VPCENDPOINTTYPE¶
The type of endpoint.
Default: Gateway
iv_servicename TYPE /AWS1/EC2STRING /AWS1/EC2STRING¶
The name of the endpoint service.
iv_policydocument TYPE /AWS1/EC2STRING /AWS1/EC2STRING¶
(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.
it_routetableids TYPE /AWS1/CL_EC2VPCENDPTROUTETBL00=>TT_VPCENDPOINTROUTETABLEIDLIST TT_VPCENDPOINTROUTETABLEIDLIST¶
(Gateway endpoint) The route table IDs.
it_subnetids TYPE /AWS1/CL_EC2VPCENDPTSNETIDLS00=>TT_VPCENDPOINTSUBNETIDLIST TT_VPCENDPOINTSUBNETIDLIST¶
(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.
it_securitygroupids TYPE /AWS1/CL_EC2VPCENDPTSECGRIDL00=>TT_VPCENDPTSECURITYGROUPIDLIST TT_VPCENDPTSECURITYGROUPIDLIST¶
(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC.
iv_ipaddresstype TYPE /AWS1/EC2IPADDRESSTYPE /AWS1/EC2IPADDRESSTYPE¶
The IP address type for the endpoint.
io_dnsoptions TYPE REF TO /AWS1/CL_EC2DNSOPTIONSSPEC /AWS1/CL_EC2DNSOPTIONSSPEC¶
The DNS options for the endpoint.
iv_clienttoken TYPE /AWS1/EC2STRING /AWS1/EC2STRING¶
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
iv_privatednsenabled TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN¶
(Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example,
kinesis.us-east-1.amazonaws.com), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.To use a private hosted zone, you must set the following VPC attributes to
true:enableDnsHostnamesandenableDnsSupport. Use ModifyVpcAttribute to set the VPC attributes.
it_tagspecifications TYPE /AWS1/CL_EC2TAGSPECIFICATION=>TT_TAGSPECIFICATIONLIST TT_TAGSPECIFICATIONLIST¶
The tags to associate with the endpoint.
it_subnetconfigurations TYPE /AWS1/CL_EC2SUBNETCONF=>TT_SUBNETCONFIGURATIONSLIST TT_SUBNETCONFIGURATIONSLIST¶
The subnet configurations for the endpoint.
iv_servicenetworkarn TYPE /AWS1/EC2SERVICENETWORKARN /AWS1/EC2SERVICENETWORKARN¶
The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.
iv_resourceconfigurationarn TYPE /AWS1/EC2RESOURCECONFARN /AWS1/EC2RESOURCECONFARN¶
The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.
iv_serviceregion TYPE /AWS1/EC2STRING /AWS1/EC2STRING¶
The Region where the service is hosted. The default is the current Region.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ec2createvpcendptrslt /AWS1/CL_EC2CREATEVPCENDPTRSLT¶
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->createvpcendpoint(
io_dnsoptions = new /aws1/cl_ec2dnsoptionsspec(
it_pvtdnsspecifieddomains = VALUE /aws1/cl_ec2pvtdnsspecifiedd00=>tt_pvtdnsspecifieddomainset(
( new /aws1/cl_ec2pvtdnsspecifiedd00( |string| ) )
)
iv_dnsrecordiptype = |string|
iv_privatednspreference = |string|
iv_pvtdnsonlyforinboundres00 = ABAP_TRUE
)
it_routetableids = VALUE /aws1/cl_ec2vpcendptroutetbl00=>tt_vpcendpointroutetableidlist(
( new /aws1/cl_ec2vpcendptroutetbl00( |string| ) )
)
it_securitygroupids = VALUE /aws1/cl_ec2vpcendptsecgridl00=>tt_vpcendptsecuritygroupidlist(
( new /aws1/cl_ec2vpcendptsecgridl00( |string| ) )
)
it_subnetconfigurations = VALUE /aws1/cl_ec2subnetconf=>tt_subnetconfigurationslist(
(
new /aws1/cl_ec2subnetconf(
iv_ipv4 = |string|
iv_ipv6 = |string|
iv_subnetid = |string|
)
)
)
it_subnetids = VALUE /aws1/cl_ec2vpcendptsnetidls00=>tt_vpcendpointsubnetidlist(
( new /aws1/cl_ec2vpcendptsnetidls00( |string| ) )
)
it_tagspecifications = VALUE /aws1/cl_ec2tagspecification=>tt_tagspecificationlist(
(
new /aws1/cl_ec2tagspecification(
it_tags = VALUE /aws1/cl_ec2tag=>tt_taglist(
(
new /aws1/cl_ec2tag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_resourcetype = |string|
)
)
)
iv_clienttoken = |string|
iv_dryrun = ABAP_TRUE
iv_ipaddresstype = |string|
iv_policydocument = |string|
iv_privatednsenabled = ABAP_TRUE
iv_resourceconfigurationarn = |string|
iv_servicename = |string|
iv_servicenetworkarn = |string|
iv_serviceregion = |string|
iv_vpcendpointtype = |string|
iv_vpcid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_vpcendpoint = lo_result->get_vpcendpoint( ).
IF lo_vpcendpoint IS NOT INITIAL.
lv_string = lo_vpcendpoint->get_vpcendpointid( ).
lv_vpcendpointtype = lo_vpcendpoint->get_vpcendpointtype( ).
lv_string = lo_vpcendpoint->get_vpcid( ).
lv_string = lo_vpcendpoint->get_servicename( ).
lv_state = lo_vpcendpoint->get_state( ).
lv_string = lo_vpcendpoint->get_policydocument( ).
LOOP AT lo_vpcendpoint->get_routetableids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_vpcendpoint->get_subnetids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_vpcendpoint->get_groups( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_groupid( ).
lv_string = lo_row_3->get_groupname( ).
ENDIF.
ENDLOOP.
lv_ipaddresstype = lo_vpcendpoint->get_ipaddresstype( ).
lo_dnsoptions = lo_vpcendpoint->get_dnsoptions( ).
IF lo_dnsoptions IS NOT INITIAL.
lv_dnsrecordiptype = lo_dnsoptions->get_dnsrecordiptype( ).
lv_boolean = lo_dnsoptions->get_pvtdnsonlyforinboundre00( ).
lv_string = lo_dnsoptions->get_privatednspreference( ).
LOOP AT lo_dnsoptions->get_pvtdnsspecifieddomains( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_boolean = lo_vpcendpoint->get_privatednsenabled( ).
lv_boolean = lo_vpcendpoint->get_requestermanaged( ).
LOOP AT lo_vpcendpoint->get_networkinterfaceids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_vpcendpoint->get_dnsentries( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_string = lo_row_7->get_dnsname( ).
lv_string = lo_row_7->get_hostedzoneid( ).
ENDIF.
ENDLOOP.
lv_milliseconddatetime = lo_vpcendpoint->get_creationtimestamp( ).
LOOP AT lo_vpcendpoint->get_tags( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_string = lo_row_9->get_key( ).
lv_string = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_vpcendpoint->get_ownerid( ).
lo_lasterror = lo_vpcendpoint->get_lasterror( ).
IF lo_lasterror IS NOT INITIAL.
lv_string = lo_lasterror->get_message( ).
lv_string = lo_lasterror->get_code( ).
ENDIF.
LOOP AT lo_vpcendpoint->get_ipv4prefixes( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_string = lo_row_11->get_subnetid( ).
LOOP AT lo_row_11->get_ipprefixes( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_vpcendpoint->get_ipv6prefixes( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_string = lo_row_11->get_subnetid( ).
LOOP AT lo_row_11->get_ipprefixes( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_string = lo_vpcendpoint->get_failurereason( ).
lv_servicenetworkarn = lo_vpcendpoint->get_servicenetworkarn( ).
lv_resourceconfigurationar = lo_vpcendpoint->get_resourceconfigurationarn( ).
lv_string = lo_vpcendpoint->get_serviceregion( ).
ENDIF.
lv_string = lo_result->get_clienttoken( ).
ENDIF.