WebSer...Linode(3pm)
β¨ okay so bestie, welcome to WebSer...Linode(3pm) β straight outta User Contributed Perl Documentation β¨
π NAME π
WebService::Linode β Perl Interface to the Linode.com API. periodt.
π SYNOPSIS π
my $api = WebService::Linode->new( apikey => 'your api key here');
print Dumper($api->linode_list);
$api->linode_reboot(linodeid=>242);
okay so this module literally implements the Linode.com api methods. The way that Linode methods work: dots get swapped for underscores to make the perl method name. Every key and parameter is lower cased, but the returned data stays otherwise the same. Wanna know more? 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:
modeβ This is one of the following options:'linode_new','linode_resize', or'nodebalancer_new'.
Optional Parameters:
paymenttermβ Subscription term in months. One of:1,12, or24. This is required for modes'linode_new'and'nodebalancer_new'.planidβ The desired PlanID available fromavail.LinodePlans(). This is required for modes'linode_new'and'linode_resize'.linodeidβ This is the LinodeID you want to resize and is required for mode'linode_resize'.
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:
ccnumberccexpyearccexpmonth
avail Methods
avail_datacenters
Returns a list of Linode data center facilities.
avail_distributions
Returns a list of available Linux Distributions.
Optional Parameters:
distributionidβ Limits the results to the specified DistributionID
avail_kernels
List available kernels.
Optional Parameters:
iskvmβ Show or hide KVM compatible kernelsisxenβ Show or hide Xen compatible kernels
avail_linodeplans
Returns a structure of Linode PlanIDs containing the Plan label and the availability in each Datacenter.
Optional Parameters:
planidβ Limits the list to the specified PlanID
avail_nodebalancers
Returns NodeBalancer pricing information.
avail_stackscripts
Returns a list of available public StackScripts.
Optional Parameters:
keywordsβ Search termsdistributionvendorβ Debian, Ubuntu, Fedora, etc.distributionidβ Limit the results to StackScripts that can be applied to this DistributionID
domain Methods
domain_create
Create a domain record.
Required Parameters:
typeβmasterorslavedomainβ The zone's name
Optional Parameters:
lpm_displaygroupβ Display group in the Domain list inside the Linode DNS Managersoa_emailβ Required whentype=masterdescriptionβ Currently undisplayed.retry_secstatusβ0,1, or2(disabled, active, edit mode)axfr_ipsβ IP addresses allowed to AXFR the entire zone, semicolon separatedrefresh_secexpire_secmaster_ipsβ Whentype=slave, the zone's master DNS servers list, semicolon separatedttl_sec
domain_delete
Required Parameters:
domainid
domain_list
Lists domains you have access to.
Optional Parameters:
domainidβ Limits the list to the specified DomainID
domain_update
Update a domain record.
Required Parameters:
domainid
Optional Parameters:
ttl_secmaster_ipsβ Whentype=slave, the zone's master DNS servers list, semicolon separatedexpire_secrefresh_secaxfr_ipsβ IP addresses allowed to AXFR the entire zone, semicolon separateddomainβ The zone's namestatusβ0,1, or2(disabled, active, edit mode)retry_secsoa_emailβ Required whentype=masterdescriptionβ Currently undisplayed.lpm_displaygroupβ Display group in the Domain list inside the Linode DNS Managertypeβmasterorslave
domain_resource Methods
domain_resource_create
Create a domain record.
Required Parameters:
domainidtypeβ One of:NS,MX,A,AAAA,CNAME,TXT,SRVorCAA
Optional Parameters:
ttl_secβ TTL. Leave as0to accept our default.protocolβ The protocol to append to an SRV record. Ignored on other record types.portnameβ The hostname or FQDN. WhenType=MXthe subdomain to delegate to the Target MX server.tagβ The tag attribute for a CAA record. One ofissue,issuewild,iodef. Ignored on other record types.targetβ WhenType=MXthe hostname. WhenType=CNAMEthe target of the alias. WhenType=TXTorCAAthe value of the record. WhenType=AorAAAAthe token of'[remote_addr]'will be substituted with the IP address of the request.priorityβ Priority for MX and SRV records,0-65535weight
domain_resource_delete
Required Parameters:
domainidresourceid
domain_resource_list
Required Parameters:
domainid
Optional Parameters:
resourceid
domain_resource_update
Update a domain record.
Required Parameters:
resourceid
Optional Parameters:
porttagβ The tag attribute for a CAA record. One ofissue,issuewild,iodef. Ignored on other record types.targetβ WhenType=MXthe hostname. WhenType=CNAMEthe target of the alias. WhenType=TXTorCAAthe value of the record. WhenType=AorAAAAthe token of'[remote_addr]'will be substituted with the IP address of the request.domainidnameβ The hostname or FQDN. WhenType=MXthe subdomain to delegate to the Target MX server.protocolβ The protocol to append to an SRV record. Ignored on other record types.ttl_secβ TTL. Leave as0to accept our default.priorityβ Priority for MX and SRV records,0-65535weight
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:
linodeid
Optional Parameters:
configidβ The ConfigID to boot, available fromlinode.config.list().
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:
linodeidβ The LinodeID that you want clonedplanidβ The desired PlanID available fromavail.LinodePlans()datacenteridβ The DatacenterID fromavail.datacenters()where you wish to place this new Linode
Optional Parameters:
paymenttermβ Subscription term in months for prepaid customers. One of:1,12, or24
linode_create
Creates a Linode and assigns you full privileges. There is a 250-linodes-per-hour limiter.
Required Parameters:
datacenteridβ The DatacenterID fromavail.datacenters()where you wish to place this new Linodeplanidβ The desired PlanID available fromavail.LinodePlans()
Optional Parameters:
paymenttermβ Subscription term in months for prepaid customers. One of:1,12, or24
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:
linodeidβ The LinodeID to delete
Optional Parameters:
skipchecksβ Skips the safety checks and will always delete the Linode
linode_kvmify
Changes a Linode's hypervisor from Xen to KVM.
Required Parameters:
linodeidβ The LinodeID to migrate to KVM.
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:
linodeidβ Limits the list to the specified LinodeID
linode_mutate
Upgrades a Linode to its next generation.
Required Parameters:
linodeid
linode_reboot
Issues a shutdown, and then boot job for a given LinodeID.
Required Parameters:
linodeid
Optional Parameters:
configid
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:
linodeidplanidβ The desired PlanID available fromavail.LinodePlans()
linode_shutdown π€
Issues a shutdown job for a given LinodeID.
Required Parameters:
linodeid
linode_update β¨
Updates a Linode's properties. Glow-up time, bestie π
Required Parameters:
linodeid
Optional Parameters:
labelβ This Linode's labelalert_bwquota_enabledβ Enable the bw quote email alertms_ssh_portms_ssh_ipms_ssh_disabledalert_bwout_thresholdβ Mb/secalert_diskio_thresholdβ IO ops/secbackupweeklydayalert_cpu_enabledβ Enable the cpu usage email alertalert_bwquota_thresholdβ Percentage of monthly bw quotabackupwindowlpm_displaygroupβ Display group in the Linode list inside the Linode Manageralert_diskio_enabledβ Enable the disk IO email alertalert_cpu_thresholdβ CPU Alert threshold, percentage 0-800alert_bwin_thresholdβ Mb/secwatchdogβ Enable the Lassie shutdown watchdogalert_bwout_enabledβ Enable the outgoing bandwidth email alertms_ssh_useralert_bwin_enabledβ Enable the incoming bandwidth email alert
linode_webconsoletoken π₯οΈβ¨
Generates a console token starting a web console LISH session for the requesting IP. It's giving main character energy, fr fr π
Required Parameters:
linodeid
π linode_config Methods π
linode_config_create π
Creates a Linode Configuration Profile. New profile just dropped π
Required Parameters:
kernelidβ The KernelID for this profile. Found inavail.kernels()labelβ The Label for this profilelinodeiddisklistβ A comma delimited list ofDiskIDs; position reflects device node. The 9th element for specifying the initrd.
Optional Parameters:
helper_depmodβ Creates an empty modprobe file for the kernel you're booting.helper_networkβ Automatically creates network configuration files for your distro and places them into your filesystem.runlevelβ One of'default','single','binbash'rootdevicecustomβ A custom root device setting.rootdevicenumβ Which device number (1-8) that contains the root partition. 0 to utilizeRootDeviceCustom.helper_disableupdatedbβ Enable thedisableUpdateDBfilesystem helperhelper_distroβ Enable the Distro filesystem helper. Corrects fstab and inittab/upstart entries depending on the kernel you're booting. You want this.commentsβ Comments you wish to save along with this profilevirt_modeβ Controls the virtualization mode. One of'paravirt','fullvirt'ramlimitβRAMLimitin MB. 0 for max.helper_xenβ Deprecated - usehelper_distro.rootdeviceroβ Enables the'ro'kernel flag. Modern distros want this.devtmpfs_automountβ Controls if pv_ops kernels should automount devtmpfs at boot.
linode_config_delete ποΈ
Deletes a Linode Configuration Profile. Not me being the villain era π
Required Parameters:
configidlinodeid
linode_config_list π
Lists a Linode's Configuration Profiles. Window shopping, but make it infrastructure ποΈ
Required Parameters:
linodeid
Optional Parameters:
configid
linode_config_update π§
Updates a Linode Configuration Profile.
Required Parameters:
configid
Optional Parameters:
helper_depmodβ Creates an empty modprobe file for the kernel you're booting.helper_networkβ Automatically creates network configuration files for your distro and places them into your filesystem.runlevelβ One of'default','single','binbash'kernelidβ The KernelID for this profile. Found inavail.kernels()labelβ The Label for this profilehelper_distroβ Enable the Distro filesystem helper. Corrects fstab and inittab/upstart entries depending on the kernel you're booting. You want this.commentsβ Comments you wish to save along with this profilerootdevicecustomβ A custom root device setting.rootdevicenumβ Which device number (1-8) that contains the root partition. 0 to utilizeRootDeviceCustom.linodeidhelper_disableupdatedbβ Enable thedisableUpdateDBfilesystem helperdisklistβ A comma delimited list ofDiskIDs; position reflects device node. The 9th element for specifying the initrd.virt_modeβ Controls the virtualization mode. One of'paravirt','fullvirt'ramlimitβRAMLimitin MB. 0 for max.rootdeviceroβ Enables the'ro'kernel flag. Modern distros want this.devtmpfs_automountβ Controls if pv_ops kernels should automount devtmpfs at boot.helper_xenβ Deprecated - usehelper_distro.
πΎ linode_disk Methods πΎ
linode_disk_create π
Required Parameters:
sizeβ The size in MB of this Disk.typeβ The formatted type of this disk. Valid types are:ext3,ext4,swap,rawlabelβ The display label for this Disklinodeid
Optional Parameters:
isreadonlyβ Enable forced read-only for this Disk
linode_disk_createfromdistribution π
Required Parameters:
rootpassβ The root (or core) user's passwordsizeβ Size of this disk image in MBlinodeiddistributionidβ TheDistributionIDto create this disk from. Found inavail.distributions()labelβ The label of this new disk image
Optional Parameters:
rootsshkeyβ Optionally sets this string into/root/.ssh/authorized_keys(or/home/core/.ssh/authorized_keys) upon distribution configuration.
linode_disk_createfromimage π¦
Creates a new disk from a previously imagized disk. It's the "copy my whole vibe" button π«Ά
Required Parameters:
linodeidβ Specifies the Linode to deploy on toimageidβ The ID of the frozen image to deploy from
Optional Parameters:
labelβ The label of this new disk imagesizeβ The size of the disk image to creates. Defaults to the minimum size required for the requested imagerootsshkeyβ Optionally sets this string into/root/.ssh/authorized_keysupon image deploymentrootpassβ Optionally sets the root password at deployment time. If a password is not provided the existing root password of the frozen image will not be modified
linode_disk_createfromstackscript π§
Required Parameters:
linodeidrootpassβ The root user's passwordsizeβ Size of this disk image in MBstackscriptudfresponsesβ JSON encoded name/value pairs, answering this StackScript's User Defined Fieldsdistributionidβ Which Distribution to apply this StackScript to. Must be one from the script'sDistributionIDListstackscriptidβ The StackScript to create this image fromlabelβ The label of this new disk image
Optional Parameters:
rootsshkeyβ Optionally sets this string into/root/.ssh/authorized_keysupon distribution configuration.
linode_disk_delete π
Required Parameters:
diskidlinodeid
linode_disk_duplicate π―
Performs a bit-for-bit copy of a disk image. Twin energy, no notes π
Required Parameters:
linodeiddiskid
linode_disk_imagize πΈ
Creates a gold-master image for future deployments. Serving looks, forever preserved β¨
Required Parameters:
linodeidβ Specifies the source Linode to create the image fromdiskidβ Specifies the source Disk to create the image from
Optional Parameters:
labelβ Sets the name of the image shown in the base image list, defaults to the source image labeldescriptionβ An optional description of the created image
linode_disk_list π
Status values are 1: Ready and 2: Being Deleted.
Required Parameters:
linodeid
Optional Parameters:
diskid
linode_disk_resize π
Required Parameters:
diskidlinodeidsizeβ The requested new size of this Disk in MB
linode_disk_update ποΈ
Required Parameters:
diskid
Optional Parameters:
linodeidlabelβ The display label for this Diskisreadonlyβ Enable forced read-only for this Disk
π linode_ip Methods π
linode_ip_addprivate π
Assigns a Private IP to a Linode. Returns the IPAddressID that was added. Lowkey exclusive, highkey iconic π
Required Parameters:
linodeid
linode_ip_addpublic π
Assigns a Public IP to a Linode. Returns the IPAddressID and IPAddress that was added. Main character IP, periodt π
Required Parameters:
linodeidβ TheLinodeIDof the Linode that will be assigned an additional public IP address
linode_ip_list ποΈ
Returns the IP addresses of all Linodes you have access to.
Optional Parameters:
linodeidβ If specified, limits the result to thisLinodeIDipaddressidβ If specified, limits the result to thisIPAddressID
linode_ip_setrdns π
Sets the rDNS name of a Public IP. Returns the IPAddressID and IPAddress that were updated. Naming rights are everything, bestie π
Required Parameters:
hostnameβ The hostname to set the reverse DNS toipaddressidβ TheIPAddressIDof the address to update
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.
ok so this one's the swap-meet of IPs β read the whole thing twice before you run it π
Required Parameters:
ipaddressidβ TheIPAddressIDof an IP Address to transfer or swap
Optional Parameters:
tolinodeidβ TheLinodeIDof the Linode whereIPAddressIDwill be transferedwithipaddressidβ The IP Address ID to swap
β³ linode_job Methods β³
linode_job_list π§Ύ
Required Parameters:
linodeid
Optional Parameters:
pendingonlyjobidβ Limits the list to the specifiedJobID
πΈ stackscript Methods πΈ
stackscript_create πͺ
Create a StackScript. Manifesting your own automation, slay β¨
Required Parameters:
distributionidlistdistributionidlistβ a comma delimited list ofDistributionIDs that this script works on π
stackscript_delete
Required Parameters:
stackscriptid
stackscript_list
Lists StackScripts you have access to. π
Optional Parameters:
stackscriptidβ limits the list to the specifiedStackScriptID
stackscript_update
Update a StackScript. β¨
Required Parameters:
stackscriptid
Optional Parameters:
scriptβ the actual scriptlabelβ the Label for this StackScriptrev_noteispublicβ whether this StackScript is published in the Library, for everyone to usedescriptiondistributionidlistβ comma delimited list ofDistributionIDs that this script works on
π nodeblancer Methods
π¦ nodebalancer_config Methods
nodebalancer_config_create
Required Parameters:
nodebalanceridβ the parent NodeBalancer's ID
Optional Parameters:
cipher_suiteβ SSL cipher suite to enforce. One of'recommended','legacy'check_intervalβ seconds between health check probes.2-3600portβ port to bind to on the public interfaces.1-65534checkβ perform active health checks on the backend nodes. One of'connection','http','http_body'check_attemptsβ number of failed probes before taking a node out of rotation.1-30stickinessβ session persistence. One of'none','table','http_cookie'protocolβ either'tcp','http', or'https'check_passiveβ enable passive checks based on observing communication with back-end nodes.check_bodyβ whencheck=http, a regex to match within the first16,384bytes of the response bodycheck_timeoutβ seconds to wait before considering the probe a failure.1-30. Must be less thancheck_interval.check_pathβ whencheck=http, the path to requestssl_keyβ unpassphrased private key for the SSL certificate when protocol is'https'algorithmβ balancing algorithm. One of'roundrobin','leastconn','source'ssl_certβ SSL certificate served by the NodeBalancer when the protocol is'https'
nodebalancer_config_delete
Deletes a NodeBalancer's Config π
Required Parameters:
nodebalanceridconfigidβ theConfigIDto delete
nodebalancer_config_list
Returns a list of NodeBalancers this user has access or delete to, including their properties π«Ά
Required Parameters:
nodebalancerid
Optional Parameters:
configidβ limits the list to the specifiedConfigID
nodebalancer_config_update
Updates a Config's properties β¨
Required Parameters:
configid
Optional Parameters:
check_timeoutβ seconds to wait before considering the probe a failure.1-30. Must be less thancheck_interval.stickinessβ session persistence. One of'none','table','http_cookie'check_attemptsβ number of failed probes before taking a node out of rotation.1-30check_bodyβ whencheck=http, a regex to match within the first16,384bytes of the response bodyprotocolβ either'tcp','http', or'https'check_passiveβ enable passive checks based on observing communication with back-end nodes.checkβ perform active health checks on the backend nodes. One of'connection','http','http_body'portβ port to bind to on the public interfaces.1-65534check_intervalβ seconds between health check probes.2-3600cipher_suiteβ SSL cipher suite to enforce. One of'recommended','legacy'ssl_certβ SSL certificate served by the NodeBalancer when the protocol is'https'algorithmβ balancing algorithm. One of'roundrobin','leastconn','source'ssl_keyβ unpassphrased private key for the SSL certificate when protocol is'https'check_pathβ whencheck=http, the path to request
πΈ nodebalancer_node Methods
nodebalancer_node_create
Required Parameters:
addressβ theaddress:portcombination used to communicate with this Nodeconfigidβ the parentConfigIDto attach this Node tolabelβ this backend Node's label
Optional Parameters:
weightβ load balancing weight,1-255. Higher means more connections.modeβ the connections mode for this node. One of'accept','reject','backup', or'drain'
nodebalancer_node_delete
Deletes a Node from a NodeBalancer Config π
Required Parameters:
nodeidβ theNodeIDto delete
nodebalancer_node_list
Returns a list of Nodes associated with a NodeBalancer Config π
Required Parameters:
configid
Optional Parameters:
nodeidβ limits the list to the specifiedNodeID
nodebalancer_node_update
Updates a Node's properties β
Required Parameters:
nodeid
Optional Parameters:
labelβ this backend Node's labelmodeβ the connections mode for this node. One of'accept','reject','backup', or'drain'addressβ theaddress:portcombination used to communicate with this Nodeweightβ load balancing weight,1-255. Higher means more connections.
π 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. Batch requests will be rejected if they include this API action. π₯
Required Parameters:
passwordusername
Optional Parameters:
labelβ an optional label for this key.tokenβ required when two-factor authentication is enabled. Emergency scratch codes are not permitted. π«expiresβ number of hours the key will remain valid, between0and8760.0means no expiration. Defaults to168.
π image Methods
image_delete
Deletes a gold-master image π
Required Parameters:
imageidβ the ID of the gold-master image to delete
image_list
Lists available gold-master images β¨
Optional Parameters:
pendingβ show images currently being created.imageidβ request information for a specific gold-master image
image_update
Update an Image record. π¦
Required Parameters:
imageidβ the ID of the Image to modify.
Optional Parameters:
descriptionβ an optional description of the Image.labelβ the label of the Image.
π§ professionalservices_scope Methods
okay so bestie, this section literally has nothing in it β no methods, no params, just the heading sitting there serving main character energy with zero lines. Moving on. π
π AUTHORS
- Michael Greb,
<michael@thegrebs.com>π - Stan "The Man" Schwertly
<stan@schwertly.com>π
π 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.
and that's a wrap on the whole page, bestie!! π this wasperl v5.42.0, dated2025-07-25, and you just read theWebSer...Linode(3pm)man page top to bottom. go forth and slay those API calls πβ¨π
π¦ where this page comes from
- fedora 43: perl-WebService-Linode 0.29-18.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms