# Generated by Pod::WikiDoc version 0.18

=pod

=head1 NAME

Net::Amazon::Config - Manage Amazon Web Services credentials

=head1 VERSION

This documentation describes version 0.001.

=head1 SYNOPSIS

=head2 Example

     use Net::Amazon::Config;
 
     # default location and profile
     my $profile = Net::Amazon::Config->new->get_profile;
 
     # use access key ID and secret access key with S3 
     use Net::Amazon::S3;
     my $s3 = Net::Amazon::S3->new(
       aws_access_key_id     => $profile->access_key_id,
       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.

=head1 USAGE

=head2 new() 

   my $config = Net::Amazon::Config->new( %params );

Valid C<<< %params >>> entries include:

=over

=item *

config_dir -- directory containing the config file
(and the default location for other files named in the config file).  
Defaults to C<<< $HOME/.amazon >>>

=item *

config_file -- defaults to C<<< profiles.conf >>>

=back

Returns an object or undef if no config file can be found.

=head2 config_path()

   my $path = $config->config_path;

Returns the absolute path to the configuration file.

=head2 get_profile()

   my $profile = $config->get_profile( $name );

If C<<< $name >>> is omitted or undefined, returns the profile named in the
top-level key C<<< default >>> in the config file. If the profile does not
exist, get profile returns undef or an empty list.

=head1 ENVIRONMENT

=over

=item *

NET_AMAZON_CONFIG -- absolute path to config file or file name relative
to the configuration directory

=item *

NET_AMAZON_CONFIG_DIR -- configuration directory 

=back

=head1 BUGS

Please report any bugs or feature requests using the CPAN Request Tracker  
web interface at L<http://rt.cpan.org/Dist/Display.html?Queue=Net-Amazon-Config>

When submitting a bug or request, please include a test-file or a patch to an
existing test-file that illustrates the bug or desired feature.

=head1 SEE ALSO

=over

=item *

About AWS Security Credentials: http:E<sol>E<sol>tinyurl.comE<sol>yh93cjg

=back

=head1 AUTHOR

David A. Golden (DAGOLDEN)

=head1 COPYRIGHT AND LICENSE

Copyright (c) 2010 by David A. 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:E<sol>E<sol>www.apache.orgE<sol>licensesE<sol>LICENSE-2.0

Files produced as output though the use of this software, shall not be
considered Derivative Works, but shall be considered the original work of the
Licensor.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


