Skip to content

_oci

sc_crawler.vendors._oci #

Inventory of Oracle Cloud Infrastructure via its API and the public price list: servers, storages, traffic, IPv4 addresses and managed PostgreSQL, with their prices.

Functions:

Name Description
inventory_compliance_frameworks

Manual list of known compliance frameworks at Oracle Cloud Infrastructure.

inventory_regions

List all regions of the commercial realm.

inventory_zones

List the availability domains of the subscribed regions as zones.

inventory_servers

List all shapes of the active zones as servers.

inventory_server_prices

List the on-demand price of the servers in all active zones.

inventory_server_prices_spot

List the preemptible price of the servers in all active zones.

inventory_storages

List the performance levels of the Block Volume service as storages.

inventory_storage_prices

List the Block Volume prices in all regions.

inventory_traffic_prices

List the inbound and outbound traffic prices in all regions.

inventory_ipv4_prices

Public IPv4 addresses are free of charge at OCI.

inventory_databases

List the shapes of OCI Database with PostgreSQL as databases.

inventory_database_prices

List the compute prices of the databases in all active regions.

inventory_database_storages

List the performance tiers of the database optimized storage.

inventory_database_storage_prices

List the database storage prices in all active regions.

inventory_compliance_frameworks #

inventory_compliance_frameworks(vendor)

Manual list of known compliance frameworks at Oracle Cloud Infrastructure.

Data sources:

Source code in sc_crawler/vendors/_oci.py
def inventory_compliance_frameworks(vendor):
    """Manual list of known compliance frameworks at Oracle Cloud Infrastructure.

    Data sources:

    - <https://www.oracle.com/corporate/cloud-compliance/>
    - <https://blogs.oracle.com/cloud-infrastructure/fall-2022-compliance-attestations>
    """
    return map_compliance_frameworks_to_vendor(
        vendor.vendor_id,
        [
            "hipaa",
            "soc2t2",
            "iso27001",
        ],
    )

inventory_regions #

inventory_regions(vendor)

List all regions of the commercial realm.

The API returns the identifier and key of the regions only, so the location is looked up from a manual mapping based on https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm.

Availability domains and shapes can be listed only in the regions the tenancy is subscribed to, so the other regions are stored as INACTIVE.

Source code in sc_crawler/vendors/_oci.py
def inventory_regions(vendor):
    """List all regions of the commercial realm.

    The API returns the identifier and key of the regions only, so the
    location is looked up from a manual mapping based on
    <https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm>.

    Availability domains and shapes can be listed only in the regions the
    tenancy is subscribed to, so the other regions are stored as INACTIVE.
    """
    items = []
    subscribed = {
        subscription["region_name"]
        for subscription in _get_region_subscriptions(_tenancy())
        if subscription["status"] == "READY"
    }
    not_subscribed = []
    for region in _get_regions():
        with sentry_capture_or_raise(vendor=vendor):
            region_id = region["name"]
            if region_id not in _REGION_LOCATIONS:
                raise KeyError(f"Unknown OCI region without location: {region_id}")
            location = _REGION_LOCATIONS[region_id]
            if region_id not in subscribed:
                not_subscribed.append(region_id)
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "region_id": region_id,
                    "name": location["name"],
                    "api_reference": region_id,
                    "display_name": location["name"],
                    "aliases": [region["key"]],
                    "country_id": location["country_id"],
                    "state": location.get("state"),
                    "city": location["city"],
                    "address_line": None,
                    "zip_code": None,
                    "lon": location["lon"],
                    "lat": location["lat"],
                    "founding_year": location.get("founding_year"),
                    "green_energy": location.get("green_energy"),
                    "status": (
                        Status.ACTIVE if region_id in subscribed else Status.INACTIVE
                    ),
                }
            )
    if not_subscribed:
        logger.warning(
            f"The OCI tenancy is not subscribed to {len(not_subscribed)} regions "
            f"(e.g. {', '.join(not_subscribed[:5])}), storing those as inactive "
            "without zones and servers."
        )
    return items

inventory_zones #

inventory_zones(vendor)

List the availability domains of the subscribed regions as zones.

The availability domain names (e.g. Uocm:EU-FRANKFURT-1-AD-1) are specific to the tenancy, so the zone id is built from the region and the number of the availability domain, and the name is stored without the prefix of the tenancy (see _availability_domain for looking up the full name). Note that the numbers are also mapped to the datacenters per tenancy, so e.g. AD-1 can be a different datacenter in another tenancy.

Fault domains are not listed as zones.

Source code in sc_crawler/vendors/_oci.py
def inventory_zones(vendor):
    """List the availability domains of the subscribed regions as zones.

    The availability domain names (e.g. `Uocm:EU-FRANKFURT-1-AD-1`) are specific
    to the tenancy, so the zone id is built from the region and the number of
    the availability domain, and the name is stored without the prefix of the
    tenancy (see `_availability_domain` for looking up the full name).
    Note that the numbers are also mapped to the datacenters per tenancy, so
    e.g. AD-1 can be a different datacenter in another tenancy.

    Fault domains are not listed as zones.
    """
    items = []
    regions = [region for region in vendor.regions if region.status == Status.ACTIVE]
    vendor.progress_tracker.start_task(name="Fetching zones", total=len(regions))
    for region in regions:
        for availability_domain in _get_availability_domains(
            region.api_reference, _tenancy()
        ):
            name = availability_domain.split(":")[-1]
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "region_id": region.region_id,
                    "zone_id": _zone_id(region.region_id, availability_domain),
                    "name": name,
                    "api_reference": name,
                    "display_name": name,
                }
            )
        vendor.progress_tracker.advance_task()
    vendor.progress_tracker.hide_task()
    return items

inventory_servers #

inventory_servers(vendor)

List all shapes of the active zones as servers.

Shapes are listed per availability domain, as the offers differ. Fixed shapes are stored as a server, while flexible shapes are expanded to a grid of OCPU and memory configurations, each stored as a separate server (see _shape_configs). Burstable configurations (a baseline of 12.5% or 50% of the OCPUs) are not listed.

Lifecycle: shapes listed in any of the active zones -> ACTIVE, except for the Always Free micro shape (limited to two instances per tenancy) -> INACTIVE. There is no lifecycle field or retirement date in the API. The previous generation shapes are still fully supported and can be ordered despite being past their "end of orderability" date as per https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#previous-generation-shapes, so those are PLANNED_FOR_RETIREMENT with that date, see _OCI_RETIREMENT_RULES.

Source code in sc_crawler/vendors/_oci.py
def inventory_servers(vendor):
    """List all shapes of the active zones as servers.

    Shapes are listed per availability domain, as the offers differ. Fixed
    shapes are stored as a server, while flexible shapes are expanded to a
    grid of OCPU and memory configurations, each stored as a separate server
    (see `_shape_configs`). Burstable configurations (a baseline of 12.5% or
    50% of the OCPUs) are not listed.

    Lifecycle: shapes listed in any of the active zones -> ACTIVE, except for
    the Always Free micro shape (limited to two instances per tenancy) ->
    INACTIVE. There is no lifecycle field or retirement date in the API. The
    previous generation shapes are still fully supported and can be ordered
    despite being past their "end of orderability" date as per
    <https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#previous-generation-shapes>,
    so those are PLANNED_FOR_RETIREMENT with that date, see
    `_OCI_RETIREMENT_RULES`.
    """
    zone_regions = {zone.api_reference: zone.region_id for zone in vendor.zones}

    def _search_servers(zone_name: str) -> list[dict]:
        servers = []
        region = zone_regions[zone_name]
        availability_domain = _availability_domain(region, zone_name)
        for shape in _get_shapes(region, availability_domain, _tenancy()):
            with sentry_capture_or_raise(vendor=vendor):
                servers.extend(_shape_servers(shape, vendor))
        return servers

    return parallel_fetch_servers(vendor, _search_servers, "server_id", "zones")

inventory_server_prices #

inventory_server_prices(vendor)

List the on-demand price of the servers in all active zones.

The availability of the shapes is from the API (per availability domain), while the prices are from the public price list, which is the same in all commercial regions and has no reference to the shapes, so the related parts are looked up from a manual mapping (see _SHAPE_PRICE_PARTS). Shapes without known parts are logged and listed without prices.

Notes:

  • The monthly free tier of the Arm-based A1 shapes (3,000 OCPU and 18,000 GB hours) is per tenancy, so it is not applied.
  • Only Linux prices are listed (no license fee for Oracle Linux and the other free images).
Source code in sc_crawler/vendors/_oci.py
def inventory_server_prices(vendor):
    """List the on-demand price of the servers in all active zones.

    The availability of the shapes is from the API (per availability domain),
    while the prices are from the public price list, which is the same in all
    commercial regions and has no reference to the shapes, so the related parts
    are looked up from a manual mapping (see `_SHAPE_PRICE_PARTS`). Shapes
    without known parts are logged and listed without prices.

    Notes:

    - The monthly free tier of the Arm-based A1 shapes (3,000 OCPU and 18,000 GB
      hours) is per tenancy, so it is not applied.
    - Only Linux prices are listed (no license fee for Oracle Linux and the
      other free images).
    """
    return _inventory_server_prices(vendor, Allocation.ONDEMAND)

inventory_server_prices_spot #

inventory_server_prices_spot(vendor)

List the preemptible price of the servers in all active zones.

There is no spot market at OCI: preemptible capacity has a fixed 50% discount on the on-demand price in all regions, and is available only for the VM shapes listed in _PREEMPTIBLE_SERIES, as per https://docs.oracle.com/en-us/iaas/Content/Compute/Concepts/preemptible.htm.

Source code in sc_crawler/vendors/_oci.py
def inventory_server_prices_spot(vendor):
    """List the preemptible price of the servers in all active zones.

    There is no spot market at OCI: preemptible capacity has a fixed 50%
    discount on the on-demand price in all regions, and is available only for
    the VM shapes listed in `_PREEMPTIBLE_SERIES`, as per
    <https://docs.oracle.com/en-us/iaas/Content/Compute/Concepts/preemptible.htm>.
    """
    return _inventory_server_prices(vendor, Allocation.SPOT)

inventory_storages #

inventory_storages(vendor)

List the performance levels of the Block Volume service as storages.

There is no API to list the performance levels, so these are from a manual list (see _BLOCK_VOLUMES).

Data sources:

Sizes are in GB, and throughput values are in MB/s as per the documentation.

Source code in sc_crawler/vendors/_oci.py
def inventory_storages(vendor):
    """List the performance levels of the Block Volume service as storages.

    There is no API to list the performance levels, so these are from a
    manual list (see `_BLOCK_VOLUMES`).

    Data sources:

    - <https://docs.oracle.com/en-us/iaas/Content/Block/Concepts/blockvolumeperformance.htm>
    - <https://www.oracle.com/cloud/storage/block-volumes/faq/>

    Sizes are in GB, and throughput values are in MB/s as per the documentation.
    """
    items = []
    for storage_id, storage in _BLOCK_VOLUMES.items():
        items.append(
            {
                "storage_id": storage_id,
                "vendor_id": vendor.vendor_id,
                "name": storage["name"],
                "description": storage["description"],
                "storage_type": StorageType.NVME_SSD,
                "max_iops": storage["max_iops"],
                "max_throughput": storage["max_throughput"],
                "min_size": _BLOCK_VOLUME_MIN_SIZE,
                "max_size": _BLOCK_VOLUME_MAX_SIZE,
            }
        )
    return items

inventory_storage_prices #

inventory_storage_prices(vendor)

List the Block Volume prices in all regions.

The monthly price of a GB is the storage price plus the price of the Volume Performance Units (VPU) of the performance level, both from the public price list, which is the same in all commercial regions.

Source code in sc_crawler/vendors/_oci.py
def inventory_storage_prices(vendor):
    """List the Block Volume prices in all regions.

    The monthly price of a GB is the storage price plus the price of the
    Volume Performance Units (VPU) of the performance level, both from the
    public price list, which is the same in all commercial regions.
    """
    storage_price = _part_price(_BLOCK_VOLUME_STORAGE_PART)
    vpu_price = _part_price(_BLOCK_VOLUME_VPU_PART)
    items = []
    for region in vendor.regions:
        for storage_id, storage in _BLOCK_VOLUMES.items():
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "region_id": region.region_id,
                    "storage_id": storage_id,
                    "unit": PriceUnit.GB_MONTH,
                    "price": storage_price + storage["vpus"] * vpu_price,
                    "currency": "USD",
                }
            )
    return items

inventory_traffic_prices #

inventory_traffic_prices(vendor)

List the inbound and outbound traffic prices in all regions.

Inbound traffic is free. The first 10 TB of outbound traffic is free per month and tenancy, then priced per GB depending on the location of the region (see _EGRESS_PARTS), as per the public price list.

Source code in sc_crawler/vendors/_oci.py
def inventory_traffic_prices(vendor):
    """List the inbound and outbound traffic prices in all regions.

    Inbound traffic is free. The first 10 TB of outbound traffic is free per
    month and tenancy, then priced per GB depending on the location of the
    region (see `_EGRESS_PARTS`), as per the public price list.
    """
    items = []
    for region in vendor.regions:
        with sentry_capture_or_raise(vendor=vendor):
            part_number = _EGRESS_PARTS[region.region_id.split("-")[0]]
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "region_id": region.region_id,
                    "price": 0,
                    "price_tiered": [],
                    "currency": "USD",
                    "unit": PriceUnit.GB_MONTH,
                    "direction": TrafficDirection.IN,
                }
            )
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "region_id": region.region_id,
                    "price": _part_price(part_number),  # max tier price
                    "price_tiered": _price_tiers(part_number),
                    "currency": "USD",
                    "unit": PriceUnit.GB_MONTH,
                    "direction": TrafficDirection.OUT,
                }
            )
    return items

inventory_ipv4_prices #

inventory_ipv4_prices(vendor)

Public IPv4 addresses are free of charge at OCI.

Neither ephemeral, nor reserved public IP addresses are charged: there is no related part in the public price list, and "there is no charge to use this feature" as per the announcement of the reserved public IPs at https://blogs.oracle.com/cloud-infrastructure/release-announcement-reserved-public-ips-are-now-available-on-oracle-cloud-infrastructure.

Source code in sc_crawler/vendors/_oci.py
def inventory_ipv4_prices(vendor):
    """Public IPv4 addresses are free of charge at OCI.

    Neither ephemeral, nor reserved public IP addresses are charged: there is
    no related part in the public price list, and "there is no charge to use
    this feature" as per the announcement of the reserved public IPs at
    <https://blogs.oracle.com/cloud-infrastructure/release-announcement-reserved-public-ips-are-now-available-on-oracle-cloud-infrastructure>.
    """
    items = []
    for region in vendor.regions:
        items.append(
            {
                "vendor_id": vendor.vendor_id,
                "region_id": region.region_id,
                "price": 0,
                "currency": "USD",
                "unit": PriceUnit.MONTH,
            }
        )
    return items

inventory_databases #

inventory_databases(vendor)

List the shapes of OCI Database with PostgreSQL as databases.

The shapes are listed per region (see _database_configs on the sizes), and the supported PostgreSQL versions are from the active default configurations of the service. The features are from the documentation.

A database system has a primary node and up to 7 read replica nodes on shared storage. With multiple nodes, a read replica is promoted on the failure of the primary node, with the nodes placed in different fault domains of an availability domain, or in different availability domains (with the storage replicated across the availability domains). Note that the latter is available only in the regions with multiple availability domains, see inventory_database_prices.

Lifecycle: shapes listed in any of the active regions -> ACTIVE. There is no lifecycle field in the API.

Data sources:

Source code in sc_crawler/vendors/_oci.py
def inventory_databases(vendor):
    """List the shapes of OCI Database with PostgreSQL as databases.

    The shapes are listed per region (see `_database_configs` on the sizes), and
    the supported PostgreSQL versions are from the active default
    configurations of the service. The features are from the documentation.

    A database system has a primary node and up to 7 read replica nodes on shared
    storage. With multiple nodes, a read replica is promoted on the failure of
    the primary node, with the nodes placed in different fault domains of an
    availability domain, or in different availability domains (with the storage
    replicated across the availability domains). Note that the latter is
    available only in the regions with multiple availability domains, see
    `inventory_database_prices`.

    Lifecycle: shapes listed in any of the active regions -> ACTIVE. There is no
    lifecycle field in the API.

    Data sources:

    - <https://docs.oracle.com/en-us/iaas/Content/postgresql/overview.htm>
    - <https://docs.oracle.com/en-us/iaas/Content/postgresql/high-availability.htm>
    - <https://docs.oracle.com/en-us/iaas/Content/postgresql/manage-databases.htm>
    - <https://docs.oracle.com/en-us/iaas/releasenotes/services/postgresql/>
    """
    databases = {}
    versions = {}
    regions = _active_regions(vendor)
    vendor.progress_tracker.start_task(name="Fetching databases", total=len(regions))
    for region in regions:
        for config in _database_configs(region.api_reference):
            databases[config["database_id"]] = config
            versions.setdefault(config["database_id"], set()).update(
                _database_versions(region.api_reference, config["shape"])
            )
        vendor.progress_tracker.advance_task()
    vendor.progress_tracker.hide_task()

    server_ids = {server.server_id for server in vendor.servers}
    items = []
    for database_id, config in databases.items():
        with sentry_capture_or_raise(vendor=vendor):
            shape_name = config["shape"]
            ocpus = config["ocpus"]
            memory_gb = config["memory_gb"]
            _, series = _shape_series(shape_name)
            family = _shape_family(series)
            vcpus = ocpus * _X86_VCPUS_PER_OCPU
            server_id = f"{shape_name}.{ocpus}-{memory_gb}"
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "database_id": database_id,
                    "name": database_id,
                    "api_reference": database_id,
                    # https://www.pulumi.com/registry/packages/oci/api-docs/psql/dbsystem/
                    "api_reference_object": {
                        "shape": shape_name,
                        "instance_ocpu_count": ocpus,
                        "instance_memory_size_in_gbs": memory_gb,
                    },
                    "display_name": database_id,
                    "description": (
                        f"OCI Database with PostgreSQL {family} "
                        f"({vcpus} vCPUs, {memory_gb} GiB RAM)"
                    ),
                    "family": family,
                    "series": series,
                    # the related configuration of the flexible compute shape
                    "server_id": server_id if server_id in server_ids else None,
                    "vcpus": vcpus,
                    "memory_amount": memory_gb * _MIB_PER_GIB,
                    "engine": DatabaseEngine.POSTGRESQL,
                    "wire_protocol": DatabaseWireProtocol.POSTGRESQL,
                    "engine_versions": sorted(versions[database_id], key=int),
                    # maintenance is "performed only when required for security or
                    # reliability issues", minor version upgrades are not documented
                    "auto_upgrade_versions": None,
                    "ha": [
                        DatabaseHaLevel.MULTI_ZONE,
                        DatabaseHaLevel.SINGLE_ZONE,
                        DatabaseHaLevel.NONE,
                    ],
                    "ha_strategy": [
                        DatabaseHaStrategy.READABLE_CLUSTER,
                        DatabaseHaStrategy.NONE,
                    ],
                    "max_read_replicas": _DATABASE_MAX_READ_REPLICAS,
                    # custom configurations, also used to enable the extensions
                    "custom_config": True,
                    "custom_extensions": True,
                    # storage is not bundled: it scales automatically, and only
                    # the used storage is billed
                    "storage_size": 0,
                    "storage_extra_min": 0,
                    "storage_extra_max": _DATABASE_MAX_STORAGE,
                    "storage_extra_autosize": True,
                    "compatible_storage_ids": _database_storage_ids(ocpus),
                    # "Data is encrypted both in-transit and at rest."
                    "disk_encryption": True,
                    # daily, weekly or monthly automatic backups
                    "scheduled_backups": True,
                    # point-in-time recovery: "The maximum number of days you can
                    # enter is 35."
                    "continuous_backups": 35,
                    # no managed connection pooler is documented
                    "connection_pool": None,
                    # https://docs.oracle.com/en-us/iaas/Content/postgresql/metrics.htm
                    "system_monitoring": True,
                    # Query Insights
                    "database_monitoring": True,
                    "autotuning_advice": None,
                    "autotuning_apply": None,
                    # "99.99% uptime SLA" for multi-node database systems (99.9%
                    # for single-node systems in the single-AD regions)
                    "sla": 99.99,
                    "security_features": [
                        # endpoints "aren't directly accessible from the internet",
                        # only from the private subnet of the database system
                        DatabaseSecurityFeature.PRIVATE_NETWORK,
                        # "Use your own encryption key" (2026-09-15 release note)
                        DatabaseSecurityFeature.CUSTOMER_MANAGED_KEYS,
                    ],
                    "status": Status.ACTIVE,
                }
            )
    return items

