Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CreateVpcPeeringConnectionCommand

Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide.

The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed.

example

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, CreateVpcPeeringConnectionCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, CreateVpcPeeringConnectionCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const command = new CreateVpcPeeringConnectionCommand(input);
const response = await client.send(command);
see

CreateVpcPeeringConnectionCommandInput for command's input shape.

see

CreateVpcPeeringConnectionCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: CreateVpcPeeringConnectionCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions