ServerTypesClient
- class ServerTypesClient(client: Client)[source]
- get_all(name: str | None = None) list[BoundServerType] [source]
Get all Server types
- Parameters:
name – str (optional) Can be used to filter server type by their name.
- Returns:
List[
BoundServerType
]
- get_by_id(id: int) BoundServerType [source]
Returns a specific Server Type.
- Parameters:
id – int
- Returns:
- get_by_name(name: str) BoundServerType | None [source]
Get Server type by name
- Parameters:
name – str Used to get Server type by name.
- Returns:
- get_list(name: str | None = None, page: int | None = None, per_page: int | None = None) ServerTypesPageResult [source]
Get a list of Server types
- Parameters:
name – str (optional) Can be used to filter server type by their name.
page – int (optional) Specifies the page to fetch
per_page – int (optional) Specifies how many results are returned by page
- Returns:
(List[
BoundServerType
],Meta
)
- class BoundServerType(client: ClientEntityBase, data: dict, complete: bool = True)[source]
- model
alias of
ServerType
- class ServerType(id: int | None = None, name: str | None = None, description: str | None = None, cores: int | None = None, memory: int | None = None, disk: int | None = None, prices: dict | None = None, storage_type: str | None = None, cpu_type: str | None = None, architecture: str | None = None, deprecated: bool | None = None, deprecation: dict | None = None, included_traffic: int | None = None)[source]
ServerType Domain
- Parameters:
id – int ID of the server type
name – str Unique identifier of the server type
description – str Description of the server type
cores – int Number of cpu cores a server of this type will have
memory – int Memory a server of this type will have in GB
disk – int Disk size a server of this type will have in GB
prices – Dict Prices in different locations
storage_type – str Type of server boot drive. Local has higher speed. Network has better availability. Choices: local, network
cpu_type – string Type of cpu. Choices: shared, dedicated
architecture – string Architecture of cpu. Choices: x86, arm
deprecated – bool True if server type is deprecated. This field is deprecated. Use deprecation instead.
deprecation –
DeprecationInfo
, None Describes if, when & how the resources was deprecated. If this field is set to None the resource is not deprecated. If it has a value, it is considered deprecated.included_traffic – int Free traffic per month in bytes