NAME

WebService::Linode - Perl Interface to the Linode.com API.

VERSION

Version 0.09

SYNOPSIS

my $api = WebService::Linode->new( apikey => 'your api key here');
print Dumper($api->linode_list);
$api->linode_reboot(linodeid=>242);

This module implements the Linode.com api methods. Linode methods have had dots replaced with underscores to generate the perl method name. All keys and parameters have been lower cased but returned data remains otherwise the same. For additional information see http://www.linode.com/api/autodoc.cfm

Methods from the Linode API

avail_stackscripts

Required Parameters:

Optional Parameters:

  • keywords

  • distributionid

  • distributionvendor

avail_kernels

Required Parameters:

Optional Parameters:

  • isxen

  • kernelid

avail_linodeplans

Required Parameters:

  • planid

Optional Parameters:

avail_datacenters

Required Parameters:

Optional Parameters:

avail_distributions

Required Parameters:

Optional Parameters:

  • distributionid

domain_create

Required Parameters:

  • domain

  • type

Optional Parameters:

  • status

  • ttl_sec

  • expire_sec

  • refresh_sec

  • master_ips

  • soa_email

  • retry_sec

  • axfr_ips

  • description

domain_delete

Required Parameters:

  • domainid

Optional Parameters:

domain_update

Required Parameters:

  • domainid

Optional Parameters:

  • status

  • domain

  • ttl_sec

  • expire_sec

  • type

  • refresh_sec

  • master_ips

  • soa_email

  • axfr_ips

  • retry_sec

  • description

domain_list

Required Parameters:

Optional Parameters:

  • domainid

domain_resource_create

Required Parameters:

Optional Parameters:

  • target

  • ttl_sec

  • protocol

  • priority

  • port

  • weight

  • name

domain_resource_delete

Required Parameters:

  • resourceid

  • domainid

Optional Parameters:

domain_resource_update

Required Parameters:

  • resourceid

  • domainid

Optional Parameters:

  • target

  • ttl_sec

  • port

  • weight

  • priority

  • protocol

  • name

domain_resource_list

Required Parameters:

  • domainid

Optional Parameters:

  • resourceid

linode_create

Required Parameters:

  • planid

  • label

  • paymentterm

  • datacenterid

Optional Parameters:

  • alert_bwquota_threshold

  • alert_bwin_threshold

  • alert_cpu_threshold

  • lpm_displaygroup

  • alert_bwin_enabled

  • backupwindow

  • alert_cpu_enabled

  • backupweeklyday

  • alert_diskio_enabled

  • alert_bwquota_enabled

  • watchdog

  • alert_bwout_enabled

  • alert_bwout_threshold

  • alert_diskio_threshold

linode_resize

Required Parameters:

  • planid

  • linodeid

Optional Parameters:

linode_reboot

Required Parameters:

  • linodeid

Optional Parameters:

  • configid

linode_boot

Required Parameters:

  • linodeid

Optional Parameters:

  • configid

linode_clone

Required Parameters:

  • planid

  • paymentterm

  • linodeid

  • datacenterid

Optional Parameters:

linode_shutdown

Required Parameters:

  • linodeid

Optional Parameters:

linode_delete

Required Parameters:

  • linodeid

Optional Parameters:

  • skipchecks

linode_update

Required Parameters:

  • linodeid

Optional Parameters:

  • alert_bwquota_threshold

  • alert_bwin_threshold

  • alert_cpu_threshold

  • alert_cpu_enabled

  • alert_diskio_enabled

  • label

  • backupweeklyday

  • alert_bwquota_enabled

  • watchdog

  • lpm_displaygroup

  • alert_bwin_enabled

  • alert_bwout_enabled

  • alert_bwout_threshold

  • alert_diskio_threshold

  • backupwindow

linode_list

Required Parameters:

Optional Parameters:

  • linodeid

linode_config_create

Required Parameters:

  • label

  • kernelid

Optional Parameters:

  • comments

  • helper_xen

  • devtmpfs_automount

  • rootdevicecustom

  • rootdevicero

  • helper_depmod

  • helper_disableupdatedb

  • disklist

  • runlevel

  • rootdevicenum

  • ramlimit

linode_config_delete

Required Parameters:

  • configid

  • linodeid

Optional Parameters:

linode_config_update

Required Parameters:

  • configid

  • linodeid

Optional Parameters:

  • comments

  • helper_xen

  • devtmpfs_automount

  • rootdevicecustom

  • rootdevicero

  • label

  • helper_depmod

  • helper_disableupdatedb

  • rootdevicenum

  • disklist

  • runlevel

  • kernelid

  • ramlimit

linode_config_list

Required Parameters:

  • linodeid

Optional Parameters:

  • configid

linode_disk_create

Required Parameters:

  • linodeid

  • label

Optional Parameters:

  • isreadonly

linode_disk_resize

Required Parameters:

  • diskid

  • linodeid

  • size

Optional Parameters:

linode_disk_createfromdistribution

Required Parameters:

  • size

  • linodeid

  • rootpass

  • distributionid

  • label

Optional Parameters:

  • rootsshkey

linode_disk_duplicate

Required Parameters:

  • diskid

  • linodeid

Optional Parameters:

linode_disk_delete

Required Parameters:

  • diskid

  • linodeid

Optional Parameters:

linode_disk_update

Required Parameters:

  • diskid

  • linodeid

Optional Parameters:

  • label

  • isreadonly

linode_disk_list

Required Parameters:

  • linodeid

Optional Parameters:

  • diskid

linode_disk_createfromstackscript

Required Parameters:

  • size

  • linodeid

  • rootpass

  • distributionid

  • stackscriptudfresponses

  • stackscriptid

  • label

Optional Parameters:

linode_ip_addprivate

Required Parameters:

  • linodeid

Optional Parameters:

linode_ip_list

Required Parameters:

  • linodeid

Optional Parameters:

  • ipaddressid

linode_job_list

Required Parameters:

  • linodeid

Optional Parameters:

  • pendingonly

  • jobid

stackscript_create

Required Parameters:

  • script

  • label

  • distributionidlist

Optional Parameters:

  • rev_note

  • ispublic

  • description

stackscript_delete

Required Parameters:

  • stackscriptid

Optional Parameters:

stackscript_update

Required Parameters:

  • stackscriptid

Optional Parameters:

  • script

  • rev_note

  • ispublic

  • label

  • description

  • distributionidlist

stackscript_list

Required Parameters:

Optional Parameters:

  • stackscriptid

Additional Helper Methods

getDomainIDbyName( domain => 'example.com' )

Returns the ID for a domain given the name.

getDomainResourceIDbyName( domainid => 242, name => 'www')

Takes a record name and domainid or domain and returns the resourceid.

AUTHORS

  • Michael Greb, <mgreb@linode.com>

  • Stan "The Man" Schwertly <stan@linode.com>

BUGS

This module does not yet support the Linode API batch method, patches welcome.

Please report any bugs or feature requests to bug-webservice-linode at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Linode. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WebService::Linode

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2008-2009 Linode, LLC, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.