Deletes a VPC peering connection. Either the owner of the requester VPC or the owner
of the accepter VPC can delete the VPC peering connection if it's in the
active state. The owner of the requester VPC can delete a VPC peering
connection in the pending-acceptance state. You cannot delete a VPC peering
connection that's in the failed state.
example
Use a bare-bones client and the command you need to make an API call.
Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the accepter VPC can delete the VPC peering connection if it's in the
active
state. The owner of the requester VPC can delete a VPC peering connection in thepending-acceptance
state. You cannot delete a VPC peering connection that's in thefailed
state.Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DeleteVpcPeeringConnectionCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DeleteVpcPeeringConnectionCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DeleteVpcPeeringConnectionCommand(input); const response = await client.send(command);
DeleteVpcPeeringConnectionCommandInput for command's
input
shape.DeleteVpcPeeringConnectionCommandOutput for command's
response
shape.config for EC2Client's
config
shape.