Use DeleteVpcEndpoint with an Amazon SDK - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use DeleteVpcEndpoint with an Amazon SDK

The following code example shows how to use DeleteVpcEndpoint.

PHP
SDK for PHP
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

/** * @param string $vpcEndpointId * @return void */ public function deleteVpcEndpoint(string $vpcEndpointId) { try { $this->ec2Client->deleteVpcEndpoints([ "VpcEndpointIds" => [$vpcEndpointId], ]); }catch (Ec2Exception $caught){ echo "There was a problem deleting the VPC Endpoint: {$caught->getAwsErrorMessage()}\n"; throw $caught; } }

For a complete list of Amazon SDK developer guides and code examples, see Create Amazon EC2 resources using an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.