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]¶ The contact and billing information related to your Account.
API Documentation: https://www.linode.com/docs/api/account/#account-view
-
active_promotions
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
active_since
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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>¶
-
balance_uninvoiced
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
billing_source
= <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>¶
-
euuid
= <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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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.
AccountBetaProgram
(client, id, json={})[source]¶ The details and enrollment information of a Beta program that an account is enrolled in.
-
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
-
description
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
ended
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
enrolled
= <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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
started
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
AccountSettings
(client, id, json={})[source]¶ Information related to your Account settings.
API Documentation: https://www.linode.com/docs/api/account/#account-settings-view
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
backups_enabled
= <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
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
-
class
linode_api4.objects.account.
Event
(client, id, json={})[source]¶ An event object representing an event that took place on this account.
API Documentation: https://www.linode.com/docs/api/account/#event-view
-
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
¶ Returns the Linode Domain referenced by this event.
Returns: The Linode Domain referenced by this event. Return type: Optional[Domain]
-
duration
= <linode_api4.objects.filtering.FilterableAttribute 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
-
linode
¶ Returns the Linode Instance referenced by this event.
Returns: The Linode Instance referenced by this event. Return type: Optional[Instance]
-
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]¶ Marks a single Event as read.
API Documentation: https://www.linode.com/docs/api/account/#event-mark-as-read
-
mark_seen
()[source]¶ Marks a single Event as seen.
API Documentation: https://www.linode.com/docs/api/account/#event-mark-as-seen
-
message
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
nodebalancer
¶ Returns the Linode NodeBalancer referenced by this event.
Returns: The Linode NodeBalancer referenced by this event. Return type: Optional[NodeBalancer]
-
percent_complete
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
rate
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
read
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
secondary_entity
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
seen
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
stackscript
¶ Returns the Linode StackScript referenced by this event.
Returns: The Linode StackScript referenced by this event. Return type: Optional[StackScript]
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
ticket
¶ Returns the Linode Support Ticket referenced by this event.
Returns: The Linode Support Ticket referenced by this event. Return type: Optional[SupportTicket]
-
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>¶
-
-
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]¶ A single invoice on this Linode account.
API Documentation: https://www.linode.com/docs/api/account/#invoice-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
subtotal
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
tax
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
tax_summary
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
total
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
InvoiceItem
(client, id, parent_id, json={})[source]¶ An individual invoice item under an
Invoice
object.API Documentation: https://www.linode.com/docs/api/account/#invoice-items-list
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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.
Login
(client, id, json={})[source]¶ A login entry for this account.
API Documentation: https://www.linode.com/docs/api/account/#login-view
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
datetime
= <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
-
ip
= <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
-
restricted
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
username
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
OAuthClient
(client, id, json={})[source]¶ An OAuthClient object that can be used to authenticate apps with this account.
API Documentation: https://www.linode.com/docs/api/account/#oauth-client-view
-
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.
API Documentation: https://www.linode.com/docs/api/account/#oauth-client-secret-reset
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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.
API Documentation: https://www.linode.com/docs/api/account/#oauth-client-thumbnail-update
-
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.
API Documentation: https://www.linode.com/docs/api/account/#oauth-client-thumbnail-view
-
thumbnail_url
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
Payment
(client, id, json={})[source]¶ An object representing a single payment on the current Linode Account.
API Documentation: https://www.linode.com/docs/api/account/#payment-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
usd
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
PaymentMethod
(client, id, json={})[source]¶ A payment method to be used on this Linode account.
API Documentation: https://www.linode.com/docs/api/account/#payment-method-view
-
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>¶
-
data
= <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
-
is_default
= <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
-
payment_method_make_default
()[source]¶ Make this Payment Method the default method for automatically processing payments.
API Documentation: https://www.linode.com/docs/api/account/#payment-method-make-default
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
ServiceTransfer
(client, id, json={})[source]¶ A transfer request for transferring a service between Linode accounts.
API Documentation: https://www.linode.com/docs/api/account/#service-transfer-view
-
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
-
entities
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
expiry
= <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_sender
= <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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
service_transfer_accept
()[source]¶ Accept a Service Transfer for the provided token to receive the services included in the transfer to your account.
API Documentation: https://www.linode.com/docs/api/account/#service-transfer-accept
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
token
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.account.
User
(client, id, json={})[source]¶ An object representing a single user on this account.
API Documentation: https://www.linode.com/docs/api/account/#user-view
-
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.
API Documentation: https://www.linode.com/docs/api/account/#users-grants-view
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
ssh_keys
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
tfa_enabled
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
username
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
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.
API Documentation: https://www.linode.com/docs/api/account/#users-grants-view
-
save
()[source]¶ Applies the grants to the parent user.
API Documentation: https://www.linode.com/docs/api/account/#users-grants-update
-
Database Models¶
-
class
linode_api4.objects.database.
Database
(client, id, json={})[source]¶ A generic Database instance.
Note: This class does not have a corresponding GET endpoint. For detailed information about the database, use the .instance() property method instead.
-
allow_list
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
cluster_size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
created
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
delete
()¶ Sends a DELETE request for this object
-
encrypted
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
engine
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
hosts
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
id
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
instance
¶ Returns the underlying database object for the corresponding database engine. This is useful for performing operations on generic databases.
The following is an example of printing credentials for all databases regardless of engine:
client = LinodeClient(TOKEN) databases = client.database.instances() for db in databases: print(f"{db.hosts.primary}: {db.instance.credentials.username} {db.instance.credentials.password}")
-
instance_uri
= <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
-
region
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updates
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
version
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
-
class
linode_api4.objects.database.
DatabaseBackup
(client, id, parent_id, json={})[source]¶ A generic Managed Database backup.
This class is not intended to be used on its own. Use the appropriate subclasses for the corresponding database engine. (e.g. MySQLDatabaseBackup)
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.database.
DatabaseEngine
(client, id, json={})[source]¶ A managed database engine. The following database engines are available on Linode’s platform:
- MySQL
- PostgreSQL
API Documentation: https://www.linode.com/docs/api/databases/#managed-database-engine-view
-
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
-
engine
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
version
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
class
linode_api4.objects.database.
DatabaseType
(client, id, json={})[source]¶ The type of a managed database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-database-type-view
-
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
-
deprecated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
disk
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
engines
= <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>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
vcpus
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.database.
MySQLDatabase
(client, id, json={})[source]¶ An accessible Managed MySQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-view
-
allow_list
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
backup_create
(label, **kwargs)[source]¶ Creates a snapshot backup of a Managed MySQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-backup-snapshot-create
-
backups
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
cluster_size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
created
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
credentials
¶ Display the root username and password for an accessible Managed MySQL Database. The Database must have an active status to perform this command.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-credentials-view
Returns: MappedObject containing credntials for this DB Return type: MappedObject
-
credentials_reset
()[source]¶ Reset the root password for a Managed MySQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-credentials-reset
Returns: Response from the API call to reset credentials Return type: dict
-
delete
()¶ Sends a DELETE request for this object
-
encrypted
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
engine
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
hosts
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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
-
patch
()[source]¶ Apply security patches and updates to the underlying operating system of the Managed MySQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-patch
Returns: Response from the API call to apply security patches Return type: dict
-
port
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
region
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
replication_type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
ssl
¶ Display the SSL CA certificate for an accessible Managed MySQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-ssl-certificate-view
Returns: MappedObject containing SSL CA certificate for this DB Return type: MappedObject
-
ssl_connection
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updates
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
version
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
-
class
linode_api4.objects.database.
MySQLDatabaseBackup
(client, id, parent_id, json={})[source]¶ A backup for an accessible Managed MySQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-backup-view
-
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
-
restore
()¶ Restore a backup to a Managed Database on your Account.
API Documentation:
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.database.
PostgreSQLDatabase
(client, id, json={})[source]¶ An accessible Managed PostgreSQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-view
-
allow_list
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
backup_create
(label, **kwargs)[source]¶ Creates a snapshot backup of a Managed PostgreSQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-backup-snapshot-create
-
backups
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
cluster_size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
created
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
credentials
¶ Display the root username and password for an accessible Managed PostgreSQL Database. The Database must have an active status to perform this command.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-credentials-view
Returns: MappedObject containing credntials for this DB Return type: MappedObject
-
credentials_reset
()[source]¶ Reset the root password for a Managed PostgreSQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-credentials-reset
Returns: Response from the API call to reset credentials Return type: dict
-
delete
()¶ Sends a DELETE request for this object
-
encrypted
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
engine
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
hosts
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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
-
patch
()[source]¶ Apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-patch
Returns: Response from the API call to apply security patches Return type: dict
-
port
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
region
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
replication_commit_type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
replication_type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
ssl
¶ Display the SSL CA certificate for an accessible Managed PostgreSQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-ssl-certificate-view
Returns: MappedObject containing SSL CA certificate for this DB Return type: MappedObject
-
ssl_connection
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updates
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
version
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
-
class
linode_api4.objects.database.
PostgreSQLDatabaseBackup
(client, id, parent_id, json={})[source]¶ A backup for an accessible Managed PostgreSQL Database.
API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-backup-view
-
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
-
restore
()¶ Restore a backup to a Managed Database on your Account.
API Documentation:
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
Domain Models¶
-
class
linode_api4.objects.domain.
Domain
(client, id, json={})[source]¶ A single Domain that you have registered in Linode’s DNS Manager. Linode is not a registrar, and in order for this Domain record to work you must own the domain and point your registrar at Linode’s nameservers.
API Documentation: https://www.linode.com/docs/api/domains/#domain-view
-
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>¶
-
clone
(domain: str)[source]¶ Clones a Domain and all associated DNS records from a Domain that is registered in Linode’s DNS manager.
API Documentation: https://www.linode.com/docs/api/domains/#domain-clone
Parameters: domain – The new domain for the clone. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be unique on Linode’s platform, including across different Linode accounts; there cannot be two Domains representing the same domain. Type: domain: str
-
delete
()¶ Sends a DELETE request for this object
-
description
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
domain
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
domain_import
(domain, remote_nameserver)[source]¶ Imports a domain zone from a remote nameserver. Your nameserver must allow zone transfers (AXFR) from the following IPs:
- 96.126.114.97
- 96.126.114.98
- 2600:3c00::5e
= 2600:3c00::5f
API Documentation: https://www.linode.com/docs/api/domains/#domain-import
Parameters: - domain – The domain to import.
- remote_nameserver – The remote nameserver that allows zone transfers (AXFR).
Type: domain: str
Type: remote_nameserver: str
-
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]¶ Adds a new Domain Record to the zonefile this Domain represents. Each domain can have up to 12,000 active records.
API Documentation: https://www.linode.com/docs/api/domains/#domain-record-create
Parameters: - record_type – The type of Record this is in the DNS system. Can be one of: A, AAAA, NS, MX, CNAME, TXT, SRV, PTR, CAA.
- kwargs – Additional optional parameters for creating a domain record. Valid parameters are: name, target, priority, weight, port, service, protocol, ttl_sec. Descriptions of these parameters can be found in the API Documentation above.
Type: record_type: str
Type: record_type: dict
Returns: The newly created Domain Record
Return type:
-
records
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
refresh_sec
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
retry_sec
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
soa_email
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
ttl_sec
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
zone_file_view
()[source]¶ Returns the zone file for the last rendered zone for the specified domain.
API Documentation: https://www.linode.com/docs/api/domains/#domain-zone-file-view
Returns: The zone file for the last rendered zone for the specified domain in the form of a list of the lines of the zone file. Return type: List[str]
-
classmethod
-
class
linode_api4.objects.domain.
DomainRecord
(client, id, parent_id, json={})[source]¶ A single record on a Domain.
API Documentation: https://www.linode.com/docs/api/domains/#domain-record-view
-
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_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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
weight
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
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.
API Documentation: https://www.linode.com/docs/api/images/#image-view
-
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>¶
-
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>¶
-
eol
= <linode_api4.objects.filtering.FilterableAttribute 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
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
vendor
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
Linode Models¶
-
class
linode_api4.objects.linode.
Backup
(client, id, parent_id, json={})[source]¶ A Backup of a Linode Instance.
API Documentation: https://www.linode.com/docs/api/linode-instances/#backup-view
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
available
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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]¶ Restores a Linode’s Backup to the specified Linode.
API Documentation: https://www.linode.com/docs/api/linode-instances/#backup-restore
Parameters: - linode – The id of the Instance or the Instance to share the IPAddresses with. This Instance will be able to bring up the given addresses.
- kwargs – A dict containing the The ID of the Linode to restore a Backup to and a boolean that, if True, deletes all Disks and Configs on the target Linode before restoring.
Type: linode: int or Instance
Type: kwargs: dict
- Example usage:
- kwargs = {
- “linode_id”: 123, “overwrite”: true
}
Returns: Returns true if the operation was successful Return type: bool
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.linode.
Config
(client, id, parent_id, json={})[source]¶ A Configuration Profile for a Linode Instance.
API Documentation: https://www.linode.com/docs/api/linode-instances/#configuration-profile-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
virt_mode
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
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]¶ A Disk for the storage space on a Compute Instance.
API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-view
-
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]¶ Copies a disk, byte-for-byte, into a new Disk belonging to the same Linode. The Linode must have enough storage space available to accept a new Disk of the same size as this one or this operation will fail.
API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-clone
Returns: A Disk object representing the cloned Disk Return type: Disk
-
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]¶ Resets the password of a Disk you have permission to read_write.
API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-root-password-reset
Parameters: root_password – The new root password for the OS installed on this Disk. The password must meet the complexity strength validation requirements for a strong password. Type: root_password: str
-
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.
API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-resize
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.linode.
Instance
(client, id, json={})[source]¶ A Linode Instance.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-view
-
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.
API Documentation: https://www.linode.com/docs/api/linode-instances/#backups-list
Returns: A List of the available backups for the Linode Instance. Return type: List[Backup]
-
backups
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
boot
(config=None)[source]¶ Boots a Linode you have permission to modify. If no parameters are given, a Config profile will be chosen for this boot based on the following criteria:
- If there is only one Config profile for this Linode, it will be used.
- If there is more than one Config profile, the last booted config will be used.
- If there is more than one Config profile and none were the last to be booted (because the Linode was never booted or the last booted config was deleted) an error will be returned.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-boot
Parameters: config – The Linode Config ID to boot into. Type: config: int Returns: True if the operation was successful. Return type: bool
-
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.
API Documentation: https://www.linode.com/docs/api/linode-instances/#backups-cancel
Returns: True if the operation was successful. Return type: bool
-
clone
(to_linode=None, region=None, instance_type=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
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-clone
Parameters: - to_linode – If an existing Linode is the target for the clone, the ID of that Linode. The existing Linode must have enough resources to accept the clone.
- region – This is the Region where the Linode will be deployed. Region can only be provided and is required when cloning to a new Linode.
- instance_type – A Linode’s Type determines what resources are available to it, including disk space, memory, and virtual cpus. The amounts available to a specific Linode are returned as specs on the Linode object.
- configs – An array of configuration profile IDs.
- disks – An array of disk IDs.
- label – The label to assign this Linode when cloning to a new Linode.
- group – A label used to group Linodes for display. Linodes are not required to have a group.
- with_backups – If this field is set to true, the created Linode will automatically be enrolled in the Linode Backup service. This will incur an additional charge.
Type: to_linode: int
Type: region: str
Type: instance_type: str
Type: configs: List of int
Type: disks: List of int
Type: label: str
Type: group: str
Type: with_backups: bool
Returns: The cloned Instance.
Return type:
-
config_create
(kernel=None, label=None, devices=[], disks=[], volumes=[], **kwargs)[source]¶ Creates a Linode Config with the given attributes.
API Documentation: https://www.linode.com/docs/api/linode-instances/#configuration-profile-create
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.
API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-create
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: https://www.linode.com/backups
API Documentation: https://www.linode.com/docs/api/linode-instances/#backups-enable
Returns: True if the operation was successful. Return type: bool
-
firewalls
()[source]¶ View Firewall information for Firewalls associated with this Linode.
API Documentation: https://www.linode.com/docs/api/linode-instances/#firewalls-list
Returns: A List of Firewalls of the Linode Instance. Return type: List[Firewall]
-
group
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
has_user_data
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
host_uuid
= <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
(region=None, upgrade=None)[source]¶ Initiates a pending migration that is already scheduled for this Linode Instance
API Documentation: https://www.linode.com/docs/api/linode-instances/#dc-migrationpending-host-migration-initiate
Parameters: - region – The region to which the Linode will be migrated. Must be a valid region slug. A list of regions can be viewed by using the GET /regions endpoint. A cross data center migration will cancel a pending migration that has not yet been initiated. A cross data center migration will initiate a linode_migrate_datacenter_create event.
- upgrade – When initiating a cross DC migration, setting this value to true will also ensure that the Linode is upgraded to the latest generation of hardware that corresponds to your Linode’s Type, if any free upgrades are available for it. If no free upgrades are available, and this value is set to true, then the endpoint will return a 400 error code and the migration will not be performed. If the data center set in the region field does not allow upgrades, then the endpoint will return a 400 error code and the migration will not be performed.
Type: region: str
Type: upgrade: bool
-
ip_allocate
(public=False)[source]¶ Allocates a new
IPAddress
for this Instance. Additional public IPs require justification, and you may need to open aSupportTicket
before you can add one. You may only have, at most, one private IP per Instance.API Documentation: https://www.linode.com/docs/api/linode-instances/#ipv4-address-allocate
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
API Documentation: https://www.linode.com/docs/api/linode-instances/#networking-information-list
Returns: A List of the ips of the Linode Instance. Return type: List[IPAddress]
-
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
-
mutate
(allow_auto_disk_resize=True)[source]¶ Upgrades this Instance to the latest generation type
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-upgrade
Parameters: allow_auto_disk_resize – Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. Defaults to true. Type: allow_auto_disk_resize: bool Returns: True if the operation was successful. Return type: bool
-
nodebalancers
()[source]¶ View a list of NodeBalancers that are assigned to this Linode and readable by the requesting User.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-nodebalancers-view
Returns: A List of Nodebalancers of the Linode Instance. Return type: List[Nodebalancer]
-
reboot
()[source]¶ Reboots a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a reboot.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-reboot
Returns: True if the operation was successful. Return type: bool
-
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.API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-rebuild
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]¶ Rescue Mode is a safe environment for performing many system recovery and disk management tasks. Rescue Mode is based on the Finnix recovery distribution, a self-contained and bootable Linux distribution. You can also use Rescue Mode for tasks other than disaster recovery, such as formatting disks to use different filesystems, copying data between disks, and downloading files from a disk via SSH and SFTP.
Note that “sdh” is reserved and unavailable during rescue.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-boot-into-rescue-mode
Parameters: disks – Devices that are either Disks or Volumes Type: disks: dict - Example usage:
- disks = {
- “sda”: {
- “disk_id”: 124458, “volume_id”: null
}, “sdb”: {
“disk_id”: null, “volume_id”: null}
}
-
reset_instance_root_password
(root_password=None)[source]¶ Resets the root password for this Linode.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-root-password-reset
Parameters: root_password – The root user’s password on this Linode. Linode passwords must meet a password strength score requirement that is calculated internally by the API. If the strength requirement is not met, you will receive a Password does not meet strength requirement error. Type: root_password: str
-
resize
(new_type, allow_auto_disk_resize=True, **kwargs)[source]¶ Resizes a Linode you have the read_write permission to a different Type. If any actions are currently running or queued, those actions must be completed first before you can initiate a resize. Additionally, the following criteria must be met in order to resize a Linode:
- The Linode must not have a pending migration.
- Your Account cannot have an outstanding balance.
- The Linode must not have more disk allocation than the new Type allows.
- In that situation, you must first delete or resize the disk to be smaller.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-resize
Parameters: - new_type – The Linode Type or the id representing it.
- allow_auto_disk_resize – Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s data must fit within the smaller disk size. Defaults to true.
Type: new_type: Type or int
Type: allow_auto_disk_resize: bool
Returns: True if the operation was successful.
Return type: bool
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
shutdown
()[source]¶ Shuts down a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a shutdown.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-shut-down
Returns: True if the operation was successful. Return type: bool
-
snapshot
(label=None)[source]¶ Creates a snapshot Backup of a Linode.
Important: If you already have a snapshot of this Linode, this is a destructive action. The previous snapshot will be deleted.
API Documentation: https://www.linode.com/docs/api/linode-instances/#snapshot-create
Parameters: label – The label for the new snapshot. Type: label: str Returns: The snapshot Backup created. Return type: Backup
-
specs
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
stats
¶ Returns the JSON stats for this Instance
API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-statistics-view
Returns: The JSON stats for this Instance Return type: dict
-
stats_for
(dt)[source]¶ Returns stats for the month containing the given datetime
API Documentation: https://www.linode.com/docs/api/linode-instances/#statistics-view-yearmonth
Parameters: dt – A Datetime for which to return statistics Type: dt: Datetime Returns: The JSON stats for this Instance at the specified Datetime Return type: dict
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
transfer
¶ Get per-linode transfer
API Documentation: https://www.linode.com/docs/api/linode-instances/#network-transfer-view
Returns: The network transfer statistics for the current month. Return type: MappedObject
-
transfer_year_month
(year, month)[source]¶ Get per-linode transfer for specified month
API Documentation: https://www.linode.com/docs/api/linode-instances/#network-transfer-view-yearmonth
Parameters: - year – Numeric value representing the year to look up.
- month – Numeric value representing the month to look up.
Type: year: int
Type: month: int
Returns: The network transfer statistics for the specified month.
Return type: MappedObject
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
volumes
()[source]¶ View Block Storage Volumes attached to this Linode.
API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes-volumes-list
Returns: A List of Volumes of the Linode Instance. Return type: List[Volume]
-
watchdog_enabled
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
-
class
linode_api4.objects.linode.
Kernel
(client, id, json={})[source]¶ The primary component of every Linux system. The kernel interfaces with the system’s hardware and it controls the operating system’s core functionality.
Your Compute Instance is capable of running one of three kinds of kernels:
- Upstream kernel (or distribution-supplied kernel): This kernel is maintained and provided by your Linux distribution. A major benefit of this kernel is that the distribution was designed with this kernel in mind and all updates are managed through the distributions package management system. It also may support features not present in the Linode kernel (for example, SELinux).
- Linode kernel: Linode also maintains kernels that can be used on a Compute Instance. If selected, these kernels are provided to your Compute Instance at boot (not directly installed on your system). The Current Kernels page displays a list of all the available Linode kernels.
- Custom-compiled kernel: A kernel that you compile from source. Compiling a kernel can let you use features not available in the upstream or Linode kernels, but it takes longer to compile the kernel from source than to download it from your package manager. For more information on custom compiled kernels, review our guides for Debian, Ubuntu, and CentOS.
API Documentation: https://www.linode.com/docs/api/linode-instances/#kernel-view
-
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>¶
-
built
= <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
-
pvops
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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]¶ A script allowing users to reproduce specific software configurations when deploying Compute Instances, with more user control than static system images.
API Documentation: https://www.linode.com/docs/api/stackscripts/#stackscript-view
-
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
-
mine
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
rev_note
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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>¶
-
classmethod
-
class
linode_api4.objects.linode.
Type
(client, id, json={})[source]¶ Linode Plan type to specify the resources available to a Linode Instance.
API Documentation: https://www.linode.com/docs/api/linode-types/#type-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
successor
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
transfer
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
type_class
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
vcpus
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-version-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
-
class
linode_api4.objects.lke.
LKECluster
(client, id, json={})[source]¶ An LKE Cluster is a single k8s cluster deployed via Linode Kubernetes Engine.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-view
-
api_endpoints
¶ A list of API Endpoints for this Cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-api-endpoints-list
Returns: A list of MappedObjects of the API Endpoints Return type: List[MappedObject]
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
cluster_dashboard_url_view
()[source]¶ Get a Kubernetes Dashboard access URL for this Cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-dashboard-url-view
Returns: The Kubernetes Dashboard access URL for this Cluster. Return type: str
-
cluster_nodes_recycle
()[source]¶ Recycles all nodes in all pools of a designated Kubernetes Cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#cluster-nodes-recycle
-
cluster_regenerate
()[source]¶ Regenerate the Kubeconfig file and/or the service account token for a Cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-regenerate
-
control_plane
= <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>¶
-
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.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubeconfig-view
Returns: The Kubeconfig file for this Cluster. Return type: str
-
kubeconfig_delete
()[source]¶ Delete and regenerate the Kubeconfig file for a Cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubeconfig-delete
-
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_delete
(nodeId)[source]¶ Delete a specific Node from a Node Pool.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-delete
Parameters: nodeId (str) – ID of the Node to delete.
-
node_pool_create
(node_type, node_count, **kwargs)[source]¶ Creates a new
LKENodePool
for this cluster.API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-pool-create
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: - node_type (
-
node_recycle
(nodeId)[source]¶ Recycle a specific Node from an LKE cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-recycle
Parameters: nodeId (str) – ID of the Node to recycle.
-
node_view
(nodeId)[source]¶ Get a specific Node by ID.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-view
Parameters: nodeId (str) – ID of the Node to look up. Returns: The specified Node Return type: LKENodePoolNode
-
pools
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
region
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
service_token_delete
()[source]¶ Delete and regenerate the service account token for a Cluster.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#service-token-delete
-
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.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-pool-view
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
autoscaler
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
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.
API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-pool-recycle
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
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]¶ A Longview Client that is accessible for use. Longview is Linode’s system data graphing service.
API Documentation: https://www.linode.com/docs/api/longview/#longview-client-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
-
class
linode_api4.objects.longview.
LongviewPlan
(client, id, json={})[source]¶ The current Longview Plan an account is using.
API Documentation: https://www.linode.com/docs/api/longview/#longview-plan-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
-
class
linode_api4.objects.longview.
LongviewSubscription
(client, id, json={})[source]¶ Contains the Longview Plan details for a specific subscription id.
API Documentation: https://www.linode.com/docs/api/longview/#longview-subscription-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
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.
An instance of a Linode Cloud Firewall.
API Documentation: https://www.linode.com/docs/api/networking/#firewall-view
-
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
API Documentation: https://www.linode.com/docs/api/networking/#firewall-device-create
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>¶
-
get_rules
()[source]¶ Gets the JSON rules for this Firewall.
API Documentation: https://www.linode.com/docs/api/networking/#firewall-rules-update__request-samples
Returns: The rules that this Firewall is currently configured with. Return type: dict
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
update_rules
(rules)[source]¶ Sets the JSON rules for this Firewall.
API Documentation: https://www.linode.com/docs/api/networking/#firewall-rules-update__request-samples
Parameters: rules (dict) – The rules to apply to this Firewall.
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.networking.
FirewallDevice
(client, id, parent_id, json={})[source]¶ An object representing the assignment between a Linode Firewall and another Linode resource.
API Documentation: https://www.linode.com/docs/api/networking/#firewall-device-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.networking.
IPAddress
(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.
Represents a Linode IP address object.
When attempting to reset the rdns field to default, consider using the ExplicitNullValue class:
ip = IPAddress(client, "127.0.0.1") ip.rdns = ExplicitNullValue ip.save() # Re-populate all attributes with new information from the API ip.invalidate()
API Documentation: https://www.linode.com/docs/api/networking/#ip-address-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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]¶ DEPRECATED
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
-
class
linode_api4.objects.networking.
IPv6Range
(client, id, json={})[source]¶ An instance of a Linode IPv6 Range.
API Documentation: https://www.linode.com/docs/api/networking/#ipv6-range-view
-
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
-
is_bgp
= <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
-
prefix
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
range
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
region
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
route_target
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
-
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.
An instance of a Linode VLAN. VLANs provide a mechanism for secure communication between two or more Linodes that are assigned to the same VLAN. VLANs are implicitly created during Instance or Instance Config creation.
API Documentation: https://www.linode.com/docs/api/networking/#vlans-list
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
Nodebalancer Models¶
-
class
linode_api4.objects.nodebalancer.
NodeBalancer
(client, id, json={})[source]¶ A single NodeBalancer you can access.
API documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancer-view
-
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
(**kwargs)[source]¶ Creates a NodeBalancer Config, which allows the NodeBalancer to accept traffic on a new port. You will need to add NodeBalancer Nodes to the new Config before it can actually serve requests.
API documentation: https://www.linode.com/docs/api/nodebalancers/#config-create
Returns: The config that created successfully. Return type: NodeBalancerConfig
-
config_rebuild
(config_id, nodes, **kwargs)[source]¶ Rebuilds a NodeBalancer Config and its Nodes that you have permission to modify. Use this command to update a NodeBalancer’s Config and Nodes with a single request.
API documentation: https://www.linode.com/docs/api/nodebalancers/#config-rebuild
Parameters: - config_id (int) – The ID of the Config to access.
- nodes ([{ address: str, id: int, label: str, mode: str, weight: int }]) – The NodeBalancer Node(s) that serve this Config.
Returns: A nodebalancer config that rebuilt successfully.
Return type:
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
statistics
()[source]¶ Returns detailed statistics about the requested NodeBalancer.
API documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancer-statistics-view
Returns: The requested stats. Return type: MappedObject
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
transfer
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.nodebalancer.
NodeBalancerConfig
(client, id, parent_id, json={})[source]¶ The configuration information for a single port of this NodeBalancer.
API documentation: https://www.linode.com/docs/api/nodebalancers/#config-view
-
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]¶ Creates a NodeBalancer Node, a backend that can accept traffic for this NodeBalancer Config. Nodes are routed requests on the configured port based on their status.
API documentation: https://www.linode.com/docs/api/nodebalancers/#node-create
Parameters: - address (str) – The private IP Address where this backend can be reached. This must be a private IP address.
- label (str) – The label for this node. This is for display purposes only. Must have a length between 2 and 32 characters.
Returns: The node which is created successfully.
Return type:
-
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
Returns a paginated list of NodeBalancer nodes associated with this Config. These are the backends that will be sent traffic for this port.
API documentation: https://www.linode.com/docs/api/nodebalancers/#nodes-list
Returns: A paginated list of NodeBalancer nodes. Return type: PaginatedList of NodeBalancerNode
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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]¶ The information about a single Node, a backend for this NodeBalancer’s configured port.
API documentation: https://www.linode.com/docs/api/nodebalancers/#node-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
weight
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
Object Storage Models¶
-
class
linode_api4.objects.object_storage.
ObjectStorageACL
[source]¶ -
AUTHENTICATED_READ
= 'authenticated-read'¶
-
CUSTOM
= 'custom'¶
-
PRIVATE
= 'private'¶
-
PUBLIC_READ
= 'public-read'¶
-
PUBLIC_READ_WRITE
= 'public-read-write'¶
-
-
class
linode_api4.objects.object_storage.
ObjectStorageBucket
(client, id, parent_id, json={})[source]¶ A bucket where objects are stored in.
API documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-view
-
access
(cluster, bucket_name, permissions)[source]¶ Returns a dict formatted to be included in the bucket_access argument of
keys_create
. See the docs for that method for an example of usage.Parameters: - cluster (
ObjectStorageCluster
or str) – The Object Storage cluster to grant access in. - bucket_name (str) – The name of the bucket to grant access to.
- permissions (str) – The permissions to grant. Should be one of “read_only” or “read_write”.
Returns: A dict formatted correctly for specifying bucket access for new keys.
Return type: dict
- cluster (
-
access_modify
(acl: linode_api4.objects.object_storage.ObjectStorageACL = None, cors_enabled=None)[source]¶ Allows changing basic Cross-origin Resource Sharing (CORS) and Access Control Level (ACL) settings. Only allows enabling/disabling CORS for all origins, and/or setting canned ACLs. For more fine-grained control of both systems, please use the more fully-featured S3 API directly.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-access-modify
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
- acl (str Enum: private,public-read,authenticated-read,public-read-write) – The Access Control Level of the bucket using a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly.
- cors_enabled (bool) – If true, the bucket will be created with CORS enabled for all origins. For more fine-grained controls of CORS, use the S3 API directly.
-
access_update
(acl: linode_api4.objects.object_storage.ObjectStorageACL = None, cors_enabled=None)[source]¶ Allows changing basic Cross-origin Resource Sharing (CORS) and Access Control Level (ACL) settings. Only allows enabling/disabling CORS for all origins, and/or setting canned ACLs. For more fine-grained control of both systems, please use the more fully-featured S3 API directly.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-access-update
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
- acl (str Enum: private,public-read,authenticated-read,public-read-write) – The Access Control Level of the bucket using a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly.
- cors_enabled (bool) – If true, the bucket will be created with CORS enabled for all origins. For more fine-grained controls of CORS, use the S3 API directly.
-
classmethod
api_list
()[source]¶ Override this method to return the correct URL that will produce a list of JSON objects of this class’ type - Object Storage Bucket.
-
cluster
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
contents
(marker=None, delimiter=None, prefix=None, page_size=100)[source]¶ Returns the contents of a bucket. The contents are paginated using a marker, which is the name of the last object on the previous page. Objects may be filtered by prefix and delimiter as well; see Query Parameters for more information.
This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-contents-list
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
- marker (str) – The “marker” for this request, which can be used to paginate through large buckets. Its value should be the value of the next_marker property returned with the last page. Listing bucket contents does not support arbitrary page access. See the next_marker property in the responses section for more details.
- delimiter (str) – The delimiter for object names; if given, object names will be returned up to the first occurrence of this character. This is most commonly used with the / character to allow bucket transversal in a manner similar to a filesystem, however any delimiter may be used. Use in conjunction with prefix to see object names past the first occurrence of the delimiter.
- prefix – Filters objects returned to only those whose name start with the given prefix. Commonly used in conjunction with delimiter to allow transversal of bucket contents in a manner similar to a filesystem.
- page_size (int 25..500) – The number of items to return per page. Defaults to 100.
Returns: A list of the MappedObject of the requested bucket’s contents.
Return type: [MappedObject]
-
created
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
delete
()¶ Sends a DELETE request for this object
-
hostname
= <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)[source]¶ Override this method to pass in the parent_id from the _raw_json object when it’s available.
-
object_acl_config
(name=None)[source]¶ View an Object’s configured Access Control List (ACL) in this Object Storage bucket. ACLs define who can access your buckets and objects and specify the level of access granted to those users.
This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-object-acl-config-view
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
- name (str) – The name of the object for which to retrieve its Access Control List (ACL). Use the Object Storage Bucket Contents List endpoint to access all object names in a bucket.
Returns: The Object’s canned ACL and policy.
Return type: MappedObject
-
object_acl_config_update
(acl: linode_api4.objects.object_storage.ObjectStorageACL, name)[source]¶ Update an Object’s configured Access Control List (ACL) in this Object Storage bucket. ACLs define who can access your buckets and objects and specify the level of access granted to those users.
This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-object-acl-config-update
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
- acl (str Enum: private,public-read,authenticated-read,public-read-write,custom) – The Access Control Level of the bucket, as a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly.
- name (str) – The name of the object for which to retrieve its Access Control List (ACL). Use the Object Storage Bucket Contents List endpoint to access all object names in a bucket.
Returns: The Object’s canned ACL and policy.
Return type: MappedObject
-
objects
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
ssl_cert
()[source]¶ Returns a result object which wraps a bool value indicating if this bucket has a corresponding TLS/SSL certificate that was uploaded by an Account user.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-tlsssl-cert-view
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
Returns: A result object which has a bool field indicating if this Bucket has a corresponding TLS/SSL certificate that was uploaded by an Account user.
Return type: MappedObject
-
ssl_cert_delete
()[source]¶ Deletes this Object Storage bucket’s user uploaded TLS/SSL certificate and private key.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-tlsssl-cert-delete
Parameters: - cluster_id (str) – The ID of the cluster this bucket exists in.
- bucket (str) – The bucket name.
Returns: True if the TLS/SSL certificate and private key in the bucket were successfully deleted.
Return type: bool
-
ssl_cert_upload
(certificate, private_key)[source]¶ Upload a TLS/SSL certificate and private key to be served when you visit your Object Storage bucket via HTTPS. Your TLS/SSL certificate and private key are stored encrypted at rest.
To replace an expired certificate, delete your current certificate and upload a new one.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-tlsssl-cert-upload
param cluster_id: The ID of the cluster this bucket exists in. type cluster_id: str param bucket: The bucket name. type bucket: str param certificate: Your Base64 encoded and PEM formatted SSL certificate. Line breaks must be represented as “ - ” in the string
- for requests (but not when using the Linode CLI)
type certificate: str param private_key: The private key associated with this TLS/SSL certificate. Line breaks must be represented as “ - ” in the string
- for requests (but not when using the Linode CLI)
type private_key: str returns: A result object which has a bool field indicating if this Bucket has a corresponding TLS/SSL certificate that was uploaded by an Account user. rtype: MappedObject
-
-
class
linode_api4.objects.object_storage.
ObjectStorageCluster
(client, id, json={})[source]¶ A cluster where Object Storage is available.
API documentation: https://www.linode.com/docs/api/object-storage/#cluster-view
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
buckets_in_cluster
(*filters)[source]¶ Returns a list of Buckets in this cluster belonging to this Account.
This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.
API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-buckets-in-cluster-list
Parameters: filters – Any number of filters to apply to this query. See Filtering Collections for more details on filtering. Returns: A list of Object Storage Buckets that in the requested cluster. Return type: PaginatedList of ObjectStorageBucket
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
static_site_domain
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.object_storage.
ObjectStorageKeys
(client, id, json={})[source]¶ A keypair that allows third-party applications to access Linode Object Storage.
API documentation: https://www.linode.com/docs/api/object-storage/#object-storage-key-view
-
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
-
bucket_access
= <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>¶
-
limited
= <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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
secret_key
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
Profile Models¶
-
class
linode_api4.objects.profile.
AuthorizedApp
(client, id, json={})[source]¶ An application with authorized access to an account.
API Documentation: https://www.linode.com/docs/api/profile/#authorized-app-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
scopes
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
thumbnail_url
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
website
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.profile.
PersonalAccessToken
(client, id, json={})[source]¶ A Person Access Token associated with a Profile.
API Documentation: https://www.linode.com/docs/api/profile/#personal-access-token-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
scopes
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
token
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.profile.
Profile
(client, id, json={})[source]¶ A Profile containing information about the current User.
API Documentation: https://www.linode.com/docs/api/profile/#profile-view
-
add_whitelist_entry
(address, netmask, note=None)[source]¶ Adds a new entry to this user’s IP whitelist, if enabled
DEPRECATED: Limited to customers with a feature tag
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
authentication_type
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
confirm_tfa
(code)[source]¶ Confirms TFA for an account. Needs a TFA code generated by enable_tfa
API Documentation: https://www.linode.com/docs/api/profile/#two-factor-authentication-confirmenable
Parameters: code (str) – The Two Factor code you generated with your Two Factor secret. These codes are time-based, so be sure it is current. Returns: Returns true if operation was successful Return type: bool
-
delete
()¶ Sends a DELETE request for this object
-
disable_tfa
()[source]¶ Turns off TFA for this user’s account.
API Documentation: https://www.linode.com/docs/api/profile/#two-factor-authentication-disable
Returns: Returns true if operation was successful Return type: bool
-
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.
API Documentation: https://www.linode.com/docs/api/profile/#two-factor-secret-create
Returns: The TFA secret Return type: str
-
grants
¶ Returns grants for the current user
API Documentation: https://www.linode.com/docs/api/profile/#grants-list
Returns: The grants for the current user Return type: UserGrants
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
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>¶
-
verified_phone_number
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
whitelist
¶ Returns the user’s whitelist entries, if whitelist is enabled
DEPRECATED: Limited to customers with a feature tag
-
-
class
linode_api4.objects.profile.
ProfileLogin
(client, id, json={})[source]¶ A Login object displaying information about a successful account login from this user.
API Documentation: https://www.linode.com/docs/api/profile/#login-view
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
datetime
= <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
-
ip
= <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
-
restricted
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
username
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.profile.
SSHKey
(client, id, json={})[source]¶ An SSH Public Key uploaded to your profile for use in Linode Instance deployments.
API Documentation: https://www.linode.com/docs/api/profile/#ssh-key-view
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
ssh_key
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.profile.
TrustedDevice
(client, id, json={})[source]¶ A Trusted Device for a User.
API Documentation: https://www.linode.com/docs/api/profile/#trusted-device-view
-
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
-
last_authenticated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
last_remote_addr
= <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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
user_agent
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
-
class
linode_api4.objects.profile.
WhitelistEntry
(client, id, json={})[source]¶ DEPRECATED: Limited to customers with a feature tag
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
Region Models¶
-
class
linode_api4.objects.region.
Region
(client, id, json={})[source]¶ A Region. Regions correspond to individual data centers, each located in a different geographical area.
API Documentation: https://www.linode.com/docs/api/regions/#region-view
-
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
-
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
-
resolvers
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
Support Models¶
-
class
linode_api4.objects.support.
SupportTicket
(client, id, json={})[source]¶ An objected representing a Linode Support Ticket.
API Documentation: https://www.linode.com/docs/api/support/#replies-list
-
classmethod
api_list
()¶ Returns a URL that will produce a list of JSON objects of this class’ type
-
attachments
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
closable
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
closed
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
delete
()¶ Sends a DELETE request for this object
-
description
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
domain
¶ If applicable, the Domain referenced in this ticket.
Returns: The Domain referenced in this ticket. Return type: Optional[Domain]
-
entity
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
gravatar_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
-
linode
¶ If applicable, the Linode referenced in this ticket.
Returns: The Linode referenced in this ticket. Return type: Optional[Instance]
-
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
¶ If applicable, the NodeBalancer referenced in this ticket.
Returns: The NodeBalancer referenced in this ticket. Return type: Optional[NodeBalancer]
-
opened
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
opened_by
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
post_reply
(description)[source]¶ Adds a reply to an existing Support Ticket.
API Documentation: https://www.linode.com/docs/api/support/#reply-create
Parameters: description (str) – The content of this Support Ticket Reply. Returns: The new TicketReply object. Return type: Optional[TicketReply]
-
replies
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
summary
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
support_ticket_close
()[source]¶ Closes a Support Ticket.
API Documentation: https://www.linode.com/docs/api/support/#support-ticket-close
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated_by
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
upload_attachment
(attachment: Union[pathlib.Path, str])[source]¶ Uploads an attachment to an existing Support Ticket.
API Documentation: https://www.linode.com/docs/api/support/#support-ticket-attachment-create
Parameters: attachment (str) – A path to the file to upload as an attachment. Returns: Whether the upload operation was successful. Return type: bool
-
classmethod
-
class
linode_api4.objects.support.
TicketReply
(client, id, parent_id, json={})[source]¶ A reply to a Support Ticket.
API Documentation: https://www.linode.com/docs/api/support/#replies-list
-
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
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
ticket_id
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod
Tag Models¶
-
class
linode_api4.objects.tag.
Tag
(client, id, json={})[source]¶ A User-defined labels attached to objects in your Account, such as Linodes. Used for specifying and grouping attributes of objects that are relevant to the User.
API Documentation: https://www.linode.com/docs/api/tags/#tags-list
-
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.
API Documentation: https://www.linode.com/docs/api/tags/#tagged-objects-list
Returns: Objects with this Tag Return type: PaginatedList of objects with this Tag
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
classmethod
-
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
Return type:
-
classmethod
Volume Models¶
-
class
linode_api4.objects.volume.
Volume
(client, id, json={})[source]¶ A single Block Storage Volume. Block Storage Volumes are persistent storage devices that can be attached to a Compute Instance and used to store any type of data.
API Documentation: https://www.linode.com/docs/api/volumes/#volume-view
-
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.
API Documentation: https://www.linode.com/docs/api/volumes/#volume-attach
Parameters:
-
clone
(label)[source]¶ Clones this volume to a new volume in the same region with the given label
API Documentation: https://www.linode.com/docs/api/volumes/#volume-clone
Parameters: label (str) – The label for the new volume. Returns: The new volume object. Return type: Volume
-
created
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
delete
()¶ Sends a DELETE request for this object
-
detach
()[source]¶ Detaches this Volume if it is attached
API Documentation: https://www.linode.com/docs/api/volumes/#volume-detach
Returns: Returns true if operation was successful Return type: bool
-
filesystem_path
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
hardware_type
= <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>¶
-
linode_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>¶
-
resize
(size)[source]¶ Resizes this Volume
API Documentation: https://www.linode.com/docs/api/volumes/#volume-resize
Parameters: size (int) – The Volume’s size, in GiB. Returns: Returns true if operation was successful Return type: bool
-
save
(force=True) → bool¶ Send this object’s mutable values to the server in a PUT request.
Parameters: force (bool) – If true, this method will always send a PUT request regardless of whether the field has been explicitly updated. For optimization purposes, this field should be set to false for typical update operations. (Defaults to True)
-
size
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
status
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
updated
= <linode_api4.objects.filtering.FilterableAttribute object>¶
-
classmethod