create_vpc_peering_connection
async
¶
create_vpc_peering_connection(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 | |