AWS-CLIWrapper
view release on metacpan or search on metacpan
lib/AWS/CLIWrapper.pm view on Meta::CPAN
sub appfabric { shift->_execute('appfabric', @_) }
sub appflow { shift->_execute('appflow', @_) }
sub appintegrations { shift->_execute('appintegrations', @_) }
sub application_autoscaling { shift->_execute('application-autoscaling', @_) }
sub application_insights { shift->_execute('application-insights', @_) }
sub applicationcostprofiler { shift->_execute('applicationcostprofiler', @_) }
sub appmesh { shift->_execute('appmesh', @_) }
sub apprunner { shift->_execute('apprunner', @_) }
sub appstream { shift->_execute('appstream', @_) }
sub appsync { shift->_execute('appsync', @_) }
sub arc_zonal_shift { shift->_execute('arc-zonal-shift', @_) }
sub athena { shift->_execute('athena', @_) }
sub auditmanager { shift->_execute('auditmanager', @_) }
sub autoscaling { shift->_execute('autoscaling', @_) }
sub autoscaling_plans { shift->_execute('autoscaling-plans', @_) }
sub backup { shift->_execute('backup', @_) }
sub backup_gateway { shift->_execute('backup-gateway', @_) }
sub backupstorage { shift->_execute('backupstorage', @_) }
sub batch { shift->_execute('batch', @_) }
sub billingconductor { shift->_execute('billingconductor', @_) }
sub braket { shift->_execute('braket', @_) }
sub budgets { shift->_execute('budgets', @_) }
sub ce { shift->_execute('ce', @_) }
sub chime { shift->_execute('chime', @_) }
sub chime_sdk_identity { shift->_execute('chime-sdk-identity', @_) }
sub chime_sdk_media_pipelines { shift->_execute('chime-sdk-media-pipelines', @_) }
sub chime_sdk_meetings { shift->_execute('chime-sdk-meetings', @_) }
sub chime_sdk_messaging { shift->_execute('chime-sdk-messaging', @_) }
sub chime_sdk_voice { shift->_execute('chime-sdk-voice', @_) }
sub cleanrooms { shift->_execute('cleanrooms', @_) }
sub cloud9 { shift->_execute('cloud9', @_) }
sub cloudcontrol { shift->_execute('cloudcontrol', @_) }
sub clouddirectory { shift->_execute('clouddirectory', @_) }
sub cloudformation { shift->_execute('cloudformation', @_) }
sub cloudfront { shift->_execute('cloudfront', @_) }
sub cloudhsm { shift->_execute('cloudhsm', @_) }
sub cloudhsmv2 { shift->_execute('cloudhsmv2', @_) }
sub cloudsearch { shift->_execute('cloudsearch', @_) }
sub cloudsearchdomain { shift->_execute('cloudsearchdomain', @_) }
sub cloudtrail { shift->_execute('cloudtrail', @_) }
sub cloudtrail_data { shift->_execute('cloudtrail-data', @_) }
sub cloudwatch { shift->_execute('cloudwatch', @_) }
sub codeartifact { shift->_execute('codeartifact', @_) }
sub codebuild { shift->_execute('codebuild', @_) }
sub codecatalyst { shift->_execute('codecatalyst', @_) }
sub codecommit { shift->_execute('codecommit', @_) }
sub codeguru_reviewer { shift->_execute('codeguru-reviewer', @_) }
sub codeguru_security { shift->_execute('codeguru-security', @_) }
sub codeguruprofiler { shift->_execute('codeguruprofiler', @_) }
sub codepipeline { shift->_execute('codepipeline', @_) }
sub codestar { shift->_execute('codestar', @_) }
sub codestar_connections { shift->_execute('codestar-connections', @_) }
sub codestar_notifications { shift->_execute('codestar-notifications', @_) }
sub cognito_identity { shift->_execute('cognito-identity', @_) }
sub cognito_idp { shift->_execute('cognito-idp', @_) }
sub cognito_sync { shift->_execute('cognito-sync', @_) }
sub comprehend { shift->_execute('comprehend', @_) }
sub comprehendmedical { shift->_execute('comprehendmedical', @_) }
sub compute_optimizer { shift->_execute('compute-optimizer', @_) }
sub configservice { shift->_execute('configservice', @_) }
sub configure { shift->_execute('configure', @_) }
sub connect { shift->_execute('connect', @_) }
sub connect_contact_lens { shift->_execute('connect-contact-lens', @_) }
sub connectcampaigns { shift->_execute('connectcampaigns', @_) }
sub connectcases { shift->_execute('connectcases', @_) }
sub connectparticipant { shift->_execute('connectparticipant', @_) }
sub controltower { shift->_execute('controltower', @_) }
sub cur { shift->_execute('cur', @_) }
sub customer_profiles { shift->_execute('customer-profiles', @_) }
sub databrew { shift->_execute('databrew', @_) }
sub dataexchange { shift->_execute('dataexchange', @_) }
sub datapipeline { shift->_execute('datapipeline', @_) }
sub datasync { shift->_execute('datasync', @_) }
sub dax { shift->_execute('dax', @_) }
sub deploy { shift->_execute('deploy', @_) }
sub detective { shift->_execute('detective', @_) }
sub devicefarm { shift->_execute('devicefarm', @_) }
sub devops_guru { shift->_execute('devops-guru', @_) }
sub directconnect { shift->_execute('directconnect', @_) }
sub discovery { shift->_execute('discovery', @_) }
sub dlm { shift->_execute('dlm', @_) }
sub dms { shift->_execute('dms', @_) }
sub docdb { shift->_execute('docdb', @_) }
sub docdb_elastic { shift->_execute('docdb-elastic', @_) }
sub drs { shift->_execute('drs', @_) }
sub ds { shift->_execute('ds', @_) }
sub dynamodb { shift->_execute('dynamodb', @_) }
sub dynamodbstreams { shift->_execute('dynamodbstreams', @_) }
sub ebs { shift->_execute('ebs', @_) }
sub ec2 { shift->_execute('ec2', @_) }
sub ec2_instance_connect { shift->_execute('ec2-instance-connect', @_) }
sub ecr { shift->_execute('ecr', @_) }
sub ecr_public { shift->_execute('ecr-public', @_) }
sub ecs { shift->_execute('ecs', @_) }
sub efs { shift->_execute('efs', @_) }
sub eks { shift->_execute('eks', @_) }
sub elastic_inference { shift->_execute('elastic-inference', @_) }
sub elasticache { shift->_execute('elasticache', @_) }
sub elasticbeanstalk { shift->_execute('elasticbeanstalk', @_) }
sub elastictranscoder { shift->_execute('elastictranscoder', @_) }
sub elb { shift->_execute('elb', @_) }
sub elbv2 { shift->_execute('elbv2', @_) }
sub emr { shift->_execute('emr', @_) }
sub emr_containers { shift->_execute('emr-containers', @_) }
sub emr_serverless { shift->_execute('emr-serverless', @_) }
sub es { shift->_execute('es', @_) }
sub events { shift->_execute('events', @_) }
sub evidently { shift->_execute('evidently', @_) }
sub finspace { shift->_execute('finspace', @_) }
sub finspace_data { shift->_execute('finspace-data', @_) }
sub firehose { shift->_execute('firehose', @_) }
sub fis { shift->_execute('fis', @_) }
sub fms { shift->_execute('fms', @_) }
sub forecast { shift->_execute('forecast', @_) }
sub forecastquery { shift->_execute('forecastquery', @_) }
sub frauddetector { shift->_execute('frauddetector', @_) }
sub fsx { shift->_execute('fsx', @_) }
sub gamelift { shift->_execute('gamelift', @_) }
sub gamesparks { shift->_execute('gamesparks', @_) }
sub glacier { shift->_execute('glacier', @_) }
sub globalaccelerator { shift->_execute('globalaccelerator', @_) }
lib/AWS/CLIWrapper.pm view on Meta::CPAN
=item B<cloud9>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudcontrol>($operation:Str, $param:HashRef, %opt:Hash)
=item B<clouddirectory>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudformation>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudfront>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudhsm>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudhsmv2>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudsearch>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudsearchdomain>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudtrail>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudtrail_data>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cloudwatch>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codeartifact>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codebuild>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codecatalyst>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codecommit>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codeguru_reviewer>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codeguru_security>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codeguruprofiler>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codepipeline>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codestar>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codestar_connections>($operation:Str, $param:HashRef, %opt:Hash)
=item B<codestar_notifications>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cognito_identity>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cognito_idp>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cognito_sync>($operation:Str, $param:HashRef, %opt:Hash)
=item B<comprehend>($operation:Str, $param:HashRef, %opt:Hash)
=item B<comprehendmedical>($operation:Str, $param:HashRef, %opt:Hash)
=item B<compute_optimizer>($operation:Str, $param:HashRef, %opt:Hash)
=item B<configservice>($operation:Str, $param:HashRef, %opt:Hash)
=item B<configure>($operation:Str, $param:HashRef, %opt:Hash)
=item B<connect>($operation:Str, $param:HashRef, %opt:Hash)
=item B<connect_contact_lens>($operation:Str, $param:HashRef, %opt:Hash)
=item B<connectcampaigns>($operation:Str, $param:HashRef, %opt:Hash)
=item B<connectcases>($operation:Str, $param:HashRef, %opt:Hash)
=item B<connectparticipant>($operation:Str, $param:HashRef, %opt:Hash)
=item B<controltower>($operation:Str, $param:HashRef, %opt:Hash)
=item B<cur>($operation:Str, $param:HashRef, %opt:Hash)
=item B<customer_profiles>($operation:Str, $param:HashRef, %opt:Hash)
=item B<databrew>($operation:Str, $param:HashRef, %opt:Hash)
=item B<dataexchange>($operation:Str, $param:HashRef, %opt:Hash)
=item B<datapipeline>($operation:Str, $param:HashRef, %opt:Hash)
=item B<datasync>($operation:Str, $param:HashRef, %opt:Hash)
=item B<dax>($operation:Str, $param:HashRef, %opt:Hash)
=item B<deploy>($operation:Str, $param:HashRef, %opt:Hash)
=item B<detective>($operation:Str, $param:HashRef, %opt:Hash)
=item B<devicefarm>($operation:Str, $param:HashRef, %opt:Hash)
=item B<devops_guru>($operation:Str, $param:HashRef, %opt:Hash)
=item B<directconnect>($operation:Str, $param:HashRef, %opt:Hash)
=item B<discovery>($operation:Str, $param:HashRef, %opt:Hash)
=item B<dlm>($operation:Str, $param:HashRef, %opt:Hash)
=item B<dms>($operation:Str, $param:HashRef, %opt:Hash)
=item B<docdb>($operation:Str, $param:HashRef, %opt:Hash)
=item B<docdb_elastic>($operation:Str, $param:HashRef, %opt:Hash)
=item B<drs>($operation:Str, $param:HashRef, %opt:Hash)
=item B<ds>($operation:Str, $param:HashRef, %opt:Hash)
=item B<dynamodb>($operation:Str, $param:HashRef, %opt:Hash)
=item B<dynamodbstreams>($operation:Str, $param:HashRef, %opt:Hash)
=item B<ebs>($operation:Str, $param:HashRef, %opt:Hash)
=item B<ec2>($operation:Str, $param:HashRef, %opt:Hash)
=item B<ec2_instance_connect>($operation:Str, $param:HashRef, %opt:Hash)
lib/AWS/CLIWrapper.pm view on Meta::CPAN
=item HOME: used by default by /usr/bin/aws utility to find it's credentials (if none are specified)
Special note: cron on Linux will often have a different HOME "/" instead of "/root" - set $ENV{'HOME'}
to use the default credentials or specify $ENV{'AWS_CONFIG_FILE'} directly.
=item AWS_CLIWRAPPER_TIMEOUT
If this variable is set, this value will be used instead of default timeout (30 seconds) for every
invocation of `aws-cli` that does not have a timeout value provided in the options argument of the
called function.
=item AWS_CLIWRAPPER_CATCH_ERROR_PATTERN
If this variable is set, AWS::CLIWrapper will retry `aws-cli` execution if stdout output
of failed `aws-cli` command matches the pattern. See L<ERROR HANDLING>.
=item AWS_CLIWRAPPER_CATCH_ERROR_RETRIES
How many times to retry command execution if an error was caught. Default is 3.
=item AWS_CLIWRAPPER_CATCH_ERROR_MIN_DELAY
Minimal delay before retrying command execution if an error was caught, in seconds.
Default is 3.
=item AWS_CLIWRAPPER_CATCH_ERROR_MAX_DELAY
Maximal delay before retrying command execution, in seconds. Default is 10.
=item AWS_CONFIG_FILE
=item AWS_ACCESS_KEY_ID
=item AWS_SECRET_ACCESS_KEY
=item AWS_DEFAULT_REGION
See documents of aws-cli.
=back
=head1 ERROR HANDLING
=over 4
By default, when `aws-cli` exits with an error code (> 0), AWS::CLIWrapper will set
the error code and message to $AWS::CLIWrapper::Error (and optionally croak), thus
relaying the error to calling code. While this approach is beneficial 99% of the time,
in some use cases `aws-cli` execution fails for a temporary reason unrelated to
both calling code and AWS::CLIWrapper, and can be safely retried after a short delay.
One of this use cases is executing `aws-cli` on AWS EC2 instances, where `aws-cli`
retrieves its configuration and credentials from the API exposed to the EC2 instance;
at certain times these credentials may be rotated and calling `aws-cli` at exactly
the right moment will cause it to fail with `Unable to locate credentials` error.
To prevent this kind of errors from failing the calling code, AWS::CLIWrapper allows
configuring an RegExp pattern and retry `aws-cli` execution if it fails with an error
matching the configured pattern.
The error catching pattern, as well as other configuration, can be defined either
as AWS::CLIWrapper options in the code, or as respective environment variables
(see L<ENVIRONMENT>).
The actual delay before retrying a failed `aws-cli` execution is computed as a
random value of seconds between catch_error_min_delay (default 3) and catch_error_max_delay
(default 10). Backoff is not supported at this moment.
=back
=head1 AUTHOR
HIROSE Masaaki E<lt>hirose31 _at_ gmail.comE<gt>
=head1 REPOSITORY
L<https://github.com/hirose31/AWS-CLIWrapper>
git clone git://github.com/hirose31/AWS-CLIWrapper.git
patches and collaborators are welcome.
=head1 SEE ALSO
L<http://aws.amazon.com/cli/>,
L<https://github.com/aws/aws-cli>,
L<http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html>,
L<https://github.com/boto/botocore>,
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
# for Emacsen
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# indent-tabs-mode: nil
# coding: utf-8
# End:
# vi: set ts=4 sw=4 sts=0 et ft=perl fenc=utf-8 ff=unix :
( run in 1.563 second using v1.01-cache-2.11-cpan-39bf76dae61 )