api.cloud

Overview

What the account holds in IaGenify Cloud, what the plan allows, and how to add more. Two calls, and neither of them creates a storage.

2 callsusage() is freeadd-ons cost credits
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

api.cloud is about space, not about data. Creating a storage is api.storage.create(), reading and writing it is run(); this resource answers the two questions those two cannot: how much room is left, and how to get more.

The surface

CallDoesCosts
api.cloud.usage()The whole picture: plan, per-service totals, per-storage ceilings, add-ons.nothing
api.cloud.addons.buy({ service, gb })Adds gigabytes, billed monthly in credits.credits
const usage = await api.cloud.usage();

console.log(usage.pack);                       // "free" | "go" | "starter"
console.log(usage.object.usedBytes, "of", usage.object.quotaBytes);

for (const base of usage.nosql.storages) {
  console.log(base.label, base.usedBytes, "of", base.quotaBytes, base.overQuota ? "FULL" : "");
}
usage = api.cloud.usage()

print(usage["pack"])                                        # "free" | "go" | "starter"
print(usage["object"]["usedBytes"], "of", usage["object"]["quotaBytes"])

for base in usage["nosql"]["storages"]:
    print(base["label"], base["usedBytes"], "of", base["quotaBytes"], "FULL" if base["overQuota"] else "")

Three services, counted apart

A NoSQL Database, a SQL Database and an Object Storage each have their own count and their own ceiling. Nothing moves between them: filling one does not take room from another, and the free space of one is not usable by another.

PlanNoSQL DatabaseSQL DatabaseObject Storage
Free50 MB × 150 MB × 1100 MB × 1
Go500 MB × 2500 MB × 21 GB × 1
Starter1 GB × 21 GB × 22 GB × 1
Enterprise5 GB × 25 GB × 210 GB × 1

Read as « the ceiling of one storage × how many of them the plan allows ». Details on Quotas and plans.

The ceiling is per storage, and that is the number that refuses a write

A total with room left can still refuse

Two 500 MB databases are two guarantees of 500 MB, not one of a gigabyte. So a write into a full one is refused while the service total shows space — and the per-storage figure, in usage().<service>.storages[], is the one to show a user.

Hosting and mail take the object storage

What a host keeps online, and what a mailbox keeps, are counted in the account's Object Storage — the same bytes, the same ceiling. usage().object.hostingBytes says how much of it is hosting, which is what makes the total add up when nothing of yours seems to account for it.

What happens when it is full

OperationPast the ceiling
WritingRefused — quota_exceeded (403).
ReadingWorks.
DeletingWorks. This is how you get back under.

That asymmetry is deliberate: a storage you cannot read and cannot empty would be a storage you cannot rescue.

Buying space

const { charged, usage } = await api.cloud.addons.buy({ service: "object", gb: 1 });
// charged: 200   — credits taken now
// usage:   the fresh report, ceilings already raised
result = api.cloud.addons.buy(service="object", gb=1)
result["charged"]   # 200 — credits taken now
result["usage"]     # the fresh report, ceilings already raised

Two add-ons only: database, shared by NoSQL and SQL, and object. An add-on is a pool laid on top of the guaranteed ceilings — it fills in where a storage has run out, and it can never eat into another one's guarantee.