Skip to content

rawleyfowler/API-Vultr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API::Vultr

A simple Perl interface to the Vultr API, using LWP::UserAgent.

Example

Please read the POD associated with API::Vultr, and the Vultr API to get a better understanding of all of the available methods.

use API::Vultr;
use Data::Dumper qw(Dumper);

my $vultr_api = API::Vultr->new(api_key => $ENV{VULTR_API_KEY});

my $create_response = $vultr_api->create_instance(
    region => 'ewr',
    plan => 'vc2-6c-16gb',
    label => 'My Instance',
    os_id => 215,
    user_data => 'QmFzZTY4EVsw32WfsGGHsjKJI',
    backups => 'enabled',
    hostname => 'hostname'
);

if ($create_response->is_success) {
    print Dumper($create_response->decoded_content);
}
else {
    die $create_response->status_line;
}

License

This project is licensed under the Artistic 2.0 license. Please read the LICENSE file at the root of the project for more information on what that means.

About

A LWP::UserAgent interface to the Vultr api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages