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
-
/**
* @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.