# `sc_crawler.vendors._alicloud`

> Inventory of Alibaba Cloud via its APIs: servers, storages, traffic and IPv4 addresses, with their prices.

# `sc_crawler.vendors._alicloud`

**Functions:**

- [**inventory_compliance_frameworks**](#inventory_compliance_frameworks) – Manual list of compliance frameworks known for Alibaba Cloud.
- [**inventory_regions**](#inventory_regions) – List all available Alibaba Cloud regions.
- [**inventory_zones**](#inventory_zones) – List all availability zones.
- [**inventory_servers**](#inventory_servers) – List all server types at Alibaba Cloud using the `DescribeInstanceTypes` API endpoint.
- [**inventory_server_prices**](#inventory_server_prices) – Fetch server pricing and regional availability using the `QuerySkuPriceListRequest` API endpoint.
- [**inventory_server_prices_spot**](#inventory_server_prices_spot) – Fetch spot instance pricing by time-based sampling of on-demand instances per region.
- [**inventory_storages**](#inventory_storages) – List all block storage offerings.
- [**inventory_storage_prices**](#inventory_storage_prices) – Fetch server prices using the `QuerySkuPriceListRequest` API endpoint.
- [**inventory_traffic_prices**](#inventory_traffic_prices) – Collect inbound and outbound traffic prices of Alibaba Cloud regions.
- [**inventory_ipv4_prices**](#inventory_ipv4_prices) – Static IPv4 pricing of Alibaba Cloud regions.

## func <code class="doc-name">inventory_compliance_frameworks</code> [_alicloud.py:1683–1690](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L1683-L1690)

```python
inventory_compliance_frameworks(vendor)
```

Manual list of compliance frameworks known for Alibaba Cloud.

Resources: <https://www.alibabacloud.com/en/trust-center/compliance>

## func <code class="doc-name">inventory_regions</code> [_alicloud.py:1693–1730](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L1693-L1730)

```python
inventory_regions(vendor)
```

List all available Alibaba Cloud regions.

Data sources:

- <https://api.alibabacloud.com/document/Ecs/2014-05-26/DescribeRegions>
- Foundation year collected from <https://www.alibabacloud.com/en/global-locations?_p_lc=1>
- Aliases (old region names) collected from <https://help.aliyun.com/zh/user-center/product-overview/regional-name-change-announcement>

## func <code class="doc-name">inventory_zones</code> [_alicloud.py:1733–1776](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L1733-L1776)

```python
inventory_zones(vendor)
```

List all availability zones.

## func <code class="doc-name">inventory_servers</code> [_alicloud.py:1779–2034](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L1779-L2034)

```python
inventory_servers(vendor)
```

List all server types at Alibaba Cloud using the `DescribeInstanceTypes` API endpoint.

Lifecycle (`DescribeAvailableResource` `StatusCategory`): WithStock and
WithoutStock (out of stock, but replenished) -> ACTIVE,
ClosedWithStock -> PLANNED_FOR_RETIREMENT, ClosedWithoutStock -> RETIRED;
missing in availability response -> INACTIVE. The retirement date of the
PLANNED_FOR_RETIREMENT and RETIRED ones is from `_ALICLOUD_RETIREMENT_RULES`.

## func <code class="doc-name">inventory_server_prices</code> [_alicloud.py:2037–2105](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L2037-L2105)

```python
inventory_server_prices(vendor)
```

Fetch server pricing and regional availability using the `QuerySkuPriceListRequest` API endpoint.

Alternative approach could be looking at <https://g.alicdn.com/aliyun/ecs-price-info-intl/2.0.375/price/download/instancePrice.json>.

## func <code class="doc-name">inventory_server_prices_spot</code> [_alicloud.py:2108–2235](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L2108-L2235)

```python
inventory_server_prices_spot(vendor)
```

Fetch spot instance pricing by time-based sampling of on-demand instances per region.

Each region worker fetches spot prices for a random sample of instances within sample_time,
adapting to different response times, parallelized across regions.

## func <code class="doc-name">inventory_storages</code> [_alicloud.py:2238–2329](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L2238-L2329)

```python
inventory_storages(vendor)
```

List all block storage offerings.

Data sources:

- <https://www.alibabacloud.com/help/en/ecs/user-guide/essds>
- <https://www.alibabacloud.com/help/en/ecs/developer-reference/api-ecs-2014-05-26-createdisk>
- <https://www.alibabacloud.com/help/en/ecs/user-guide/block-storage-performance>

Capacity ranges are specified in GiB in the Alibaba Cloud documentation and are
converted to GB here. Throughput values are in MB/s as per the documentation.

## func <code class="doc-name">inventory_storage_prices</code> [_alicloud.py:2332–2371](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L2332-L2371)

```python
inventory_storage_prices(vendor)
```

Fetch server prices using the `QuerySkuPriceListRequest` API endpoint.

## func <code class="doc-name">inventory_traffic_prices</code> [_alicloud.py:2374–2417](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L2374-L2417)

```python
inventory_traffic_prices(vendor)
```

Collect inbound and outbound traffic prices of Alibaba Cloud regions.

Inbound is free as per <https://www.alibabacloud.com/help/en/ecs/public-bandwidth>.
Outbound traffic pricing collected from the `QuerySkuPriceListRequest` API endpoint.

Account level tiering information can be found at <https://www.alibabacloud.com/help/en/cdt/internet-data-transfers/#4a98c9ee8eemn>.

## func <code class="doc-name">inventory_ipv4_prices</code> [_alicloud.py:2420–2437](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_alicloud.py#L2420-L2437)

```python
inventory_ipv4_prices(vendor)
```

Static IPv4 pricing of Alibaba Cloud regions.

Static (not Elastic) IP addresses are free, you only pay for bandwidth or traffic
as per <https://www.alibabacloud.com/help/en/ecs/user-guide/public-ip-address?spm=a2c63.p38356.0.i1#52c0fa8bbcee6>.
