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

*******************
modify_vpc_endpoint
*******************



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

  

  Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see the `Amazon Web Services PrivateLink Guide <https://docs.aws.amazon.com/vpc/latest/privatelink/>`__.

  

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


  **Request Syntax**
  ::

    response = client.modify_vpc_endpoint(
        DryRun=True|False,
        VpcEndpointId='string',
        ResetPolicy=True|False,
        PolicyDocument='string',
        AddRouteTableIds=[
            'string',
        ],
        RemoveRouteTableIds=[
            'string',
        ],
        AddSubnetIds=[
            'string',
        ],
        RemoveSubnetIds=[
            'string',
        ],
        AddSecurityGroupIds=[
            'string',
        ],
        RemoveSecurityGroupIds=[
            'string',
        ],
        IpAddressType='ipv4'|'dualstack'|'ipv6',
        DnsOptions={
            'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined',
            'PrivateDnsOnlyForInboundResolverEndpoint': True|False,
            'PrivateDnsPreference': 'string',
            'PrivateDnsSpecifiedDomains': [
                'string',
            ]
        },
        PrivateDnsEnabled=True|False,
        SubnetConfigurations=[
            {
                'SubnetId': 'string',
                'Ipv4': 'string',
                'Ipv6': 'string'
            },
        ]
    )
    
  :type DryRun: boolean
  :param DryRun: 

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

    

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

    The ID of the endpoint.

    

  
  :type ResetPolicy: boolean
  :param ResetPolicy: 

    (Gateway endpoint) Specify ``true`` to reset the policy document to the default policy. The default policy allows full access to the service.

    

  
  :type PolicyDocument: string
  :param PolicyDocument: 

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

    

  
  :type AddRouteTableIds: list
  :param AddRouteTableIds: 

    (Gateway endpoint) The IDs of the route tables to associate with the endpoint.

    

  
    - *(string) --* 

    

  :type RemoveRouteTableIds: list
  :param RemoveRouteTableIds: 

    (Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.

    

  
    - *(string) --* 

    

  :type AddSubnetIds: list
  :param AddSubnetIds: 

    (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.

    

  
    - *(string) --* 

    

  :type RemoveSubnetIds: list
  :param RemoveSubnetIds: 

    (Interface endpoint) The IDs of the subnets from which to remove the endpoint.

    

  
    - *(string) --* 

    

  :type AddSecurityGroupIds: list
  :param AddSecurityGroupIds: 

    (Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces.

    

  
    - *(string) --* 

    

  :type RemoveSecurityGroupIds: list
  :param RemoveSecurityGroupIds: 

    (Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces.

    

  
    - *(string) --* 

    

  :type IpAddressType: string
  :param IpAddressType: 

    The IP address type for the endpoint.

    

  
  :type DnsOptions: dict
  :param DnsOptions: 

    The DNS options for the endpoint.

    

  
    - **DnsRecordIpType** *(string) --* 

      The DNS records created for the endpoint.

      

    
    - **PrivateDnsOnlyForInboundResolverEndpoint** *(boolean) --* 

      Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint.

      

    
    - **PrivateDnsPreference** *(string) --* 

      The preference for which private domains have a private hosted zone created for and associated with the specified VPC. Only supported when private DNS is enabled and when the VPC endpoint type is ServiceNetwork or Resource.

       

      
      * ``ALL_DOMAINS`` - VPC Lattice provisions private hosted zones for all custom domain names.
       
      * ``VERIFIED_DOMAINS_ONLY`` - VPC Lattice provisions a private hosted zone only if custom domain name has been verified by the provider.
       
      * ``VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS`` - VPC Lattice provisions private hosted zones for all verified custom domain names and other domain names that the resource consumer specifies. The resource consumer specifies the domain names in the PrivateDnsSpecifiedDomains parameter.
       
      * ``SPECIFIED_DOMAINS_ONLY`` - VPC Lattice provisions a private hosted zone for domain names specified by the resource consumer. The resource consumer specifies the domain names in the PrivateDnsSpecifiedDomains parameter.
      

      

    
    - **PrivateDnsSpecifiedDomains** *(list) --* 

      Indicates which of the private domains to create private hosted zones for and associate with the specified VPC. Only supported when private DNS is enabled and the private DNS preference is verified-domains-and-specified-domains or specified-domains-only.

      

    
      - *(string) --* 

      
  
  
  :type PrivateDnsEnabled: boolean
  :param PrivateDnsEnabled: 

    (Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.

    

  
  :type SubnetConfigurations: list
  :param SubnetConfigurations: 

    The subnet configurations for the endpoint.

    

  
    - *(dict) --* 

      Describes the configuration of a subnet for a VPC endpoint.

      

    
      - **SubnetId** *(string) --* 

        The ID of the subnet.

        

      
      - **Ipv4** *(string) --* 

        The IPv4 address to assign to the endpoint network interface in the subnet. You must provide an IPv4 address if the VPC endpoint supports IPv4.

         

        If you specify an IPv4 address when modifying a VPC endpoint, we replace the existing endpoint network interface with a new endpoint network interface with this IP address. This process temporarily disconnects the subnet and the VPC endpoint.

        

      
      - **Ipv6** *(string) --* 

        The IPv6 address to assign to the endpoint network interface in the subnet. You must provide an IPv6 address if the VPC endpoint supports IPv6.

         

        If you specify an IPv6 address when modifying a VPC endpoint, we replace the existing endpoint network interface with a new endpoint network interface with this IP address. This process temporarily disconnects the subnet and the VPC endpoint.

        

      
    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        Returns ``true`` if the request succeeds; otherwise, it returns an error.

        
  