ModifyVpcPeeringConnectionOptions

Modifies the VPC peering connection options on one side of a VPC peering connection.
You can do the following:

Enable/disable communication over the peering connection between an EC2-Classic instance
that's linked to your VPC (using ClassicLink) and instances in the peer VPC.

Enable/disable communication over the peering connection between instances in your
VPC and an EC2-Classic instance that's linked to the peer VPC.

Enable/disable a local VPC to resolve public DNS hostnames to private IP addresses
when queried
from instances in the peer VPC.

If the peered VPCs are in different accounts, each owner must initiate a separate
request to
modify the peering connection options, depending on whether their VPC was the requester
or
accepter for the VPC peering connection. If the peered VPCs are in the same account,
you can
modify the requester and accepter options in the same request. To confirm
which VPC is the accepter and requester for a VPC peering connection, use the
DescribeVpcPeeringConnections command.

Request Parameters

The following parameters are for this specific action. For more information about
required and optional parameters that are common to all actions, see Common Query Parameters.

Checks whether you have the required permissions for the operation, without actually
making the request,
and provides an error response. If you have the required permissions, the error response
is DryRunOperation.
Otherwise, it is UnauthorizedOperation.

Errors

Examples

Example

In this example, you have an EC2-Classic instance linked to your VPC. You want
to enable communication over the VPC peering connection to allow the linked EC2-Classic
instance to communicate with instances in the peer VPC. You were the requester of
the VPC
peering connection, therefore you modify the requester VPC peering connection
options.

Example

In this example, you want to enable communication from instances in your local
VPC to any linked EC2-Classic instances in the peer VPC. You were the accepter of
the VPC
peering connection, therefore you modify the accepter VPC peering connection
options.

Example

In this example, you want to enable your VPC to resolve public DNS hostname to
private IP addresses when queried from instances in the peer VPC. You were the accepter
of
the VPC peering connection, therefore you modify the accepter VPC peering connection
options.