Models

This page documents all models made available by the linode_api4 library. These models are can be looked up or created as described in the Core Concepts document.

Account Models

class linode_api4.objects.account.Account(client, id, json={})[source]
address_1 = <linode_api4.objects.filtering.FilterableAttribute object>
address_2 = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

balance = <linode_api4.objects.filtering.FilterableAttribute object>
capabilities = <linode_api4.objects.filtering.FilterableAttribute object>
city = <linode_api4.objects.filtering.FilterableAttribute object>
company = <linode_api4.objects.filtering.FilterableAttribute object>
country = <linode_api4.objects.filtering.FilterableAttribute object>
credit_card = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

email = <linode_api4.objects.filtering.FilterableAttribute object>
first_name = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

last_name = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

phone = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

state = <linode_api4.objects.filtering.FilterableAttribute object>
tax_id = <linode_api4.objects.filtering.FilterableAttribute object>
zip = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.account.AccountSettings(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

longview_subscription = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

managed = <linode_api4.objects.filtering.FilterableAttribute object>
network_helper = <linode_api4.objects.filtering.FilterableAttribute object>
object_storage = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

class linode_api4.objects.account.Event(client, id, json={})[source]
action = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

domain
entity = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

linode
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

mark_read()[source]
nodebalancer
percent_complete = <linode_api4.objects.filtering.FilterableAttribute object>
rate = <linode_api4.objects.filtering.FilterableAttribute object>
read = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

seen = <linode_api4.objects.filtering.FilterableAttribute object>
stackscript
status = <linode_api4.objects.filtering.FilterableAttribute object>
ticket
time_remaining = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
user_id = <linode_api4.objects.filtering.FilterableAttribute object>
username = <linode_api4.objects.filtering.FilterableAttribute object>
volume
class linode_api4.objects.account.Grant(client, cls, dct)[source]

A Grant is a single grant a user has to an object. A Grant’s entity is an object on the account, such as a Linode, NodeBalancer, or Volume, and its permissions level is one of None, “read_only” or “read_write”.

Grants cannot be accessed or updated individually, and are only relevant in the context of a UserGrants object.

entity

Returns the object this grant is for. The objects type depends on the type of object this grant is applied to, and the object returned is not populated (accessing its attributes will trigger an api request).

Returns:This grant’s entity
Return type:Linode, NodeBalancer, Domain, StackScript, Volume, or Longview
class linode_api4.objects.account.Invoice(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

date = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

items = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

total = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.account.InvoiceItem(client, id, parent_id, json={})[source]
amount = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

invoice_id = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

quantity = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

to = <linode_api4.objects.filtering.FilterableAttribute object>
type = <linode_api4.objects.filtering.FilterableAttribute object>
unit_price = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.account.OAuthClient(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

public = <linode_api4.objects.filtering.FilterableAttribute object>
redirect_uri = <linode_api4.objects.filtering.FilterableAttribute object>
reset_secret()[source]

Resets the client secret for this client.

save()

Send this object’s mutable values to the server in a PUT request

secret = <linode_api4.objects.filtering.FilterableAttribute object>
set_thumbnail(thumbnail)[source]

Sets the thumbnail for this OAuth Client. If thumbnail is bytes, uploads it as a png. Otherwise, assumes thumbnail is a path to the thumbnail and reads it in as bytes before uploading.

status = <linode_api4.objects.filtering.FilterableAttribute object>
thumbnail(dump_to=None)[source]

This returns binary data that represents a 128x128 image. If dump_to is given, attempts to write the image to a file at the given location.

class linode_api4.objects.account.Payment(client, id, json={})[source]
amount = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

date = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

class linode_api4.objects.account.User(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

email = <linode_api4.objects.filtering.FilterableAttribute object>
grants

Retrieves the grants for this user. If the user is unrestricted, this will result in an ApiError. This is smart, and will only fetch from the api once unless the object is invalidated.

Returns:The grants for this user.
Return type:linode.objects.account.UserGrants
invalidate()[source]

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

restricted = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

username = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.account.UserGrants(client, username, json=None)[source]

The UserGrants object represents the grants given to a restricted user. Each section of grants has a list of objects and the level of grants this user has to that object.

This is not an instance of Base because it lacks most of the attributes of a Base-like model (such as a unique, ID-based endpoint at which to access it), however it has some similarities so that its usage is familiar.

save()[source]
linode_api4.objects.account.get_obj_grants()[source]

Returns Grant keys mapped to Object types.

Domain Models

class linode_api4.objects.domain.Domain(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

axfr_ips = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

description = <linode_api4.objects.filtering.FilterableAttribute object>
domain = <linode_api4.objects.filtering.FilterableAttribute object>
expire_sec = <linode_api4.objects.filtering.FilterableAttribute object>
group = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

master_ips = <linode_api4.objects.filtering.FilterableAttribute object>
record_create(record_type, **kwargs)[source]
records = <linode_api4.objects.filtering.FilterableAttribute object>
refresh_sec = <linode_api4.objects.filtering.FilterableAttribute object>
retry_sec = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

soa_email = <linode_api4.objects.filtering.FilterableAttribute object>
status = <linode_api4.objects.filtering.FilterableAttribute object>
tags = <linode_api4.objects.filtering.FilterableAttribute object>
ttl_sec = <linode_api4.objects.filtering.FilterableAttribute object>
type = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.domain.DomainRecord(client, id, parent_id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

domain_id = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

name = <linode_api4.objects.filtering.FilterableAttribute object>
port = <linode_api4.objects.filtering.FilterableAttribute object>
priority = <linode_api4.objects.filtering.FilterableAttribute object>
protocol = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

service = <linode_api4.objects.filtering.FilterableAttribute object>
tag = <linode_api4.objects.filtering.FilterableAttribute object>
target = <linode_api4.objects.filtering.FilterableAttribute object>
ttl_sec = <linode_api4.objects.filtering.FilterableAttribute object>
type = <linode_api4.objects.filtering.FilterableAttribute object>
weight = <linode_api4.objects.filtering.FilterableAttribute object>

Image Models

class linode_api4.objects.image.Image(client, id, json={})[source]

An Image is something a Linode Instance or Disk can be deployed from.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
created_by = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

deprecated = <linode_api4.objects.filtering.FilterableAttribute object>
description = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

is_public = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

size = <linode_api4.objects.filtering.FilterableAttribute object>
status = <linode_api4.objects.filtering.FilterableAttribute object>
type = <linode_api4.objects.filtering.FilterableAttribute object>
vendor = <linode_api4.objects.filtering.FilterableAttribute object>

Linode Models

class linode_api4.objects.linode.Backup(client, id, parent_id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

configs = <linode_api4.objects.filtering.FilterableAttribute object>
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

disks = <linode_api4.objects.filtering.FilterableAttribute object>
duration = <linode_api4.objects.filtering.FilterableAttribute object>
finished = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
linode_id = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

message = <linode_api4.objects.filtering.FilterableAttribute object>
region = <linode_api4.objects.filtering.FilterableAttribute object>
restore_to(linode, **kwargs)[source]
save()

Send this object’s mutable values to the server in a PUT request

status = <linode_api4.objects.filtering.FilterableAttribute object>
type = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.Config(client, id, parent_id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

comments = <linode_api4.objects.filtering.FilterableAttribute object>
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

devices = <linode_api4.objects.filtering.FilterableAttribute object>
helpers = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
initrd = <linode_api4.objects.filtering.FilterableAttribute object>
interfaces = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

kernel = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
linode_id = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

memory_limit = <linode_api4.objects.filtering.FilterableAttribute object>
root_device = <linode_api4.objects.filtering.FilterableAttribute object>
run_level = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

updated = <linode_api4.objects.filtering.FilterableAttribute object>
virt_mode = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.ConfigInterface(purpose, label='', ipam_address='')[source]

This is a helper class used to populate ‘interfaces’ in the Config calss below.

ipam_address = None

The IPAM Address this interface will bring up. Blank for public interfaces.

label = None

The Label for the VLAN this interface is connected to. Blank for public interfaces.

purpose = None

The purpose of this interface. “public” means this interface can access the internet, “vlan” means it is a VLAN interface.

class linode_api4.objects.linode.Disk(client, id, parent_id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

duplicate()[source]
filesystem = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
linode_id = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

reset_root_password(root_password=None)[source]
resize(new_size)[source]

Resizes this disk. The Linode Instance this disk belongs to must have sufficient space available to accommodate the new size, and must be offline.

NOTE If resizing a disk down, the filesystem on the disk must still fit on the new disk size. You may need to resize the filesystem on the disk first before performing this action.

Parameters:new_size (int) – The intended new size of the disk, in MB
Returns:True if the resize was initiated successfully.
Return type:bool
save()

Send this object’s mutable values to the server in a PUT request

size = <linode_api4.objects.filtering.FilterableAttribute object>
status = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.Instance(client, id, json={})[source]
alerts = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

available_backups

The backups response contains what backups are available to be restored.

backups = <linode_api4.objects.filtering.FilterableAttribute object>
boot(config=None)[source]
cancel_backups()[source]

Cancels Backups for this Instance. All existing Backups will be lost, including any snapshots that have been taken. This cannot be undone, but Backups can be re-enabled at a later date.

clone(to_linode=None, region=None, service=None, configs=[], disks=[], label=None, group=None, with_backups=None)[source]

Clones this linode into a new linode or into a new linode in the given region

config_create(kernel=None, label=None, devices=[], disks=[], volumes=[], **kwargs)[source]

Creates a Linode Config with the given attributes.

Parameters:
  • kernel – The kernel to boot with.
  • label – The config label
  • disks – The list of disks, starting at sda, to map to this config.
  • volumes – The volumes, starting after the last disk, to map to this config
  • devices – A list of devices to assign to this config, in device index order. Values must be of type Disk or Volume. If this is given, you may not include disks or volumes.
  • **kwargs

    Any other arguments accepted by the api.

Returns:

A new Linode Config

configs = <linode_api4.objects.filtering.FilterableAttribute object>
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

disk_create(size, label=None, filesystem=None, read_only=False, image=None, root_pass=None, authorized_keys=None, authorized_users=None, stackscript=None, **stackscript_args)[source]

Creates a new Disk for this Instance.

Parameters:
  • size – The size of the disk, in MB
  • label – The label of the disk. If not given, a default label will be generated.
  • filesystem – The filesystem type for the disk. If not given, the default for the image deployed the disk will be used. Required if creating a disk without an image.
  • read_only – If True, creates a read-only disk
  • image – The Image to deploy to the disk.
  • root_pass – The password to configure for the root user when deploying an image to this disk. Not used if image is not given. If an image is given and root_pass is not, a password will be generated and returned alongside the new disk.
  • authorized_keys – A list of SSH keys to install as trusted for the root user.
  • authorized_users – A list of usernames whose keys should be installed as trusted for the root user. These user’s keys should already be set up, see ProfileGroup.ssh_keys for details.
  • stackscript – A StackScript object, or the ID of one, to deploy to this disk. Requires deploying a compatible image.
  • **stackscript_args

    Any arguments to pass to the StackScript, as defined by its User Defined Fields.

disks = <linode_api4.objects.filtering.FilterableAttribute object>
enable_backups()[source]

Enable Backups for this Instance. When enabled, we will automatically backup your Instance’s data so that it can be restored at a later date. For more information on Instance’s Backups service and pricing, see our Backups Page

static generate_root_password()[source]
group = <linode_api4.objects.filtering.FilterableAttribute object>
hypervisor = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
image = <linode_api4.objects.filtering.FilterableAttribute object>
initiate_migration()[source]

Initiates a pending migration that is already scheduled for this Linode Instance

invalidate()[source]

Clear out cached properties

ip_allocate(public=False)[source]

Allocates a new IPAddress for this Instance. Additional public IPs require justification, and you may need to open a SupportTicket before you can add one. You may only have, at most, one private IP per Instance.

Parameters:public (bool) – If the new IP should be public or private. Defaults to private.
Returns:The new IPAddress
Return type:IPAddress
ips

The ips related collection is not normalized like the others, so we have to make an ad-hoc object to return for its response

ipv4 = <linode_api4.objects.filtering.FilterableAttribute object>
ipv6 = <linode_api4.objects.filtering.FilterableAttribute object>
kvmify()[source]

Converts this linode to KVM from Xen

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

mutate()[source]

Upgrades this Instance to the latest generation type

reboot()[source]
rebuild(image, root_pass=None, authorized_keys=None, **kwargs)[source]

Rebuilding an Instance deletes all existing Disks and Configs and deploys a new Image to it. This can be used to reset an existing Instance or to install an Image on an empty Instance.

Parameters:
  • image (str or Image) – The Image to deploy to this Instance
  • root_pass (str) – The root password for the newly rebuilt Instance. If omitted, a password will be generated and returned.
  • authorized_keys (list or str) – The ssh public keys to install in the linode’s /root/.ssh/authorized_keys file. Each entry may be a single key, or a path to a file containing the key.
Returns:

The newly generated password, if one was not provided (otherwise True)

Return type:

str or bool

region = <linode_api4.objects.filtering.FilterableAttribute object>
rescue(*disks)[source]
resize(new_type, **kwargs)[source]
save()

Send this object’s mutable values to the server in a PUT request

shutdown()[source]
snapshot(label=None)[source]
specs = <linode_api4.objects.filtering.FilterableAttribute object>
stats

Returns the JSON stats for this Instance

stats_for(dt)[source]

Returns stats for the month containing the given datetime

status = <linode_api4.objects.filtering.FilterableAttribute object>
tags = <linode_api4.objects.filtering.FilterableAttribute object>
transfer

Get per-linode transfer

type = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.Kernel(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

architecture = <linode_api4.objects.filtering.FilterableAttribute object>
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

deprecated = <linode_api4.objects.filtering.FilterableAttribute object>
description = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

kvm = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

updates = <linode_api4.objects.filtering.FilterableAttribute object>
version = <linode_api4.objects.filtering.FilterableAttribute object>
xen = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.StackScript(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

deployments_active = <linode_api4.objects.filtering.FilterableAttribute object>
deployments_total = <linode_api4.objects.filtering.FilterableAttribute object>
description = <linode_api4.objects.filtering.FilterableAttribute object>
images = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

is_public = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

rev_note = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

script = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
user_defined_fields = <linode_api4.objects.filtering.FilterableAttribute object>
user_gravatar_id = <linode_api4.objects.filtering.FilterableAttribute object>
username = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.Type(client, id, json={})[source]
addons = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

disk = <linode_api4.objects.filtering.FilterableAttribute object>
gpus = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

memory = <linode_api4.objects.filtering.FilterableAttribute object>
network_out = <linode_api4.objects.filtering.FilterableAttribute object>
price = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

transfer = <linode_api4.objects.filtering.FilterableAttribute object>
type_class = <linode_api4.objects.filtering.FilterableAttribute object>
vcpus = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.linode.UserDefinedField(name, label, example, field_type, choices=None)[source]
class linode_api4.objects.linode.UserDefinedFieldType[source]

An enumeration.

select_many = 3
select_one = 2
text = 1

LKE Models

class linode_api4.objects.lke.KubeVersion(client, id, json={})[source]

A KubeVersion is a version of Kubernetes that can be deployed on LKE.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

class linode_api4.objects.lke.LKECluster(client, id, json={})[source]

An LKE Cluster is a single k8s cluster deployed via Linode Kubernetes Engine.

api_endpoints

A list of API Endpoints for this Cluster.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

k8s_version = <linode_api4.objects.filtering.FilterableAttribute object>
kubeconfig

The administrative Kubernetes Config used to access this cluster, encoded in base64. Note that this config contains sensitive credentials to your cluster.

To convert this config into a readable form, use python’s base64 module:

import base64

config = my_cluster.kubeconfig
yaml_config = base64.b64decode(config)

# write this config out to disk
with open("/path/to/target/kubeconfig.yaml", "w") as f:
    f.write(yaml_config.decode())

It may take a few minutes for a config to be ready when creating a new cluster; during that time this request may fail.

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

node_pool_create(node_type, node_count, **kwargs)[source]

Creates a new LKENodePool for this cluster.

Parameters:
  • node_type (Type or str) – The type of nodes to create in this pool.
  • node_count (int) – The number of nodes to create in this pool.
  • kwargs – Any other arguments to pass to the API. See the API docs for possible values.
Returns:

The new Node Pool

Return type:

LKENodePool

pools = <linode_api4.objects.filtering.FilterableAttribute object>
region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

tags = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.lke.LKENodePool(client, id, parent_id, json={})[source]

An LKE Node Pool describes a pool of Linode Instances that exist within an LKE Cluster.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

cluster_id = <linode_api4.objects.filtering.FilterableAttribute object>
count = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

disks = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

nodes = <linode_api4.objects.filtering.FilterableAttribute object>
recycle()[source]

Deleted and recreates all Linodes in this Node Pool in a rolling fashion. Completing this operation may take several minutes. This operation will cause all local data on Linode Instances in this pool to be lost.

save()

Send this object’s mutable values to the server in a PUT request

type = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.lke.LKENodePoolNode(client, json)[source]

AN LKE Node Pool Node is a helper class that is used to populate the “nodes” array of an LKE Node Pool, and set up an automatic relationship with the Linode Instance the Node represented.

id = None

The ID of this Node Pool Node

instance = None

The Instance object backing this Node Pool Node

instance_id = None

The ID of the Linode Instance this Node represents

status = None

The Status of this Node Pool Node

Longview Models

class linode_api4.objects.longview.LongviewClient(client, id, json={})[source]
api_key = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

apps = <linode_api4.objects.filtering.FilterableAttribute object>
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
install_code = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.longview.LongviewSubscription(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

clients_included = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

price = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

Networking Models

class linode_api4.objects.networking.Firewall(client, id, json={})[source]

Note

This endpoint is in beta. This will only function if base_url is set to https://api.linode.com/v4beta.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

device_create(id, type='linode', **kwargs)[source]

Creates and attaches a device to this Firewall

Parameters:
  • id (int) – The ID of the entity to create a device for.
  • type (str) – The type of entity the device is being created for. (linode)
devices = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

rules = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

status = <linode_api4.objects.filtering.FilterableAttribute object>
tags = <linode_api4.objects.filtering.FilterableAttribute object>
update_rules(rules)[source]

Sets the JSON rules for this Firewall

updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.networking.FirewallDevice(client, id, parent_id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

entity = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.networking.IPAddress(client, id, json={})[source]
address = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

gateway = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

linode
linode_id = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

prefix = <linode_api4.objects.filtering.FilterableAttribute object>
public = <linode_api4.objects.filtering.FilterableAttribute object>
rdns = <linode_api4.objects.filtering.FilterableAttribute object>
region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

subnet_mask = <linode_api4.objects.filtering.FilterableAttribute object>
to(linode)[source]

This is a helper method for ip-assign, and should not be used outside of that context. It’s used to cleanly build an IP Assign request with pretty python syntax.

type = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.networking.IPv6Pool(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

range = <linode_api4.objects.filtering.FilterableAttribute object>
region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

class linode_api4.objects.networking.IPv6Range(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

range = <linode_api4.objects.filtering.FilterableAttribute object>
region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

class linode_api4.objects.networking.VLAN(client, id, json={})[source]

Note

At this time, the Linode API only supports listing VLANs.

Note

This endpoint is in beta. This will only function if base_url is set to https://api.linode.com/v4beta.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
linodes = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

Nodebalancer Models

class linode_api4.objects.nodebalancer.NodeBalancer(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

client_conn_throttle = <linode_api4.objects.filtering.FilterableAttribute object>
config_create(label=None, **kwargs)[source]
configs = <linode_api4.objects.filtering.FilterableAttribute object>
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

hostname = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

ipv4 = <linode_api4.objects.filtering.FilterableAttribute object>
ipv6 = <linode_api4.objects.filtering.FilterableAttribute object>
label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

status = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.nodebalancer.NodeBalancerConfig(client, id, parent_id, json={})[source]
algorithm = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

check = <linode_api4.objects.filtering.FilterableAttribute object>
check_attempts = <linode_api4.objects.filtering.FilterableAttribute object>
check_body = <linode_api4.objects.filtering.FilterableAttribute object>
check_interval = <linode_api4.objects.filtering.FilterableAttribute object>
check_passive = <linode_api4.objects.filtering.FilterableAttribute object>
check_path = <linode_api4.objects.filtering.FilterableAttribute object>
check_timeout = <linode_api4.objects.filtering.FilterableAttribute object>
cipher_suite = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

load_ssl_data(cert_file, key_file)[source]

A convenience method that loads a cert and a key from files and sets them on this object. This can make enabling ssl easier (instead of you needing to load the files yourself).

This does not change protocol/port for you, or save anything. Once this is called, you must still call save() on this object for the changes to take effect.

Parameters:
  • cert_file (str) – A path to the file containing the public certificate
  • key_file (str) – A path to the file containing the unpassphrased private key
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

node_create(label, address, **kwargs)[source]
nodebalancer_id = <linode_api4.objects.filtering.FilterableAttribute object>
nodes

This is a special derived_class relationship because NodeBalancerNode is the only api object that requires two parent_ids

nodes_status = <linode_api4.objects.filtering.FilterableAttribute object>
port = <linode_api4.objects.filtering.FilterableAttribute object>
protocol = <linode_api4.objects.filtering.FilterableAttribute object>
proxy_protocol = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

ssl_cert = <linode_api4.objects.filtering.FilterableAttribute object>
ssl_commonname = <linode_api4.objects.filtering.FilterableAttribute object>
ssl_fingerprint = <linode_api4.objects.filtering.FilterableAttribute object>
ssl_key = <linode_api4.objects.filtering.FilterableAttribute object>
stickiness = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.nodebalancer.NodeBalancerNode(client, id, parent_id, nodebalancer_id=None, json=None)[source]
address = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

config_id = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

mode = <linode_api4.objects.filtering.FilterableAttribute object>
nodebalancer_id = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

status = <linode_api4.objects.filtering.FilterableAttribute object>
tags = <linode_api4.objects.filtering.FilterableAttribute object>
weight = <linode_api4.objects.filtering.FilterableAttribute object>

Object Storage Models

class linode_api4.objects.object_storage.ObjectStorageCluster(client, id, json={})[source]

A cluster where Object Storage is available.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

domain = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

region = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

static_site_domain = <linode_api4.objects.filtering.FilterableAttribute object>
status = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.object_storage.ObjectStorageKeys(client, id, json={})[source]

A keypair that allows third-party applications to access Linode Object Storage.

access_key = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

secret_key = <linode_api4.objects.filtering.FilterableAttribute object>

Profile Models

class linode_api4.objects.profile.AuthorizedApp(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

expiry = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

scopes = <linode_api4.objects.filtering.FilterableAttribute object>
thumbnail_url = <linode_api4.objects.filtering.FilterableAttribute object>
website = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.profile.PersonalAccessToken(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

expiry = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

scopes = <linode_api4.objects.filtering.FilterableAttribute object>
token = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.profile.Profile(client, id, json={})[source]
add_whitelist_entry(address, netmask, note=None)[source]

Adds a new entry to this user’s IP whitelist, if enabled

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

authorized_keys = <linode_api4.objects.filtering.FilterableAttribute object>
confirm_tfa(code)[source]

Confirms TFA for an account. Needs a TFA code generated by enable_tfa

delete()

Sends a DELETE request for this object

disable_tfa()[source]

Turns off TFA for this user’s account.

email = <linode_api4.objects.filtering.FilterableAttribute object>
email_notifications = <linode_api4.objects.filtering.FilterableAttribute object>
enable_tfa()[source]

Enables TFA for the token’s user. This requies a follow-up request to confirm TFA. Returns the TFA secret that needs to be confirmed.

grants

Returns grants for the current user

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

ip_whitelist_enabled = <linode_api4.objects.filtering.FilterableAttribute object>
lish_auth_method = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

referrals = <linode_api4.objects.filtering.FilterableAttribute object>
restricted = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

timezone = <linode_api4.objects.filtering.FilterableAttribute object>
two_factor_auth = <linode_api4.objects.filtering.FilterableAttribute object>
uid = <linode_api4.objects.filtering.FilterableAttribute object>
username = <linode_api4.objects.filtering.FilterableAttribute object>
whitelist

Returns the user’s whitelist entries, if whitelist is enabled

class linode_api4.objects.profile.SSHKey(client, id, json={})[source]

An SSH Public Key uploaded to your profile for use in Linode Instance deployments.

classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

ssh_key = <linode_api4.objects.filtering.FilterableAttribute object>
class linode_api4.objects.profile.WhitelistEntry(client, id, json={})[source]
address = <linode_api4.objects.filtering.FilterableAttribute object>
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

netmask = <linode_api4.objects.filtering.FilterableAttribute object>
note = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

Region Models

class linode_api4.objects.region.Region(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

capabilities = <linode_api4.objects.filtering.FilterableAttribute object>
country = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

resolvers = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

status = <linode_api4.objects.filtering.FilterableAttribute object>

Support Models

class linode_api4.objects.support.SupportTicket(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

closed = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

description = <linode_api4.objects.filtering.FilterableAttribute object>
domain
entity = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

linode
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

nodebalancer
opened = <linode_api4.objects.filtering.FilterableAttribute object>
post_reply(description)[source]
replies = <linode_api4.objects.filtering.FilterableAttribute object>
save()

Send this object’s mutable values to the server in a PUT request

status = <linode_api4.objects.filtering.FilterableAttribute object>
summary = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>
updated_by = <linode_api4.objects.filtering.FilterableAttribute object>
upload_attachment(attachment)[source]
volume
class linode_api4.objects.support.TicketReply(client, id, parent_id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

created = <linode_api4.objects.filtering.FilterableAttribute object>
created_by = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

description = <linode_api4.objects.filtering.FilterableAttribute object>
from_linode = <linode_api4.objects.filtering.FilterableAttribute object>
id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

save()

Send this object’s mutable values to the server in a PUT request

ticket_id = <linode_api4.objects.filtering.FilterableAttribute object>

Tag Models

class linode_api4.objects.tag.Tag(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

delete()

Sends a DELETE request for this object

invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

objects

Returns a list of objects with this Tag. This list may contain any taggable object type.

save()

Send this object’s mutable values to the server in a PUT request

class linode_api4.objects.tag.TaggedObjectProxy[source]

This class accepts an object from a list of Tagged objects and returns the correct type of object based on the response data.

Warning

It is incorrect to instantiate this class. This class is a proxy for the enveloped objects returned from the tagged objects collection, and should only be used in that context.

classmethod make_instance(id, client, parent_id=None, json=None)[source]

Overrides Base’s make_instance to allow dynamic creation of objects based on the defined type in the response json.

Parameters:
  • cls – The class this was called on
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

Volume Models

class linode_api4.objects.volume.Volume(client, id, json={})[source]
classmethod api_list()

Returns a URL that will produce a list of JSON objects of this class’ type

attach(to_linode, config=None)[source]

Attaches this Volume to the given Linode

clone(label)[source]

Clones this volume to a new volume in the same region with the given label

Parameters:label – The label for the new volume.
Returns:The new volume object.
created = <linode_api4.objects.filtering.FilterableAttribute object>
delete()

Sends a DELETE request for this object

detach()[source]

Detaches this Volume if it is attached

id = <linode_api4.objects.filtering.FilterableAttribute object>
invalidate()

Invalidates all non-identifier Properties this object has locally, causing the next access to re-fetch them from the server

label = <linode_api4.objects.filtering.FilterableAttribute object>
linode_id = <linode_api4.objects.filtering.FilterableAttribute object>
static make(id, client, cls, parent_id=None, json=None)

Makes an api object based on an id and class.

Parameters:
  • id – The id of the object to create
  • client – The LinodeClient to give the new object
  • cls – The class type to instantiate
  • parent_id – The parent id for derived classes
  • json – The JSON to use to populate the new class
Returns:

An instance of cls with the given id

classmethod make_instance(id, client, parent_id=None, json=None)

Makes an instance of the class this is called on and returns it.

The intended usage is:
instance = Linode.make_instance(123, client, json=response)
Parameters:
  • cls – The class this was called on.
  • id – The id of the instance to create
  • client – The client to use for this instance
  • parent_id – The parent id for derived classes
  • json – The JSON to populate the instance with
Returns:

A new instance of this type, populated with json

region = <linode_api4.objects.filtering.FilterableAttribute object>
resize(size)[source]

Resizes this Volume

save()

Send this object’s mutable values to the server in a PUT request

size = <linode_api4.objects.filtering.FilterableAttribute object>
status = <linode_api4.objects.filtering.FilterableAttribute object>
tags = <linode_api4.objects.filtering.FilterableAttribute object>
updated = <linode_api4.objects.filtering.FilterableAttribute object>