Net::Amazon::DirectConnect - Perl interface to the Amazon DirectConnect API
Version 0.13 DirectConnect API version 2012-10-25
use Net::Amazon::DirectConnect; my $dc = Net::Amazon::DirectConnect->new( region => 'ap-southeast-2', access_key_id => 'access key', secret_key_id => 'secret key' ); ...
Perform action against the Amazon Direct Connect API. Actions are validated against an embedded copy of DirectConnect-2012-10-25.yml for correctness before the call is made.
# List connections my $connections = $dc->action('DescribeConnections'); foreach my $dxcon (@{$connections->{connections}}) { say "$dxcon->{connectionId} -> $dxcon->{connectionName}"; # List Virtual Interfaces my $virtual_interfaces = $dc->action('DescribeVirtualInterfaces', connectionId => $dxcon->{connectionId}); foreach my $vif (@{$virtual_interfaces->{virtualInterfaces}}) { say " $vif->{connectionId}"; } }
Get or set UserAgent object
say ref($dc->ua); my $ua = my $lwp = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } ); $ua->proxy('https', 'http://127.0.0.1:8080'); $dc->ua($ua);
Get or set YAML::Tiny object
say ref($dc->spec); $dc->spec(YAML::Tiny->read('new-spec.yml'));
Get or set AWS region
$dc->region('ap-southeast-2'); say $dc->region;
Set AWS credentials
$dc->credentials( access_key_id => 'MY_ACCESS_KEY', secret_key_id => 'MY_SECRET_KEY' );
Build and sign HTTP::Request object, return if successful or croak if error
Validate the method and required arguments against the current version of the Direct Connect API (2012-10-25)
Cameron Daniel, <cameron.daniel at megaport.com>
<cameron.daniel at megaport.com>
You can find documentation for this module with the perldoc command or at https://github.com/megaport/p5-net-amazon-directconnect/
perldoc Net::Amazon::DirectConnect
To install Net::Amazon::DirectConnect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Amazon::DirectConnect
CPAN shell
perl -MCPAN -e shell install Net::Amazon::DirectConnect
For more information on module installation, please visit the detailed CPAN module installation guide.