The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME VM::EC2::REST::vpn

SYNOPSIS

 use VM::EC2 ':vpc';

METHODS

These methods create and manage the connections of Virtual Private Network (VPN) to Amazon Virtual Private Clouds (VPC).

Implemented: CreateVpnConnection CreateVpnConnectionRoute DeleteVpnConnection DeleteVpnConnectionRoute DescribeVpnConnections

Unimplemented: (none)

@vpn_connections = $ec2->describe_vpn_connections(-vpn_connection_id=>\@ids, -filter=>\%filters);

@vpn_connections = $ec2->describe_vpn_connections(@vpn_connection_ids)

@vpn_connections = $ec2->describe_vpn_connections(%filters);

Gives information about VPN connections

Returns a series of VM::EC2::VPC::VpnConnection objects.

Optional parameters are:

 -vpn_connection_id      ID of the connection(s) to return information on. 
                         This can be a string scalar, or an arrayref.

 -filter                 Tags and other filters to apply.

The filter argument is a hashreference in which the keys are the filter names, and the values are the match strings. Some filters accept wildcards.

There are a number of filters, which are listed in full at http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVpnConnections.html

Here is a alpha-sorted list of filter names: customer-gateway-configuration, customer-gateway-id, state, tag-key, tag-value, tag:key, type, vpn-connection-id, vpn-gateway-id

$vpn_connection = $ec2->create_vpn_connection(-type =>$type, -customer_gateway_id=>$gtwy_id, -vpn_gateway_id =>$vpn_id)

Creates a new VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ipsec.1.

Required Arguments:

 -customer_gateway_id       -- The ID of the customer gateway

 -vpn_gateway_id            -- The ID of the VPN gateway

Optional arguments: -type -- Default is the only currently available option: ipsec.1 (API 2012-06-15)

 -static_routes_only        -- Indicates whether or not the VPN connection
                               requires static routes. If you are creating a VPN
                               connection for a device that does not support
                               BGP, you must specify this value as true.

Returns a VM::EC2::VPC::VpnConnection object.

$success = $ec2->delete_vpn_connection(-vpn_connection_id=>$vpn_id)

$success = $ec2->delete_vpn_connection($vpn_id)

Deletes a VPN connection. Use this if you want to delete a VPC and all its associated components. Another reason to use this operation is if you believe the tunnel credentials for your VPN connection have been compromised. In that situation, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway using the new configuration information returned with the new VPN connection ID.

Arguments:

 -vpn_connection_id       -- The ID of the VPN connection to delete

Returns true on successful deletion.

$success = $ec2->create_vpn_connection_route(-destination_cidr_block=>$cidr, -vpn_connection_id =>$id)

Creates a new static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

Arguments:

 -destination_cidr_block     -- The CIDR block associated with the local subnet
                                 of the customer data center.

 -vpn_connection_id           -- The ID of the VPN connection.

Returns true on successsful creation.

$success = $ec2->delete_vpn_connection_route(-destination_cidr_block=>$cidr, -vpn_connection_id =>$id)

Deletes a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

Arguments:

 -destination_cidr_block     -- The CIDR block associated with the local subnet
                                 of the customer data center.

 -vpn_connection_id           -- The ID of the VPN connection.

Returns true on successsful deletion.

SEE ALSO

VM::EC2

AUTHOR

Lincoln Stein <lincoln.stein@gmail.com>.

Copyright (c) 2011 Ontario Institute for Cancer Research

This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.