Creates a new VPN connection between an existing VPN gateway and customer gateway. The only supported connection type is ipsec.1.
The response includes information that you need to configure your customer gateway, in XML
format. We recommend you use the command line version of this operation
(ec2-create-vpn-connection
), which takes an -f
option (for format)
and returns configuration information formatted as expected by the vendor you specified, or in
a generic, human readable format. For information about the command, go to
ec2-create-vpn-connection
in the Amazon Virtual Private Cloud Command Line
Reference.
We strongly recommend you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.
If you decide to shut down your VPN connection for any reason and then create a new one, you must re-configure your customer gateway with the new information returned from this call.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The type of VPN connection. |
|
|
Required |
The ID of the customer gateway. |
|
|
Required |
The ID of the VPN gateway. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Create a new VPN connection.
$ec2 = new AmazonEC2(); $response = $ec2->create_vpn_connection('ipsec.1', 'cgw-10a84c79', 'vgw-9aa347f3'); var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/ec2.class.php | Toggle source view (18 lines) | View on GitHub