Skip to main content

addons

Creates, updates, deletes, gets or lists an addons resource.

Overview​

Nameaddons
TypeResource
Idsupabase.billing.addons

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
typestring (custom_domain, compute_instance, pitr, ipv4, auth_mfa_phone, auth_mfa_web_authn, log_drain, etl_pipeline)
variantobject

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectrefReturns the billing addons that are currently applied, including the active compute instance size, and lists every addon option that can be provisioned with pricing metadata.
updateupdateref, addon_variant, addon_typeSelects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.
deletedeleteaddon_variant, refDisables the selected addon variant, including rolling the compute instance back to its previous size.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
addon_variant
refstringSupabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = '<ref>'. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: SUPABASE_PROJECT_ID)

SELECT examples​

Returns the billing addons that are currently applied, including the active compute instance size, and lists every addon option that can be provisioned with pricing metadata.

SELECT
type,
variant
FROM supabase.billing.addons
WHERE ref = '{{ ref }}' -- required unless SUPABASE_PROJECT_ID is set
;

UPDATE examples​

Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.

UPDATE supabase.billing.addons
SET
addon_variant = '{{ addon_variant }}',
addon_type = '{{ addon_type }}'
WHERE
ref = '{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
AND addon_variant = '{{ addon_variant }}' --required
AND addon_type = '{{ addon_type }}' --required;

DELETE examples​

Disables the selected addon variant, including rolling the compute instance back to its previous size.

DELETE FROM supabase.billing.addons
WHERE addon_variant = '{{ addon_variant }}' --required
AND ref = '{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
;