inventory_database_prices #

inventory_database_prices(vendor)

List the compute prices of the databases in all active regions.

The hourly price of a node is the price of the compute shape (OCPUs and memory, as for the servers) plus the PostgreSQL fee per OCPU, both from the public price list, which is the same in all commercial regions. Storage is billed separately, see inventory_database_storage_prices.

Price rows per region:

  • no high availability: a single node,
  • single-zone readable cluster: a primary and a read replica node in different fault domains of an availability domain,
  • multi-zone readable cluster: a primary and a read replica node in different availability domains, only in the regions with multiple zones.
Source code in sc_crawler/vendors/_oci.py
def inventory_database_prices(vendor):
    """List the compute prices of the databases in all active regions.

    The hourly price of a node is the price of the compute shape (OCPUs and
    memory, as for the servers) plus the PostgreSQL fee per OCPU, both from the
    public price list, which is the same in all commercial regions. Storage is
    billed separately, see `inventory_database_storage_prices`.

    Price rows per region:

    - no high availability: a single node,
    - single-zone readable cluster: a primary and a read replica node in
      different fault domains of an availability domain,
    - multi-zone readable cluster: a primary and a read replica node in
      different availability domains, only in the regions with multiple zones.
    """
    items = []
    for region in _active_regions(vendor):
        deployments = [
            (DatabaseHaLevel.NONE, DatabaseHaStrategy.NONE, 1),
            (
                DatabaseHaLevel.SINGLE_ZONE,
                DatabaseHaStrategy.READABLE_CLUSTER,
                _DATABASE_HA_NODES,
            ),
        ]
        if len(region.zones) > 1:
            deployments.append(
                (
                    DatabaseHaLevel.MULTI_ZONE,
                    DatabaseHaStrategy.READABLE_CLUSTER,
                    _DATABASE_HA_NODES,
                )
            )
        for config in _database_configs(region.api_reference):
            with sentry_capture_or_raise(vendor=vendor):
                node_price = _database_node_hourly_price(config)
                if node_price is None:
                    continue
                for ha, ha_strategy, nodes in deployments:
                    items.append(
                        {
                            "vendor_id": vendor.vendor_id,
                            "region_id": region.region_id,
                            "database_id": config["database_id"],
                            "allocation": Allocation.ONDEMAND,
                            "ha": ha,
                            "ha_strategy": ha_strategy,
                            "unit": PriceUnit.HOUR,
                            "price": node_price * nodes,
                            "price_upfront": 0,
                            "price_tiered": [],
                            "currency": "USD",
                        }
                    )
    return items

