Accept a VPC peering connection request. To accept a request, the VPC peering connection must
be in the pending-acceptance state, and you must be the owner of the peer VPC.
Use DescribeVpcPeeringConnections to view your outstanding VPC
peering connection requests.
For an inter-Region VPC peering connection request, you must accept the VPC peering
connection in the Region of the accepter VPC.
example
Use a bare-bones client and the command you need to make an API call.
Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the
pending-acceptance
state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, AcceptVpcPeeringConnectionCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, AcceptVpcPeeringConnectionCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new AcceptVpcPeeringConnectionCommand(input); const response = await client.send(command);
AcceptVpcPeeringConnectionCommandInput for command's
input
shape.AcceptVpcPeeringConnectionCommandOutput for command's
response
shape.config for EC2Client's
config
shape.