Net::Amazon::Config::Profile
# Copyright (c) 2010 by David Golden. All rights reserved.
# Licensed under Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License was distributed with this file or you may obtain a
# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
package Net::Amazon::Config::Profile;
use strict;
use warnings;
use Params::Validate ();
our $VERSION = '0.001';
$VERSION = eval $VERSION; ## no critic
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);
my %args = Params::Validate::validate(@args, { map { $_ => 0 } @attributes });
return bless \%args, $class;
}
1;
__END__