Michael Greb > WebService-Linode-0.28 > WebService::Linode

Download:
WebService-Linode-0.28.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.28   Source  

NAME ^

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

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/

Constructor ^

For documentation of possible arguments to the constructor, see WebService::Linode::Base.

Batch requests ^

Each of the Linode API methods below may optionally be prefixed with QUEUE_ to add that request to a queue to be processed later in one or more batch requests which can be processed by calling send_queued_requests. For example:

    my @linode_ids = () # Get your linode ids through normal methods
    my @responses = map { $api->linode_ip_list( linodeid=>$_ ) } @linode_ids;

Can be reduced to a single request:

    my @linode_ids = () # Get your linode ids through normal methods
    $api->QUEUE_linode_ip_list( linodeid=>$_ ) for @linode_ids;
    my @responses = $api->send_queued_requests; # One api request

See WebService::Linode::Base for additional queue management methods.

send_queued_requests

Send queued batch requests, returns list of responses.

Methods from the Linode API ^

account Methods

account_estimateinvoice

Estimates the invoice for adding a new Linode or NodeBalancer as well as resizing a Linode. This returns two fields: PRICE which is the estimated cost of the invoice, and INVOICE_TO which is the date invoice would be though with timezone set to America/New_York

Required Parameters:

Optional Parameters:

account_info

Shows information about your account such as the date your account was opened as well as your network utilization for the current month in gigabytes.

account_paybalance

Pays current balance on file, returning it in the response.

account_updatecard

Required Parameters:

avail Methods

avail_datacenters

Returns a list of Linode data center facilities.

avail_distributions

Returns a list of available Linux Distributions.

Optional Parameters:

avail_kernels

List available kernels.

Optional Parameters:

avail_linodeplans

Returns a structure of Linode PlanIDs containing the Plan label and the availability in each Datacenter.

Optional Parameters:

avail_nodebalancers

Returns NodeBalancer pricing information.

avail_stackscripts

Returns a list of available public StackScripts.

Optional Parameters:

domain Methods

domain_create

Create a domain record.

Required Parameters:

Optional Parameters:

domain_delete

Required Parameters:

domain_list

Lists domains you have access to.

Optional Parameters:

domain_update

Update a domain record.

Required Parameters:

Optional Parameters:

domain_resource Methods

domain_resource_create

Create a domain record.

Required Parameters:

Optional Parameters:

domain_resource_delete

Required Parameters:

domain_resource_list

Required Parameters:

Optional Parameters:

domain_resource_update

Update a domain record.

Required Parameters:

Optional Parameters:

linode Methods

linode_boot

Issues a boot job for the provided ConfigID. If no ConfigID is provided boots the last used configuration profile, or the first configuration profile if this Linode has never been booted.

Required Parameters:

Optional Parameters:

linode_clone

Creates a new Linode, assigns you full privileges, and then clones the specified LinodeID to the new Linode. There is a limit of 5 active clone operations per source Linode. It is recommended that the source Linode be powered down during the clone.

Required Parameters:

Optional Parameters:

linode_create

Creates a Linode and assigns you full privileges. There is a 75-linodes-per-hour limiter.

Required Parameters:

Optional Parameters:

linode_delete

Immediately removes a Linode from your account and issues a pro-rated credit back to your account, if applicable. To prevent accidental deletes, this requires the Linode has no Disk images. You must first delete its disk images."

Required Parameters:

Optional Parameters:

linode_list

Returns a list of all Linodes user has access or delete to, including some properties. Status values are -1: Being Created, 0: Brand New, 1: Running, and 2: Powered Off.

Optional Parameters:

linode_mutate

Upgrades a Linode to its next generation.

Required Parameters:

linode_reboot

Issues a shutdown, and then boot job for a given LinodeID.

Required Parameters:

Optional Parameters:

linode_resize

Resizes a Linode from one plan to another. Immediately shuts the Linode down, charges/credits the account, and issue a migration to another host server.

Required Parameters:

linode_shutdown

Issues a shutdown job for a given LinodeID.

Required Parameters:

linode_update

Updates a Linode's properties.

Required Parameters:

Optional Parameters:

linode_webconsoletoken

