Net-Amazon-Config
view release on metacpan or search on metacpan
aws_access_key_id => $profile->access_key_id,
aws_secret_access_key => $profile->secret_access_key,
);
Config Format
default = johndoe
[johndoe]
access_key_id = XXXXXXXXXXXXXXXXXXXX
secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
certificate_file = my-cert.pem
private_key_file = my-key.pem
ec2_keypair_name = my-ec2-keypair
ec2_keypair_file = ec2-private-key.pem
aws_account_id = 0123-4567-8901
canonical_user_id = <64-character string>
DESCRIPTION
This module lets you keep Amazon Web Services credentials in a
configuration file for use with different tools that need them.
USAGE
lib/Net/Amazon/Config.pm view on Meta::CPAN
aws_secret_access_key => $profile->secret_access_key,
);
=head2 Config Format
default = johndoe
[johndoe]
access_key_id = XXXXXXXXXXXXXXXXXXXX
secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
certificate_file = my-cert.pem
private_key_file = my-key.pem
ec2_keypair_name = my-ec2-keypair
ec2_keypair_file = ec2-private-key.pem
aws_account_id = 0123-4567-8901
canonical_user_id = <64-character string>
=head1 DESCRIPTION
This module lets you keep Amazon Web Services credentials in a
configuration file for use with different tools that need them.
lib/Net/Amazon/Config/Profile.pm view on Meta::CPAN
use Params::Validate ();
my @attributes;
BEGIN {
@attributes = qw(
profile_name
access_key_id
secret_access_key
certificate_file
private_key_file
ec2_keypair_name
ec2_keypair_file
cf_keypair_id
cf_private_key_file
aws_account_id
canonical_user_id
);
}
use Object::Tiny @attributes;
sub new {
my ( $class, $first, @rest ) = @_;
my @args = ref $first eq 'ARRAY' ? (@$first) : ( $first, @rest );
lib/Net/Amazon/Config/Profile.pm view on Meta::CPAN
=item *
secret_access_key -- used to sign REST requests
=item *
certificate_file -- path to a file containing identifier for SOAP requests
=item *
private_key_file -- path to a file containing the key used to sign SOAP requests
=item *
ec2_keypair_name -- the name used to identify a keypair when launching an EC2 instance
=item *
ec2_keypair_file -- the private key file used by ssh to connect to an EC2 instance
=item *
cf_keypair_id -- identifier for CloudFront requests
=item *
cf_private_key_file -- path to a file containing the key use to sign CloudFront requests
=item *
aws_account_id -- identifier to share resources (except S3)
=item *
canonical_user_id -- identifier to share resources (S3 only)
=back
t/01-Net-Amazon-Config.t view on Meta::CPAN
require_ok('Net::Amazon::Config');
my $config = new_ok('Net::Amazon::Config');
my $data = {
profile_name => 'johndoe',
access_key_id => 'XXXXXXXXXXXXXXXXXXXX',
secret_access_key => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
certificate_file => 'my-cert.pem',
private_key_file => 'my-key.pem',
ec2_keypair_name => 'my-ec2-keypair',
ec2_keypair_file => 'ec2-private-key.pem',
aws_account_id => '0123-4567-8901',
canonical_user_id => '64-character-string',
};
my $profile = $config->get_profile;
is_deeply( $profile, $data, "default profile" );
t/02-Net-Amazon-Config-Profile.t view on Meta::CPAN
plan tests => 13;
require_ok('Net::Amazon::Config::Profile');
my $data = {
profile_name => 'johndoe',
access_key_id => 'XXXXXXXXXXXXXXXXXXXX',
secret_access_key => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
certificate_file => 'my-cert.pem',
private_key_file => 'my-key.pem',
ec2_keypair_name => 'my-ec2-keypair',
ec2_keypair_file => 'ec2-private-key.pem',
aws_account_id => '0123-4567-8901',
canonical_user_id => '64-character-string',
};
my $profile = new_ok( 'Net::Amazon::Config::Profile', [%$data] );
is_deeply( $profile, $data, "default profile" );
t/data/profiles.conf view on Meta::CPAN
default = johndoe
[johndoe]
access_key_id = XXXXXXXXXXXXXXXXXXXX
secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
certificate_file = my-cert.pem
private_key_file = my-key.pem
ec2_keypair_name = my-ec2-keypair
ec2_keypair_file = ec2-private-key.pem
aws_account_id = 0123-4567-8901
canonical_user_id = 64-character-string
( run in 0.418 second using v1.01-cache-2.11-cpan-4d50c553e7e )