inventory_database_storages #

inventory_database_storages(vendor)

List the performance tiers of the database optimized storage.

Storage is decoupled from the compute nodes, shared by the nodes of a database system, and scales automatically up to 32 TB. There is no API to list the performance tiers, so these are from a manual list (see _DATABASE_STORAGE_IOPS).

Data sources:

Source code in sc_crawler/vendors/_oci.py
def inventory_database_storages(vendor):
    """List the performance tiers of the database optimized storage.

    Storage is decoupled from the compute nodes, shared by the nodes of a
    database system, and scales automatically up to 32 TB. There is no API to
    list the performance tiers, so these are from a manual list (see
    `_DATABASE_STORAGE_IOPS`).

    Data sources:

    - <https://docs.oracle.com/en-us/iaas/Content/postgresql/performance-tiers.htm>
    - <https://docs.oracle.com/en-us/iaas/Content/postgresql/manage-databases.htm>
    """
    items = []
    for iops in _DATABASE_STORAGE_IOPS:
        items.append(
            {
                "vendor_id": vendor.vendor_id,
                "database_storage_id": _database_storage_id(iops),
                "name": f"Database Optimized Storage {iops // 1000}K IOPS",
                "description": (
                    f"Database optimized storage with the {iops:,} IOPS performance tier"
                    + (
                        f" (requires at least {_DATABASE_STORAGE_HIGH_IOPS_MIN_OCPUS} OCPUs)."
                        if iops >= _DATABASE_STORAGE_HIGH_IOPS
                        else "."
                    )
                ),
                "scope": DatabaseStorageScope.DATA,
                "redundancy": None,
                "min_size": 0,
                "max_size": _DATABASE_MAX_STORAGE,
                "max_iops": iops,
                "max_throughput": None,
            }
        )
    return items

inventory_database_storage_prices #

inventory_database_storage_prices(vendor)

List the database storage prices in all active regions.

The monthly price of a used GB is the Database Optimized Storage price plus the price of the Volume Performance Units (VPU) of the performance tier (see _DATABASE_OCPU_PART). Both from the public price list, which is the same in all commercial regions.

Source code in sc_crawler/vendors/_oci.py
def inventory_database_storage_prices(vendor):
    """List the database storage prices in all active regions.

    The monthly price of a used GB is the Database Optimized Storage price plus
    the price of the Volume Performance Units (VPU) of the performance tier (see
    `_DATABASE_OCPU_PART`). Both from the public price list, which is the same
    in all commercial regions.
    """
    vpu_price = _part_price(_BLOCK_VOLUME_VPU_PART)
    database_storage_price = _part_price(_DATABASE_STORAGE_PART)
    items = []
    for region in _active_regions(vendor):
        if not _database_configs(region.api_reference):
            continue
        for iops in _DATABASE_STORAGE_IOPS:
            vpus = iops / _DATABASE_STORAGE_IOPS_PER_VPU
            items.append(
                {
                    "vendor_id": vendor.vendor_id,
                    "region_id": region.region_id,
                    "database_storage_id": _database_storage_id(iops),
                    "unit": PriceUnit.GB_MONTH,
                    "price": database_storage_price + vpus * vpu_price,
                    "currency": "USD",
                }
            )
    return items