# `sc_crawler.vendors._upcloud`

> Inventory of UpCloud via its API: servers, storages, traffic, IPv4 addresses and managed PostgreSQL, with their prices.

# `sc_crawler.vendors._upcloud`

**Functions:**

- [**inventory_compliance_frameworks**](#inventory_compliance_frameworks) – Manual list of known compliance frameworks at UpCloud.
- [**inventory_regions**](#inventory_regions) – List all regions via API call.
- [**inventory_zones**](#inventory_zones) – List all regions as availability zones.
- [**inventory_servers**](#inventory_servers) – List all server plans from UpCloud API.
- [**inventory_server_prices**](#inventory_server_prices) – List all on-demand server prices in all zones from the UpCloud price list.
- [**inventory_server_prices_spot**](#inventory_server_prices_spot) – List all spot server prices in all zones from the UpCloud price list.
- [**inventory_storages**](#inventory_storages) – Block storage tiers collected manually.
- [**inventory_storage_prices**](#inventory_storage_prices) – List block storage prices in all zones from the UpCloud price list.
- [**inventory_traffic_prices**](#inventory_traffic_prices) – List outbound traffic prices in all zones from the UpCloud price list.
- [**inventory_ipv4_prices**](#inventory_ipv4_prices) – List IPv4 address prices in all zones from the UpCloud price list.
- [**inventory_databases**](#inventory_databases) – List UpCloud managed PostgreSQL service plans.
- [**inventory_database_prices**](#inventory_database_prices) – List UpCloud managed PostgreSQL compute prices.
- [**inventory_database_storages**](#inventory_database_storages) – List managed PostgreSQL disk tiers (Standard SSD and MaxIOPS).
- [**inventory_database_storage_prices**](#inventory_database_storage_prices) – List managed PostgreSQL disk tier prices from the UpCloud zone price list.

## func <code class="doc-name">inventory_compliance_frameworks</code> [_upcloud.py:687–695](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L687-L695)

```python
inventory_compliance_frameworks(vendor)
```

Manual list of known compliance frameworks at UpCloud.

Data collected from their Security and Standards docs at
<https://upcloud.com/security-privacy>.

## func <code class="doc-name">inventory_regions</code> [_upcloud.py:698–871](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L698-L871)

```python
inventory_regions(vendor)
```

List all regions via API call.

Data manually enriched from <https://upcloud.com/data-centres>.

## func <code class="doc-name">inventory_zones</code> [_upcloud.py:874–893](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L874-L893)

```python
inventory_zones(vendor)
```

List all regions as availability zones.

There is no concept of having multiple availability zones withing
a region (virtual datacenter) at UpCloud, so creating 1-1
dummy Zones reusing the Region id and name.

## func <code class="doc-name">inventory_servers</code> [_upcloud.py:896–996](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L896-L996)

```python
inventory_servers(vendor)
```

List all server plans from UpCloud API.

Lifecycle: `current_offering == "no"` -> RETIRED; GPU plans with zero stock
in `/device/availability` across all regions -> INACTIVE; otherwise ACTIVE.
See `_upcloud_server_status`.

## func <code class="doc-name">inventory_server_prices</code> [_upcloud.py:999–1043](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L999-L1043)

```python
inventory_server_prices(vendor)
```

List all on-demand server prices in all zones from the UpCloud price list.

GPU plans are listed only in the zones where they are available. Servers
are billed hourly up to a monthly cap of 672 hours, described as tiered
prices.

## func <code class="doc-name">inventory_server_prices_spot</code> [_upcloud.py:1046–1080](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1046-L1080)

```python
inventory_server_prices_spot(vendor)
```

List all spot server prices in all zones from the UpCloud price list.

GPU plans are listed only in the zones where they are available.

## func <code class="doc-name">inventory_storages</code> [_upcloud.py:1083–1100](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1083-L1100)

```python
inventory_storages(vendor)
```

Block storage tiers collected manually.

## func <code class="doc-name">inventory_storage_prices</code> [_upcloud.py:1103–1124](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1103-L1124)

```python
inventory_storage_prices(vendor)
```

List block storage prices in all zones from the UpCloud price list.

UpCloud charges storage per hour, converted to monthly prices as at other
vendors.

## func <code class="doc-name">inventory_traffic_prices</code> [_upcloud.py:1127–1152](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1127-L1152)

```python
inventory_traffic_prices(vendor)
```

List outbound traffic prices in all zones from the UpCloud price list.

Inbound traffic is free.

## func <code class="doc-name">inventory_ipv4_prices</code> [_upcloud.py:1155–1171](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1155-L1171)

```python
inventory_ipv4_prices(vendor)
```

List IPv4 address prices in all zones from the UpCloud price list.

## func <code class="doc-name">inventory_databases</code> [_upcloud.py:1282–1535](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1282-L1535)

```python
inventory_databases(vendor)
```

List UpCloud managed PostgreSQL service plans.

- Flexible Developer/Standard/High Memory shapes from GET /1.3/database/plans.
- Legacy bundled plans from GET /1.3/database/service-types/pg.
- Supported versions come from service-types/pg `properties.version.enum`.
https://developers.upcloud.com/1.3/16-managed-database/
https://upcloud.com/docs/products/managed-postgresql/configurations/
https://upcloud.com/global/pricing/

## func <code class="doc-name">inventory_database_prices</code> [_upcloud.py:1538–1622](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1538-L1622)

```python
inventory_database_prices(vendor)
```

List UpCloud managed PostgreSQL compute prices.

Legacy plans bill the full cluster under ``managed_database_{plan}``.
Flexible plans bill per-node compute under
``managed_database_compute_{plan_compute}``. Node topology maps to:
1 node NONE/NONE, 2-node package SINGLE_ZONE/PASSIVE_STANDBY (1.9x),
3-node package SINGLE_ZONE/READABLE_CLUSTER (2.6x) with published
multi-node discounts (PASSIVE is only a price key when both 2 and 3
are orderable on the same compute shape).
https://upcloud.com/global/pricing/

## func <code class="doc-name">inventory_database_storages</code> [_upcloud.py:1717–1746](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1717-L1746)

```python
inventory_database_storages(vendor)
```

List managed PostgreSQL disk tiers (Standard SSD and MaxIOPS).

Flexible plans bill all disk via these meters; legacy plans also use
Standard tiered storage for additional disk above the bundled size.
Size bounds are per tier (Developer/legacy → Standard; Std/HM → MaxIOPS).
https://upcloud.com/global/pricing/
https://upcloud.com/docs/products/block-storage/tiers/
https://developers.upcloud.com/1.3/16-managed-database/

## func <code class="doc-name">inventory_database_storage_prices</code> [_upcloud.py:1749–1784](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_upcloud.py#L1749-L1784)

```python
inventory_database_storage_prices(vendor)
```

List managed PostgreSQL disk tier prices from the UpCloud zone price list.
