:doc:`EC2 <../../ec2>` / Client / modify_instance_connect_endpoint

********************************
modify_instance_connect_endpoint
********************************



.. py:method:: EC2.Client.modify_instance_connect_endpoint(**kwargs)

  

  Modifies the specified EC2 Instance Connect Endpoint.

   

  For more information, see `Modify an EC2 Instance Connect Endpoint <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/modify-ec2-instance-connect-endpoint.html>`__ in the *Amazon EC2 User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceConnectEndpoint>`_  


  **Request Syntax**
  ::

    response = client.modify_instance_connect_endpoint(
        DryRun=True|False,
        InstanceConnectEndpointId='string',
        IpAddressType='ipv4'|'dualstack'|'ipv6',
        SecurityGroupIds=[
            'string',
        ],
        PreserveClientIp=True|False
    )
    
  :type DryRun: boolean
  :param DryRun: 

    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``.

    

  
  :type InstanceConnectEndpointId: string
  :param InstanceConnectEndpointId: **[REQUIRED]** 

    The ID of the EC2 Instance Connect Endpoint to modify.

    

  
  :type IpAddressType: string
  :param IpAddressType: 

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

     

    .. note::

      

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

      

    

  
  :type SecurityGroupIds: list
  :param SecurityGroupIds: 

    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.

    

  
    - *(string) --* 

    

  :type PreserveClientIp: boolean
  :param PreserveClientIp: 

    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.
    

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Return': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Return** *(boolean) --* 

        Is ``true`` if the request succeeds and an error otherwise.

        
  