Net::RackSpace::CloudServers::Limits - a RackSpace CloudServers Limits instance
version 0.15
use Net::RackSpace::CloudServers; use Net::RackSpace::CloudServers::Limits; my $cs = Net::RackSpace::CloudServers->new( user => $ENV{CLOUDSERVERS_USER}, key => $ENV{CLOUDSERVERS_KEY}, ); my $limits = Net::RackSpace::CloudServers::Limits->new( cloudservers => $cs, ); $limits->refresh(); print "Can still allocate ", $limits->totalramsize, " MB RAM\n"; print "Can still use ", $limits->maxipgroups, " IP Groups\n"; print "Can have ", $limits->maxipgroupmembers, " more IP groups members\n"; # next bit isn't OO-ed yet. foreach my $k ( @{ $limits->rate } ) { print $k->{verb}, ' to URI ', $k->{URI}, ' remaining: ', $k->{remaining}, ' per ', $k->{unit}, ' (will be reset at: ', scalar localtime $k->{resetTime}, ')', "\n"; }
The constructor creates a Limits half-object. See refresh to refresh the limits once gathered.
This normally gets created for you by Net::RackSpace::Cloudserver's limits method. Needs a Net::RackSpace::CloudServers object as cloudserver parameter.
This method refreshes the information contained in the object
Indicates the maximum amount of RAM (in megabytes) linked to your account.
Indicates the maximum number of shared IP groups your account can create
Indicates the maximum amount of servers that can be associated with any one shared IP group
TODO: not yet OO-ified.
Is an arrayref of the rate-limits that currently apply to your account via the API. You'll receive 413 errors in case you exceed the limits described.
Marco Fontani, <mfontani at cpan.org>
<mfontani at cpan.org>
Please report any bugs or feature requests to bug-net-rackspace-cloudservers at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-RackSpace-CloudServers. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-rackspace-cloudservers at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::RackSpace::CloudServers::Limits
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-RackSpace-CloudServers
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-RackSpace-CloudServers
CPAN Ratings
http://cpanratings.perl.org/d/Net-RackSpace-CloudServers
Search CPAN
http://search.cpan.org/dist/Net-RackSpace-CloudServers/
Copyright 2009 Marco Fontani, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::RackSpace::CloudServers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::RackSpace::CloudServers
CPAN shell
perl -MCPAN -e shell install Net::RackSpace::CloudServers
For more information on module installation, please visit the detailed CPAN module installation guide.