Skip to content

/AWS1/IF_EC2=>MODIFYINSTCONNECTENDPOINT()

About ModifyInstanceConnectEndpoint

Modifies the specified EC2 Instance Connect Endpoint.

For more information, see Modify an EC2 Instance Connect Endpoint in the Amazon EC2 User Guide.

Method Signature

METHODS /AWS1/IF_EC2~MODIFYINSTCONNECTENDPOINT
  IMPORTING
    !IV_DRYRUN TYPE /AWS1/EC2BOOLEAN OPTIONAL
    !IV_INSTANCECONNECTENDPOINTID TYPE /AWS1/EC2INSTCONNECTENDPTID OPTIONAL
    !IV_IPADDRESSTYPE TYPE /AWS1/EC2IPADDRESSTYPE OPTIONAL
    !IT_SECURITYGROUPIDS TYPE /AWS1/CL_EC2SECGRIDSTRLSTREQ_W=>TT_SECGROUPIDSTRINGLISTREQUEST OPTIONAL
    !IV_PRESERVECLIENTIP TYPE /AWS1/EC2BOOLEAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2modinstcnctendptrs
  RAISING
    /AWS1/CX_EC2CLIENTEXC
    /AWS1/CX_EC2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_instanceconnectendpointid TYPE /AWS1/EC2INSTCONNECTENDPTID /AWS1/EC2INSTCONNECTENDPTID

The ID of the EC2 Instance Connect Endpoint to modify.

Optional arguments:

iv_dryrun TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

iv_ipaddresstype TYPE /AWS1/EC2IPADDRESSTYPE /AWS1/EC2IPADDRESSTYPE

The new IP address type for the EC2 Instance Connect Endpoint.

PreserveClientIp is only supported on IPv4 EC2 Instance Connect Endpoints. To use PreserveClientIp, the value for IpAddressType must be ipv4.

it_securitygroupids TYPE /AWS1/CL_EC2SECGRIDSTRLSTREQ_W=>TT_SECGROUPIDSTRINGLISTREQUEST TT_SECGROUPIDSTRINGLISTREQUEST

Changes the security groups for the EC2 Instance Connect Endpoint. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

iv_preserveclientip TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Indicates whether the client IP address is preserved as the source when you connect to a resource. The following are the possible values.

  • true - Use the IP address of the client. Your instance must have an IPv4 address.

  • false - Use the IP address of the network interface.

RETURNING

oo_output TYPE REF TO /aws1/cl_ec2modinstcnctendptrs /AWS1/CL_EC2MODINSTCNCTENDPTRS

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->modifyinstconnectendpoint(
  it_securitygroupids = VALUE /aws1/cl_ec2secgridstrlstreq_w=>tt_secgroupidstringlistrequest(
    ( new /aws1/cl_ec2secgridstrlstreq_w( |string| ) )
  )
  iv_dryrun = ABAP_TRUE
  iv_instanceconnectendpointid = |string|
  iv_ipaddresstype = |string|
  iv_preserveclientip = ABAP_TRUE
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_boolean = lo_result->get_return( ).
ENDIF.