Generates a console token starting a web console LISH session for the requesting IP

Required Parameters:

linode_config Methods

linode_config_create

Creates a Linode Configuration Profile.

Required Parameters:

Optional Parameters:

linode_config_delete

Deletes a Linode Configuration Profile.

Required Parameters:

linode_config_list

Lists a Linode's Configuration Profiles.

Required Parameters:

Optional Parameters:

linode_config_update

Updates a Linode Configuration Profile.

Required Parameters:

Optional Parameters:

linode_disk Methods

linode_disk_create

Required Parameters:

Optional Parameters:

linode_disk_createfromdistribution

Required Parameters:

Optional Parameters:

linode_disk_createfromimage

Creates a new disk from a previously imagized disk.

Required Parameters:

Optional Parameters:

linode_disk_createfromstackscript

Required Parameters:

Optional Parameters:

linode_disk_delete

Required Parameters:

linode_disk_duplicate

Performs a bit-for-bit copy of a disk image.

Required Parameters:

linode_disk_imagize

Creates a gold-master image for future deployments

Required Parameters:

Optional Parameters:

linode_disk_list

Status values are 1: Ready and 2: Being Deleted.

Required Parameters:

Optional Parameters:

linode_disk_resize

Required Parameters:

linode_disk_update

Required Parameters:

Optional Parameters:

linode_ip Methods

linode_ip_addprivate

Assigns a Private IP to a Linode. Returns the IPAddressID that was added.

Required Parameters:

linode_ip_addpublic

Assigns a Public IP to a Linode. Returns the IPAddressID and IPAddress that was added.

Required Parameters:

linode_ip_list

Returns the IP addresses of all Linodes you have access to.

Optional Parameters:

linode_ip_setrdns

Sets the rDNS name of a Public IP. Returns the IPAddressID and IPAddress that were updated.

Required Parameters:

linode_ip_swap

Exchanges Public IP addresses between two Linodes within a Datacenter. The destination of the IP Address can be designated by either the toLinodeID or withIPAddressID parameter. Returns the resulting relationship of the Linode and IP Address parameters. When performing a one directional swap, the source is represented by the first of the two resultant array members.

Required Parameters:

Optional Parameters:

linode_job Methods

linode_job_list

Required Parameters:

Optional Parameters:

stackscript Methods

stackscript_create

Create a StackScript.

Required Parameters:

Optional Parameters:

stackscript_delete

Required Parameters:

stackscript_list

Lists StackScripts you have access to.

Optional Parameters:

stackscript_update

Update a StackScript.

Required Parameters:

Optional Parameters:

nodeblancer Methods

nodebalancer_config Methods

nodebalancer_config_create

Required Parameters:

Optional Parameters:

nodebalancer_config_delete

Deletes a NodeBalancer's Config

Required Parameters:

nodebalancer_config_list

Returns a list of NodeBalancers this user has access or delete to, including their properties

Required Parameters:

Optional Parameters:

nodebalancer_config_update

Updates a Config's properties

Required Parameters:

Optional Parameters:

nodebalancer_node Methods

nodebalancer_node_create

Required Parameters:

Optional Parameters:

nodebalancer_node_delete

Deletes a Node from a NodeBalancer Config

Required Parameters:

nodebalancer_node_list

Returns a list of Nodes associated with a NodeBalancer Config

Required Parameters:

Optional Parameters:

nodebalancer_node_update

Updates a Node's properties

Required Parameters:

Optional Parameters:

user Methods

user_getapikey

Authenticates a Linode Manager user against their username, password, and two-factor token (when enabled), and then returns a new API key, which can be used until it expires. The number of active keys is limited to 20.

Required Parameters:

Optional Parameters:

image Methods

image_delete

Deletes a gold-master image

Required Parameters:

image_list

Lists available gold-master images

Optional Parameters:

image_update

Update an Image record.

Required Parameters:

Optional Parameters:

professionalservices_scope Methods

professionalservices_scope_create

Creates a new Professional Services scope submission

Optional Parameters:

AUTHORS ^

COPYRIGHT & LICENSE ^

Copyright 2008-2014 Michael Greb, all rights reserved.

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

syntax highlighting: