set_registry_storage_addon
Buy or return paid registry storage: set how many storage blocks the organisation holds (blocks is the new total, not a difference). Each block adds block_gib GiB (50 GiB) to the limit of every registry project and is billed on the monthly invoice at the block price (EUR 5 a month), prorated by the days held. Read get_registry_storage first: addon.blocks is what is held, addon.max_blocks is the most that can be bought here (for more, use request_limit_increase with kind registry_storage), addon.billing_ready and addon.billing_blocker say whether billing can pay, and addon.version goes back as expected_version - if the storage or its price changed since, the call is refused ("Registry storage changed since you read it"): read again and confirm the new price, never retry the same arguments. Reducing is always possible, but never below what the registry already holds (the refusal names the minimum). Pass current_blocks, price_cents_per_block_month and block_gib from the read so the confirmation names the monthly price change (blocks x price); they are checked against the live add-on and a mismatch is refused. The new limit is applied to the registry at once. Requires billing.manage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blocks | Yes | The number of storage blocks the organisation should hold after the change (0 returns them all). | |
| block_gib | Yes | addon.block_gib from the read: the size of one block in GiB (50). The confirmation shows it, and the call is refused if the block size is no longer this. | |
| current_blocks | Yes | addon.blocks from the read: the blocks held now. The confirmation shows the change from it, and the call is refused if it is no longer true. | |
| expected_version | No | Always send the addon.version get_registry_storage returned: if the blocks or the price changed since, the change is refused instead of buying at a price nobody confirmed. Omit it only when that read returned no version. | |
| price_cents_per_block_month | Yes | addon.price_cents_per_block_month from the read: what one block costs this organisation per month, in cents. The confirmation shows the monthly price from it, and the call is refused if the price is no longer this. |