EC2 / Client / modify_vpc_endpoint

modify_vpc_endpoint#

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.

See also: AWS API Documentation

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
    },
    PrivateDnsEnabled=True|False,
    SubnetConfigurations=[
        {
            'SubnetId': 'string',
            'Ipv4': 'string',
            'Ipv6': 'string'
        },
    ]
)
Parameters:
  • DryRun (boolean) – 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.

  • VpcEndpointId (string) –

    [REQUIRED]

    The ID of the endpoint.

  • ResetPolicy (boolean) – (Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service.

  • PolicyDocument (string) – (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.

  • AddRouteTableIds (list) –

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

    • (string) –

  • RemoveRouteTableIds (list) –

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

    • (string) –

  • AddSubnetIds (list) –

    (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) –

  • RemoveSubnetIds (list) –

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

    • (string) –

  • AddSecurityGroupIds (list) –

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

    • (string) –

  • RemoveSecurityGroupIds (list) –

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

    • (string) –

  • IpAddressType (string) – The IP address type for the endpoint.

  • DnsOptions (dict) –

    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.

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

  • SubnetConfigurations (list) –

    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.

Return type:

dict

Returns:

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) –

    • Return (boolean) –

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