create_vpn_connection
¶
create_vpn_connection(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 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 | |