create_vpn_connection
async
¶
create_vpn_connection(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
customer_gateway_id: Optional[CustomerGatewayId] = None,
type: Optional[String] = None,
vpn_gateway_id: Optional[VpnGatewayId] = None,
transit_gateway_id: Optional[TransitGatewayId] = None,
vpn_concentrator_id: Optional[VpnConcentratorId] = None,
tag_specifications: Optional[TagSpecificationList] = None,
pre_shared_key_storage: Optional[String] = None,
dry_run: Optional[Boolean] = None,
options: Optional[VpnConnectionOptionsSpecification] = None,
) -> CreateVpnConnectionResult
Creates a VPN connection between an existing virtual private gateway or transit gateway and a customer gateway. The supported connection type is ipsec.1.
The response includes information that you need to give to your network administrator to configure your customer gateway.
We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway device.
If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.
For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.
Parameters:
-
customer_gateway_id(Optional[CustomerGatewayId], default:None) –The ID of the customer gateway.
-
type(Optional[String], default:None) –The type of VPN connection (
ipsec.1). -
vpn_gateway_id(Optional[VpnGatewayId], default:None) –The ID of the virtual private gateway. If you specify a virtual private gateway, you cannot specify a transit gateway.
-
transit_gateway_id(Optional[TransitGatewayId], default:None) –The ID of the transit gateway. If you specify a transit gateway, you cannot specify a virtual private gateway.
-
vpn_concentrator_id(Optional[VpnConcentratorId], default:None) –The ID of the VPN concentrator to associate with the VPN connection.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the VPN connection.
-
pre_shared_key_storage(Optional[String], default:None) –Specifies the storage mode for the pre-shared key (PSK). Valid values are
Standard" (stored in the Site-to-Site VPN service) orSecretsManager(stored in Amazon Web Services Secrets Manager). -
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. -
options(Optional[VpnConnectionOptionsSpecification], default:None) –The options for the VPN connection.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 | |