Linode Instances v4.176.0
List Linodes
Returns a paginated list of Linodes you have permission to view.
OAuth.
linodes:read_only
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances
linode-cli linodes list
Response Samples
{
"data": [
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"disk_encryption": "enabled",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"placement_group": {
"affinity_type": "anti-affinity:local",
"id": 528,
"is_strict": true,
"label": "PG_Miami_failover"
},
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer Read-only The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer Read-only The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer Read-only The total number of results. |
errors | array
of objects
|
Create a Linode
Creates a Linode Instance on your Account. In order for this request to complete successfully, your User must have the add_linodes
grant. Creating a new Linode will incur a charge on your Account.
Linodes can be created using one of the available Types. Run List Linode types to get more information about each Type’s specs and cost.
Linodes can be created in any one of our available Regions, which are accessible from the List regions operation.
In an effort to fight spam, Linode restricts outbound connections on ports 25, 465, and 587 on all Linodes for new accounts created after November 5th, 2019. For more information, see our guide on Running a Mail Server.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
Linodes can be created in a number of ways:
Using a Linode Public Image distribution or a Private Image you created based on another Linode.
Run the List images operation with authentication to view all available Images.
The Linode will be
running
after it completesprovisioning
.A default config with two Disks, one being a 512 swap disk, is created.
swap_size
can be used to customize the swap disk size.
Requires a
root_pass
be supplied to use for the root User’s Account.It is recommended to supply SSH keys for the root User using the
authorized_keys
field.You may also supply a list of usernames via the
authorized_users
field.- These users must have an SSH Key associated with your Profile first. See the Add an SSH key) operation for more information.
Using cloud-init with Metadata.
- Automate system configuration and software installation by providing a base-64 encoded cloud-config file.
- Requires a compatible Image. You can determine compatible Images by checking for
cloud-init
undercapabilities
when running List images. - Requires a compatible Region. You can determine compatible Regions by checking for
Metadata
undercapabilities
when running List regions.
Using a StackScript.
- Run List StackScripts for a list of available StackScripts.
- The Linode will be
running
after it completesprovisioning
. - Requires a compatible Image to be supplied.
- Run Get a StackScript for compatible Images.
- Requires a
root_pass
be supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keys
field. - You may also supply a list of usernames via the
authorized_users
field.- These users must have an SSH Key associated with your Profile first. See Add an SSH key for more information.
Using one of your other Linode’s backups.
- You must create a Linode large enough to accommodate the Backup’s size.
- The Disks and Config will match that of the Linode that was backed up.
- The
root_pass
will match that of the Linode that was backed up.
Attached to a private VLAN.
- Review the
interfaces
property of the Request Body Schema for details. - For more information, see our guide on Getting Started with VLANs.
- Review the
Create an empty Linode.
- The Linode will remain
offline
and must be manually started.- Run Boot a Linode.
- Disks and Configs must be created manually.
- This is only recommended for advanced use cases.
- The Linode will remain
CLI.
linode-cli linodes create
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"backup_id": 1234,
"backups_enabled": true,
"swap_size": 512,
"image": "linode/ubuntu22.04",
"root_pass": "aComplexP@ssword",
"stackscript_id": 10079,
"stackscript_data": {
"gh_username": "linode"
},
"interfaces": [
{
"purpose": "public",
"label": "",
"ipam_address": ""
},
{
"purpose": "vlan",
"label": "vlan-1",
"ipam_address": "10.0.0.1/24"
},
{
"purpose": "vpc",
"primary": false,
"label": "",
"ipam_address": "",
"subnet_id": 101,
"ipv4": {
"vpc": "10.0.1.2",
"nat_1_1": "any"
}
}
],
"authorized_keys": [
"ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
],
"authorized_users": [
"myUser",
"secondaryUser"
],
"booted": true,
"label": "linode123",
"type": "g6-standard-2",
"region": "us-east",
"disk_encryption": "enabled",
"group": "Linode-Group",
"placement_group": {
"id": 528
},
"metadata": {
"user_data": "I2Nsb3VkLWNvbmZpZw=="
},
"firewall_id": 9000
}' \
https://api.linode.com/v4/linode/instances
linode-cli linodes create \
--label linode123 \
--root_pass aComplex@Password \
--booted true \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}' \
--region us-east \
--disk_encryption enabled\
--placement_group.id 528 \
--type g6-standard-2 \
--authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
--authorized_users "myUser" \
--authorized_users "secondaryUser" \
--metadata.user_data "I2Nsb3VkLWNvbmZpZw==" \
--firewall_id 9000
Request Body Schema
authorized_keys | array
of strings Write-only A list of public SSH keys that will be automatically appended to the
root user’s | ||||||||||||||||||||
authorized_users | array
of strings Write-only A list of usernames. If the usernames have associated SSH keys, the
keys will be appended to the root users | ||||||||||||||||||||
backup_id | integer A Backup ID from another Linode’s available backups. Your User must have This field and the | ||||||||||||||||||||
backups_enabled | boolean If this field is set to This option is always treated as Backup pricing is included in the response from List types | ||||||||||||||||||||
booted | boolean Default:
true Write-only This field defaults to | ||||||||||||||||||||
disk_encryption | string Enum:
enabled
disabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. By default, encryption is | ||||||||||||||||||||
firewall_id | integer The | ||||||||||||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||||||||||||
image | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||||||||||||||||||||
interfaces | array
of objects An array of Network Interfaces to add to this Linode’s Configuration Profile. At least one and up to three Interface objects can exist in this array. The position in the array determines which of the Linode’s network Interfaces is configured:
When updating a Linode’s Interfaces, each Interface must be redefined. An empty If no public Interface is configured, public IP addresses are still assigned to the Linode but will not be usable without manual configuration. Note: Changes to Linode Interface configurations can be enabled by rebooting the Linode.
See the VPC documentation guide for its specifications and limitations.
| ||||||||||||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||||||||||||
metadata | object Write-only An object containing user-defined data relevant to the creation of Linodes.
| ||||||||||||||||||||
placement_group | object Include this to assign this Linode to an existing placement group. These constraints apply:
| ||||||||||||||||||||
private_ip | boolean If true, the created Linode will have private networking enabled and assigned a private IPv4 address. | ||||||||||||||||||||
region Required | string The region where the Linode will be located. | ||||||||||||||||||||
root_pass | string<password>
7..128
charactersWrite-only This sets the root user’s password on a newly-created Linode Disk when deploying from an Image.
| ||||||||||||||||||||
stackscript_data | object
<=
65535
charactersThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See User Defined Fields (UDFs) for more details. This field is required to be valid JSON. Total length cannot exceed 65,535 characters. | ||||||||||||||||||||
stackscript_id | integer A StackScript ID that will cause the referenced StackScript to be run during deployment
of this Linode. A compatible | ||||||||||||||||||||
swap_size | integer Default:
512 When deploying from an Image, this field is optional, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. | ||||||||||||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||||||||||
type Required | string The Linode type of the Linode you are creating. |
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"disk_encryption": "enabled",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"placement_group": {
"affinity_type": "anti-affinity:local",
"id": 528,
"is_strict": true,
"label": "PG_Miami_failover"
},
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
alerts | object
| ||||||||||||
backups | object Information about this Linode’s backups status. For information about available backups, run List backups.
| ||||||||||||
created | string<date-time> Read-only When this Linode was created. | ||||||||||||
disk_encryption | string Enum:
enabled
disabled
Default:
enabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. | ||||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | boolean Read-only Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | string<uuid> Read-only The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | string Enum:
kvm Read-only The virtualization software powering this Linode. | ||||||||||||
id | integer Read-only This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||||||||||||
ipv4 | array
of strings
<ipv4> Read-only This Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to Open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the networking operations for details. | ||||||||||||
ipv6 Nullable | string<ipv6/128> Read-only This Linode’s IPv6 SLAAC address. This address is specific to a Linode,
and may not be shared. If the Linode has not been assigned an
IPv6 address, the return value will be | ||||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||||
placement_group Nullable | object Read-only Details on the placement group that this Linode belongs to. Empty if the Linode isn’t in a placement group.
| ||||||||||||
region | string Read-only This is the region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | object Read-only Information about the resources available to this Linode.
| ||||||||||||
status | string Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension Read-only A brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | string Read-only This is the Linode type that this Linode was deployed with. To change a Linode’s Type, use Resize a Linode. | ||||||||||||
updated | string<date-time> Read-only When this Linode was last updated. | ||||||||||||
watchdog_enabled | boolean The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array
of objects
|
Delete a Linode
Deletes a Linode you have permission to read_write
.
Deleting a Linode is a destructive action and cannot be undone.
Additionally, deleting a Linode:
- Gives up any IP addresses the Linode was assigned.
- Deletes all Disks, Backups, Configs, etc.
- Detaches any Volumes associated with the Linode.
- Stops billing for the Linode and its associated services. You will be billed for time used within the billing period the Linode was active.
Linodes that are in the process of cloning or backup restoration cannot be deleted.
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to look up |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/instances/123
linode-cli linodes delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Get a Linode
Get a specific Linode by ID.
CLI.
linode-cli linodes view
OAuth.
linodes:read_only
Authorizations
personalAccessToken | |
oauth | linodes:read_only |
Path Parameters
linodeId | integer RequiredID of the Linode to look up |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/linode/instances/123
linode-cli linodes view 123
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"disk_encryption": "enabled",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"placement_group": {
"affinity_type": "anti-affinity:local",
"id": 528,
"is_strict": true,
"label": "PG_Miami_failover"
},
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
alerts | object
| ||||||||||||
backups | object Information about this Linode’s backups status. For information about available backups, run List backups.
| ||||||||||||
created | string<date-time> Read-only When this Linode was created. | ||||||||||||
disk_encryption | string Enum:
enabled
disabled
Default:
enabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. | ||||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | boolean Read-only Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | string<uuid> Read-only The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | string Enum:
kvm Read-only The virtualization software powering this Linode. | ||||||||||||
id | integer Read-only This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||||||||||||
ipv4 | array
of strings
<ipv4> Read-only This Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to Open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the networking operations for details. | ||||||||||||
ipv6 Nullable | string<ipv6/128> Read-only This Linode’s IPv6 SLAAC address. This address is specific to a Linode,
and may not be shared. If the Linode has not been assigned an
IPv6 address, the return value will be | ||||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||||
placement_group Nullable | object Read-only Details on the placement group that this Linode belongs to. Empty if the Linode isn’t in a placement group.
| ||||||||||||
region | string Read-only This is the region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | object Read-only Information about the resources available to this Linode.
| ||||||||||||
status | string Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension Read-only A brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | string Read-only This is the Linode type that this Linode was deployed with. To change a Linode’s Type, use Resize a Linode. | ||||||||||||
updated | string<date-time> Read-only When this Linode was last updated. | ||||||||||||
watchdog_enabled | boolean The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array
of objects
|
Update a Linode
Updates a Linode that you have permission to read_write
.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
CLI.
linode-cli linodes update
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to look up |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "linode123",
"group": "Linode-Group",
"alerts": {
"cpu": 180,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80,
"io": 10000
},
"backups": {
"schedule": {
"day": "Saturday",
"window": "W22"
}
}
}' \
https://api.linode.com/v4/linode/instances/123
linode-cli linodes update 7833080 \
--label linode123 \
--backups.schedule.day "Saturday" \
--backups.schedule.window "W22" \
--alerts.cpu 180 \
--alerts.network_in 10 \
--alerts.network_out 10 \
--alerts.transfer_quota 80 \
--alerts.io 10000
Request Body Schema
alerts | object
| ||||||||||
backups | object Information about this Linode’s backups status. For information about available backups, run List backups.
| ||||||||||
disk_encryption | string Enum:
enabled
disabled
Default:
enabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. | ||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||
watchdog_enabled | boolean The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"disk_encryption": "enabled",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"placement_group": {
"affinity_type": "anti-affinity:local",
"id": 528,
"is_strict": true,
"label": "PG_Miami_failover"
},
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
alerts | object
| ||||||||||||
backups | object Information about this Linode’s backups status. For information about available backups, run List backups.
| ||||||||||||
created | string<date-time> Read-only When this Linode was created. | ||||||||||||
disk_encryption | string Enum:
enabled
disabled
Default:
enabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. | ||||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | boolean Read-only Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | string<uuid> Read-only The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | string Enum:
kvm Read-only The virtualization software powering this Linode. | ||||||||||||
id | integer Read-only This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||||||||||||
ipv4 | array
of strings
<ipv4> Read-only This Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to Open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the networking operations for details. | ||||||||||||
ipv6 Nullable | string<ipv6/128> Read-only This Linode’s IPv6 SLAAC address. This address is specific to a Linode,
and may not be shared. If the Linode has not been assigned an
IPv6 address, the return value will be | ||||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||||
placement_group Nullable | object Read-only Details on the placement group that this Linode belongs to. Empty if the Linode isn’t in a placement group.
| ||||||||||||
region | string Read-only This is the region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | object Read-only Information about the resources available to this Linode.
| ||||||||||||
status | string Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension Read-only A brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | string Read-only This is the Linode type that this Linode was deployed with. To change a Linode’s Type, use Resize a Linode. | ||||||||||||
updated | string<date-time> Read-only When this Linode was last updated. | ||||||||||||
watchdog_enabled | boolean The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array
of objects
|
Boot a Linode
Boots a Linode you have permission to modify. If no parameters are given, a Config profile will be chosen for this boot based on the following criteria:
- If there is only one Config profile for this Linode, it will be used.
- If there is more than one Config profile, the last booted config will be used.
- If there is more than one Config profile and none were the last to be booted (because the Linode was never booted or the last booted config was deleted) an error will be returned.
CLI.
linode-cli linodes boot
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredThe ID of the Linode to boot. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/boot
linode-cli linodes boot 123
Request Body Schema
config_id | integer The Linode Config ID to boot into. |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Clone a Linode
You can clone your Linode’s existing Disks or Configuration profiles to another Linode on your Account. In order for this request to complete successfully, your User must have the add_linodes
grant. Cloning to a new Linode will incur a charge on your Account.
If cloning to an existing Linode, any actions currently running or queued must be completed first before you can clone to it.
Up to five clone operations from any given source Linode can be run concurrently. If more concurrent clones are attempted, an HTTP 400 error will be returned by this operation.
Any tags existing on the source Linode will be cloned to the target Linode.
Linodes utilizing Metadata ("has_user_data": true
) must be cloned to a new Linode with metadata.user_data
included with the clone request.
vpc
details
- If the Linode you are cloning has a
vpc
purpose Interface on its active Configuration Profile that includes a 1:1 NAT, the resulting clone is configured with anany
1:1 NAT. - See the VPC documentation guide for its specifications and limitations.
vlan
details
- Only Next Generation Network (NGN) data centers support VLANs. If a VLAN is attached to your Linode and you attempt clone it to a non-NGN data center, the cloning will not initiate. If a Linode cannot be cloned because of an incompatibility, you will be prompted to select a different data center or contact support.
- See the VLANs Overview guide to view additional specifications and limitations.
CLI.
linode-cli linodes clone
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to clone. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-east",
"type": "g6-standard-2",
"linode_id": 124,
"label": "cloned-linode",
"group": "Linode-Group",
"placement_group": {
"id": 528
},
"backups_enabled": true,
"disks": [25674],
"configs": [23456],
"private_ip": true,
"metadata": {
"user_data": "I2Nsb3VkLWNvbmZpZw=="
}
}' \
https://api.linode.com/v4/linode/instances/123/clone
linode-cli linodes clone 123 \
--linode_id 124 \
--region us-east \
--type g6-standard-2 \
--label cloned-linode \
--backups_enabled true \
--placement_group.id 528 \
--disks 25674 \
--configs 23456 \
--private_ip true \
--metadata.user_data I2Nsb3VkLWNvbmZpZw==
Request Body Schema
backups_enabled | boolean If this field is set to
| ||
configs | array
of integers An array of configuration profile IDs.
| ||
disks | array
of integers An array of disk IDs.
| ||
group | string A label used to group Linodes for display. Linodes are not required to have a group. | ||
label | string
3..64
charactersThe label to assign this Linode when cloning to a new Linode.
| ||
linode_id | integer If an existing Linode is the target for the clone, the ID of that Linode. The existing Linode must have enough resources to accept the clone. | ||
metadata | object Write-only An object containing user-defined data relevant to the creation of Linodes.
| ||
placement_group | object Include this to assign this Linode to an existing placement group. Consider these points when cloning:
| ||
private_ip | boolean If true, the created Linode will have private networking enabled and assigned a private IPv4 address.
| ||
region | string This is the Region where the Linode will be deployed. To view all available Regions you can deploy to, run List regions.
| ||
type | string A Linode’s Type determines what resources are available to it, including disk space, memory, and virtual cpus. The amounts available to a specific Linode are returned as To view all available Linode Types you can deploy with, run List types.
|
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"disk_encryption": "enabled",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"placement_group": {
"affinity_type": "anti-affinity:local",
"id": 528,
"is_strict": true,
"label": "PG_Miami_failover"
},
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
alerts | object
| ||||||||||||
backups | object Information about this Linode’s backups status. For information about available backups, run List backups.
| ||||||||||||
created | string<date-time> Read-only When this Linode was created. | ||||||||||||
disk_encryption | string Enum:
enabled
disabled
Default:
enabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. | ||||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | boolean Read-only Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | string<uuid> Read-only The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | string Enum:
kvm Read-only The virtualization software powering this Linode. | ||||||||||||
id | integer Read-only This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||||||||||||
ipv4 | array
of strings
<ipv4> Read-only This Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to Open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the networking operations for details. | ||||||||||||
ipv6 Nullable | string<ipv6/128> Read-only This Linode’s IPv6 SLAAC address. This address is specific to a Linode,
and may not be shared. If the Linode has not been assigned an
IPv6 address, the return value will be | ||||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||||
placement_group Nullable | object Read-only Details on the placement group that this Linode belongs to. Empty if the Linode isn’t in a placement group.
| ||||||||||||
region | string Read-only This is the region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | object Read-only Information about the resources available to this Linode.
| ||||||||||||
status | string Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension Read-only A brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | string Read-only This is the Linode type that this Linode was deployed with. To change a Linode’s Type, use Resize a Linode. | ||||||||||||
updated | string<date-time> Read-only When this Linode was last updated. | ||||||||||||
watchdog_enabled | boolean The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array
of objects
|
Initiate a DC migration/pending host migration
Initiate a pending host migration that has been scheduled by Linode or initiate a cross data center (DC) migration. A list of pending migrations, if any, can be accessed from List notifications. When the migration begins, your Linode will be shutdown if not already off. If the migration initiated the shutdown, it will reboot the Linode when completed.
To initiate a cross DC migration, you must pass a region
parameter to the request body specifying the target data center region. You can view a list of all available regions and their feature capabilities from List regions. See our Pricing Page for Region-specific pricing, which applies after migration is complete. If your Linode has a DC migration already queued or you have initiated a previously scheduled migration, you will not be able to initiate a DC migration until it has completed.
vpc
details
- Cross DC migrations are not allowed for Linodes that have a
vpc
purpose Configuration Profile Interface. Host migrations within the same DC are permitted. - See the VPC documentation guide for its specifications and limitations.
vlan
details
- Only Next Generation Network (NGN) data centers support VLANs. Run the List regions operation to view the capabilities of data center regions. If a VLAN is attached to your Linode and you attempt to migrate or clone it to a non-NGN data center, the migration or cloning will not initiate. If a Linode cannot be migrated or cloned because of an incompatibility, you will be prompted to select a different data center or contact support.
- Next Generation Network (NGN) data centers do not support IPv6
/116
pools or IP Failover. If you have these features enabled on your Linode and attempt to migrate to an NGN data center, the migration will not initiate. If a Linode cannot be migrated because of an incompatibility, you will be prompted to select a different data center or contact support. - See the VLANs Overview guide to view additional specifications and limitations.
CLI.
linode-cli linodes migrate
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to migrate. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-central",
"placement_group": {
"id": 528
}
}' \
https://api.linode.com/v4/linode/instances/123/migrate
linode-cli linodes migrate 123 \ --region us-central \ --placement_group.id 528 \
Request Body Schema
placement_group | object Include this to assign this Linode to an existing placement group in the data center you’re migrating to. These constraints apply:
| ||
region | string The region to which the Linode will be migrated. Must be a valid region slug. A list of
regions can be viewed by running the List regions
operation. A cross data center migration will cancel a pending
migration that has not yet been initiated. A cross data center
migration will initiate a | ||
type | string Enum:
warm
cold
Default:
cold Type of migration used in moving to a new host or Linode type.
| ||
upgrade | boolean Default:
false When initiating a cross DC migration, setting this value to true will also ensure that
the Linode is upgraded to the latest generation of hardware that
corresponds to your Linode’s Type, if any free upgrades are available
for it. If no free upgrades are available, and this value is set
to true, then the endpoint will return a 400 error code and the
migration will not be performed. If the data center set in the
|
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Upgrade a Linode
Linodes created with now-deprecated Types are entitled to a free upgrade to the next generation. A mutating Linode will be allocated any new resources the upgraded Type provides, and will be subsequently restarted if it was currently running. If any actions are currently running or queued, those actions must be completed first before you can initiate a mutate.
CLI.
linode-cli linodes upgrade
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to mutate. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/mutate
linode-cli linodes upgrade 123
Request Body Schema
allow_auto_disk_resize | boolean Default:
true Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Reset a Linode's root password
Resets the root password for this Linode.
- Your Linode must be shut down for a password reset to complete.
- If your Linode has more than one disk (not counting its swap disk), run the Reset a disk root password operation to update a specific disk’s root password.
- A
password_reset
event is generated when a root password reset is successful.
CLI.
linode-cli linodes linode-reset-password
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode for which to reset its root password. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"root_pass": "a$eCure4assw0rd!43v51"
}' \
https://api.linode.com/v4/linode/instances/123/password
linode-cli linodes linode-reset-password 123 a$eCure4assw0rd!43v51
Request Body Schema
root_pass Required | string The root user’s password on this Linode. Linode passwords must meet a password strength score requirement that is calculated internally by the API. If the strength requirement is not met, you will receive a Password does not meet strength requirement error. |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Reboot a Linode
Reboots a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a reboot.
CLI.
linode-cli linodes reboot
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the linode to reboot. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/reboot
linode-cli linodes reboot 123
Request Body Schema
config_id | integer The Linode Config ID to reboot into. If null or omitted, the last booted config will be used. If there was no last booted config and this Linode only has one config, it will be used. If a config cannot be determined, an error will be returned. |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Rebuild a Linode
Rebuilds a Linode you have the read_write
permission to modify.
A rebuild will first shut down the Linode, delete all disks and configs on the Linode, and then deploy a new image
to the Linode with the given attributes. Additionally:
- Requires an
image
be supplied. - Requires a
root_pass
be supplied to use for the root User’s Account. - It is recommended to supply SSH keys for the root User using the
authorized_keys
field. - Linodes utilizing Metadata (
"has_user_data": true
) should includemetadata.user_data
in the rebuild request to continue using the service.
During a rebuild, you can enable
or disable
local disk encryption. If disk encryption is not included in the request, the previous disk_encryption
value is used. Disk encryption cannot be disabled if the compute instance is attached to a LKE nodepool.
You also have the option to resize the Linode to a different plan by including the type
parameter with your request. Note that resizing involves migrating the Linode to a new hardware host, while rebuilding without resizing maintains the same hardware host. Resizing also requires significantly more time for completion of this operation. The following additional conditions apply:
- The Linode must not have a pending migration.
- Your Account cannot have an outstanding balance.
- The Linode must not have more disk allocation than the new Type allows.
- In that situation, you must first delete or resize the disk to be smaller.
CLI.
linode-cli linodes rebuild
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to rebuild. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"image": "linode/debian9",
"root_pass": "aComplexP@ssword",
"disk_encryption": disabled,
"authorized_keys": [
"ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
],
"authorized_users": [
"myUsername",
"secondaryUsername"
],
"booted": true,
"stackscript_id": 10079,
"stackscript_data": {
"gh_username": "linode"
},
"type": "g6-standard-2",
"metadata": {
"user_data": "I2Nsb3VkLWNvbmZpZw=="
}
}' \
https://api.linode.com/v4/linode/instances/123/rebuild
linode-cli linodes rebuild 123 \
--image "linode/debian9" \
--root_pass aComplex@Password \
--disk_encryption disabled \
--authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
--authorized_users "myUsername" \
--authorized_users "secondaryUsername" \
--booted true \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}' \
--type "g6-standard-2" \
--metadata.userdata "I2Nsb3VkLWNvbmZpZw=="
Request Body Schema
authorized_keys | array
of strings Write-only A list of public SSH keys that will be automatically appended to the
root user’s | ||
authorized_users | array
of strings Write-only A list of usernames. If the usernames have associated SSH keys, the
keys will be appended to the root users | ||
booted | boolean Default:
true Write-only This field defaults to | ||
disk_encryption | string Enum:
enabled
disabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. By default, encryption is | ||
image Required | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||
metadata | object Write-only An object containing user-defined data relevant to the creation of Linodes.
| ||
root_pass Required | string<password>
7..128
charactersWrite-only This sets the root user’s password on a newly-created Linode Disk when deploying from an Image.
| ||
stackscript_data | object
<=
65535
charactersThis field is required only if the StackScript being deployed requires input data from the User for successful completion. See User Defined Fields (UDFs) for more details. This field is required to be valid JSON. Total length cannot exceed 65,535 characters. | ||
stackscript_id | integer A StackScript ID that will cause the referenced StackScript to be run during deployment
of this Linode. A compatible | ||
type | string The ID of the Linode type to resize to with this request. |
Response Samples
{
"alerts": {
"cpu": 180,
"io": 10000,
"network_in": 10,
"network_out": 10,
"transfer_quota": 80
},
"backups": {
"available": true,
"enabled": true,
"last_successful": "2018-01-01T00:01:01",
"schedule": {
"day": "Saturday",
"window": "W22"
}
},
"created": "2018-01-01T00:01:01",
"disk_encryption": "enabled",
"group": "Linode-Group",
"has_user_data": true,
"host_uuid": "3a3ddd59d9a78bb8de041391075df44de62bfec8",
"hypervisor": "kvm",
"id": 123,
"image": "linode/debian10",
"ipv4": [
"203.0.113.1",
"192.0.2.1"
],
"ipv6": "c001:d00d::1337/128",
"label": "linode123",
"placement_group": {
"affinity_type": "anti-affinity:local",
"id": 528,
"is_strict": true,
"label": "PG_Miami_failover"
},
"region": "us-east",
"specs": {
"disk": 81920,
"gpus": 0,
"memory": 4096,
"transfer": 4000,
"vcpus": 2
},
"status": "running",
"tags": [
"example tag",
"another example"
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
alerts | object
| ||||||||||||
backups | object Information about this Linode’s backups status. For information about available backups, run List backups.
| ||||||||||||
created | string<date-time> Read-only When this Linode was created. | ||||||||||||
disk_encryption | string Enum:
enabled
disabled
Default:
enabled Local disk encryption ensures that your data stored on compute instances is encrypted. Encryption converts the data on the compute instance into unreadable code. Decryption of the the disk requires other systems within the datacenter. This requirement protects against data leakage if the disk is removed from a datacenter, lost, stolen, recycled or disposed. | ||||||||||||
group | string A deprecated property denoting a group label for this Linode. | ||||||||||||
has_user_data | boolean Read-only Whether this compute instance was provisioned utilizing | ||||||||||||
host_uuid | string<uuid> Read-only The Linode’s host machine, as a UUID. | ||||||||||||
hypervisor | string Enum:
kvm Read-only The virtualization software powering this Linode. | ||||||||||||
id | integer Read-only This Linode’s ID which must be provided for all operations impacting this Linode. | ||||||||||||
image Nullable | string An Image ID to deploy the Linode Disk from. Run the List images operation with authentication to view all available Images. Official Linode Images start with | ||||||||||||
ipv4 | array
of strings
<ipv4> Read-only This Linode’s IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to Open a support ticket to get additional IPv4 addresses. IPv4 addresses may be reassigned between your Linodes, or shared with other Linodes. See the networking operations for details. | ||||||||||||
ipv6 Nullable | string<ipv6/128> Read-only This Linode’s IPv6 SLAAC address. This address is specific to a Linode,
and may not be shared. If the Linode has not been assigned an
IPv6 address, the return value will be | ||||||||||||
label | string
3..64
charactersThe Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned. Linode labels have the following constraints:
| ||||||||||||
placement_group Nullable | object Read-only Details on the placement group that this Linode belongs to. Empty if the Linode isn’t in a placement group.
| ||||||||||||
region | string Read-only This is the region where the Linode was deployed. A Linode’s region can only be changed by initiating a cross data center migration. | ||||||||||||
specs | object Read-only Information about the resources available to this Linode.
| ||||||||||||
status | string Enum:
running
offline
booting
rebooting
shutting_down
provisioning
deleting
migrating
rebuilding
cloning
restoring
stopped
billing_suspension Read-only A brief description of this Linode’s current state. This field may change without direct action from you. For example, when a Linode goes into maintenance mode its status will display “stopped”. | ||||||||||||
tags | array
of strings An array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||
type | string Read-only This is the Linode type that this Linode was deployed with. To change a Linode’s Type, use Resize a Linode. | ||||||||||||
updated | string<date-time> Read-only When this Linode was last updated. | ||||||||||||
watchdog_enabled | boolean The watchdog, named Lassie, is a Shutdown Watchdog that monitors your Linode and will reboot it if it powers off unexpectedly. It works by issuing a boot job when your Linode powers off without a shutdown job being responsible. To prevent a loop, Lassie will give up if there have been more than 5 boot jobs issued within 15 minutes. |
errors | array
of objects
|
Boot a Linode into rescue mode
Rescue Mode is a safe environment for performing many system recovery and disk management tasks. Rescue Mode is based on the Finnix recovery distribution, a self-contained and bootable Linux distribution. You can also use Rescue Mode for tasks other than disaster recovery, such as formatting disks to use different filesystems, copying data between disks, and downloading files from a disk via SSH and SFTP.
- Note that “sdh” is reserved and unavailable during rescue.
CLI.
linode-cli linodes rescue
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to rescue. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"devices": {
"sda": {
"disk_id": 124458,
"volume_id": null
},
"sdb": {
"disk_id": null,
"volume_id": null
}
}
}' \
https://api.linode.com/v4/linode/instances/123/rescue
linode-cli linodes rescue 123 \
--devices.sda.disk_id 124458
Request Body Schema
devices | object
|
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Resize a Linode
Resizes a Linode you have the read_write
permission to a different Type. If any actions are currently running or queued, those actions must be completed first before you can initiate a resize. Additionally, the following criteria must be met in order to resize a Linode:
- The Linode must not have a pending migration.
- Your Account cannot have an outstanding balance.
- The Linode must not have more disk allocation than the new Type allows.
- In that situation, you must first delete or resize the disk to be smaller.
You can also resize a Linode when using the Rebuild a Linode operation.
CLI.
linode-cli linodes resize
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to resize. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"type": "g6-standard-2"
}' \
https://api.linode.com/v4/linode/instances/123/resize
linode-cli linodes resize 123 \
--type g6-standard-2
Request Body Schema
allow_auto_disk_resize | boolean Default:
true Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. |
migration_type | string Enum:
warm
cold
Default:
cold Type of migration used in moving to a new host or Linode type.
|
type Required | string The ID representing the Linode Type. |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Shut down a Linode
Shuts down a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a shutdown.
CLI.
linode-cli linodes shutdown
OAuth.
linodes:read_write
Authorizations
personalAccessToken | |
oauth | linodes:read_write |
Path Parameters
linodeId | integer RequiredID of the Linode to shutdown. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/linode/instances/123/shutdown
linode-cli linodes shutdown 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|