create_vpc_peering_connection
¶
create_vpc_peering_connection(
*,
config_overrides: Optional[EC2ClientConfig] = None,
peer_region: Optional[String] = None,
tag_specifications: Optional[TagSpecificationList] = None,
dry_run: Optional[Boolean] = None,
vpc_id: Optional[VpcId] = None,
peer_vpc_id: Optional[String] = None,
peer_owner_id: Optional[String] = None,
) -> CreateVpcPeeringConnectionResult
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 VPC peering limitations 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.
Parameters:
-
peer_region(Optional[String], default:None) –The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.
Default: The Region in which you make the request.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to assign to the peering connection.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
vpc_id(Optional[VpcId], default:None) –The ID of the requester VPC. You must specify this parameter in the request.
-
peer_vpc_id(Optional[String], default:None) –The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
-
peer_owner_id(Optional[String], default:None) –The Amazon Web Services account ID of the owner of the accepter VPC.
Default: Your Amazon Web Services account ID
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 | |