-
-
22 Jan 2017 22:53:32 UTC
- Distribution: Net-Amazon-DirectConnect
- Module version: 0.13
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (563 / 0 / 36)
- Kwalitee
Bus factor: 0- 24.85% Coverage
- License: open_source
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (6.37KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Cameron Daniel
- Dependencies
- JSON
- LWP::UserAgent
- Net::Amazon::Signature::V4
- YAML::Tiny
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Net::Amazon::DirectConnect - Perl interface to the Amazon DirectConnect API
VERSION
Version 0.13 DirectConnect API version 2012-10-25
SYNOPSIS
use Net::Amazon::DirectConnect; my $dc = Net::Amazon::DirectConnect->new( region => 'ap-southeast-2', access_key_id => 'access key', secret_key_id => 'secret key' ); ...
SUBROUTINES/METHODS
new
use Net::Amazon::DirectConnect; my $dc = Net::Amazon::DirectConnect->new( region => 'ap-southeast-2', access_key_id => 'access key', secret_key_id => 'secret key' ); ...
action
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}"; } }
ua
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);
spec
Get or set YAML::Tiny object
say ref($dc->spec); $dc->spec(YAML::Tiny->read('new-spec.yml'));
region
Get or set AWS region
$dc->region('ap-southeast-2'); say $dc->region;
credentials
Set AWS credentials
$dc->credentials( access_key_id => 'MY_ACCESS_KEY', secret_key_id => 'MY_SECRET_KEY' );
Internal subroutines
_request
Build and sign HTTP::Request object, return if successful or croak if error
_validate
Validate the method and required arguments against the current version of the Direct Connect API (2012-10-25)
AUTHOR
Cameron Daniel,
<cameron.daniel at megaport.com>
SUPPORT
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
Module Install Instructions
To install Net::Amazon::DirectConnect, copy and paste the appropriate command in to your terminal.
cpanm Net::Amazon::DirectConnect
perl -MCPAN -e shell install Net::Amazon::DirectConnect
For more information on module installation, please visit the detailed CPAN module installation guide.