Name

API::Vultr

Synopsis

A simple, and inuitive interface to the Vultr Api using LWP::UserAgent.

This does not cover the entire Vultr API, but instead intends to be very extendible allowing for easy contributions. Basically, I have what I need, if you need more feel free to add it!

Example

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;
}

API

ua

Set, or get the LWP::UserAgent associated API::Vultr instance.

api_key

Set, or get the Vultr API key associated with the API::Vultr instance.

get_account_info

Retrieve the account information associated with your API key.

Vultr API Reference

get_applications

Retrieve applications associated with your API key.

Vultr API Reference

get_backups

Get a list of all backups associated with your API key.

Vultr API Reference

get_backup_by_id

Get information on a specific backup by its id.

Vultr API Reference

list_instances

Get a list of all instances associated with your API key.

Vultr API Reference

create_instance

Create a Vultr instance.

Vultr API Reference

get_instance_by_id

Find an instance by its id.

Vultr API Reference

delete_instance_by_id

Delete an instance by its id.

Vultr API Reference

halt_instances

Halt a list of instances by their ids.

Vultr API Reference

reboot_instances

Reboot a list of instances by their ids.

Vultr API Reference

start_instances

Reboot a list of instances by their ids.

Vultr API Reference

get_instance_bandwidth

Get the remaining bandwidth of a given instance.

Vultr API Reference

get_instance_neighbours

Get a list of instances in the same location as the specified instance.

Vultr API Reference

get_instance_iso_status

Get the ISO status for an instance.

Vultr API Reference

detach_iso_from_instance

Detach an ISO from a specified instance.

Vultr API Reference

attach_iso_to_instance

Attach an ISO to a specified instance.

Vultr API Reference