Skip to content

modify_vpc_endpoint async

modify_vpc_endpoint(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    vpc_endpoint_id: Optional[VpcEndpointId] = None,
    reset_policy: Optional[Boolean] = None,
    policy_document: Optional[String] = None,
    add_route_table_ids: Optional[VpcEndpointRouteTableIdList] = None,
    remove_route_table_ids: Optional[VpcEndpointRouteTableIdList] = None,
    add_subnet_ids: Optional[VpcEndpointSubnetIdList] = None,
    remove_subnet_ids: Optional[VpcEndpointSubnetIdList] = None,
    add_security_group_ids: Optional[VpcEndpointSecurityGroupIdList] = None,
    remove_security_group_ids: Optional[VpcEndpointSecurityGroupIdList] = None,
    ip_address_type: Optional[IpAddressType] = None,
    dns_options: Optional[DnsOptionsSpecification] = None,
    private_dns_enabled: Optional[Boolean] = None,
    subnet_configurations: Optional[SubnetConfigurationsList] = None,
) -> ModifyVpcEndpointResult

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.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    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.

  • vpc_endpoint_id (Optional[VpcEndpointId], default: None ) –

    The ID of the endpoint.

  • reset_policy (Optional[Boolean], default: None ) –

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

  • policy_document (Optional[String], default: None ) –

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

  • add_route_table_ids (Optional[VpcEndpointRouteTableIdList], default: None ) –

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

  • remove_route_table_ids (Optional[VpcEndpointRouteTableIdList], default: None ) –

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

  • add_subnet_ids (Optional[VpcEndpointSubnetIdList], default: None ) –

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

  • remove_subnet_ids (Optional[VpcEndpointSubnetIdList], default: None ) –

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

  • add_security_group_ids (Optional[VpcEndpointSecurityGroupIdList], default: None ) –

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

  • remove_security_group_ids (Optional[VpcEndpointSecurityGroupIdList], default: None ) –

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

  • ip_address_type (Optional[IpAddressType], default: None ) –

    The IP address type for the endpoint.

  • dns_options (Optional[DnsOptionsSpecification], default: None ) –

    The DNS options for the endpoint.

  • private_dns_enabled (Optional[Boolean], default: None ) –

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

  • subnet_configurations (Optional[SubnetConfigurationsList], default: None ) –

    The subnet configurations for the endpoint.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def modify_vpc_endpoint(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    vpc_endpoint_id: Optional[
        "capo_ec2.types.vpc_endpoint_id.VpcEndpointId"
    ] = None,
    reset_policy: Optional["capo_ec2.types.boolean.Boolean"] = None,
    policy_document: Optional["capo_ec2.types.string.String"] = None,
    add_route_table_ids: Optional[
        "capo_ec2.types.vpc_endpoint_route_table_id_list.VpcEndpointRouteTableIdList"
    ] = None,
    remove_route_table_ids: Optional[
        "capo_ec2.types.vpc_endpoint_route_table_id_list.VpcEndpointRouteTableIdList"
    ] = None,
    add_subnet_ids: Optional[
        "capo_ec2.types.vpc_endpoint_subnet_id_list.VpcEndpointSubnetIdList"
    ] = None,
    remove_subnet_ids: Optional[
        "capo_ec2.types.vpc_endpoint_subnet_id_list.VpcEndpointSubnetIdList"
    ] = None,
    add_security_group_ids: Optional[
        "capo_ec2.types.vpc_endpoint_security_group_id_list.VpcEndpointSecurityGroupIdList"
    ] = None,
    remove_security_group_ids: Optional[
        "capo_ec2.types.vpc_endpoint_security_group_id_list.VpcEndpointSecurityGroupIdList"
    ] = None,
    ip_address_type: Optional[
        "capo_ec2.types.ip_address_type.IpAddressType"
    ] = None,
    dns_options: Optional[
        "capo_ec2.types.dns_options_specification.DnsOptionsSpecification"
    ] = None,
    private_dns_enabled: Optional["capo_ec2.types.boolean.Boolean"] = None,
    subnet_configurations: Optional[
        "capo_ec2.types.subnet_configurations_list.SubnetConfigurationsList"
    ] = None,
) -> "capo_ec2.types.modify_vpc_endpoint_result.ModifyVpcEndpointResult":
    """<p>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 <a href="https://docs.aws.amazon.com/vpc/latest/privatelink/">Amazon Web Services PrivateLink Guide</a>.</p>

    Args:
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        vpc_endpoint_id: <p>The ID of the endpoint.</p>
        reset_policy: <p>(Gateway endpoint) Specify <code>true</code> to reset the policy document to the default policy. The default policy allows full access to the service.</p>
        policy_document: <p>(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.</p>
        add_route_table_ids: <p>(Gateway endpoint) The IDs of the route tables to associate with the endpoint.</p>
        remove_route_table_ids: <p>(Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.</p>
        add_subnet_ids: <p>(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.</p>
        remove_subnet_ids: <p>(Interface endpoint) The IDs of the subnets from which to remove the endpoint.</p>
        add_security_group_ids: <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces.</p>
        remove_security_group_ids: <p>(Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces.</p>
        ip_address_type: <p>The IP address type for the endpoint.</p>
        dns_options: <p>The DNS options for the endpoint.</p>
        private_dns_enabled: <p>(Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.</p>
        subnet_configurations: <p>The subnet configurations for the endpoint.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.modify_vpc_endpoint_request.ModifyVpcEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.modify_vpc_endpoint_result.ModifyVpcEndpointResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_vpc_endpoint

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.modify_vpc_endpoint.async_modify_vpc_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyVpcEndpoint")
    )
    input_: capo_ec2.types.modify_vpc_endpoint_request.ModifyVpcEndpointRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if vpc_endpoint_id is not None:
        input_["vpc_endpoint_id"] = vpc_endpoint_id
    if reset_policy is not None:
        input_["reset_policy"] = reset_policy
    if policy_document is not None:
        input_["policy_document"] = policy_document
    if add_route_table_ids is not None:
        input_["add_route_table_ids"] = add_route_table_ids
    if remove_route_table_ids is not None:
        input_["remove_route_table_ids"] = remove_route_table_ids
    if add_subnet_ids is not None:
        input_["add_subnet_ids"] = add_subnet_ids
    if remove_subnet_ids is not None:
        input_["remove_subnet_ids"] = remove_subnet_ids
    if add_security_group_ids is not None:
        input_["add_security_group_ids"] = add_security_group_ids
    if remove_security_group_ids is not None:
        input_["remove_security_group_ids"] = remove_security_group_ids
    if ip_address_type is not None:
        input_["ip_address_type"] = ip_address_type
    if dns_options is not None:
        input_["dns_options"] = dns_options
    if private_dns_enabled is not None:
        input_["private_dns_enabled"] = private_dns_enabled
    if subnet_configurations is not None:
        input_["subnet_configurations"] = subnet_configurations

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output