Skip to main content

network_restrictions

Creates, updates, deletes, gets or lists a network_restrictions resource.

Overview​

Namenetwork_restrictions
TypeResource
Idsupabase.network.network_restrictions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
applied_atstring (date-time) (pattern: <code>^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:.\d+)?)?(?:Z))$</code>)
configobjectAt any given point in time, this is the config that the user has requested be applied to their project. The status field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to old_config.
entitlementstring (disallowed, allowed)
old_configobjectPopulated when a new config has been received, but not registered as successfully applied to a project.
statusstring (stored, applied)
updated_atstring (date-time) (pattern: <code>^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:.\d+)?)?(?:Z))$</code>)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectref
updateupdateref
applyexecref

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
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​

No description available.

SELECT
applied_at,
config,
entitlement,
old_config,
status,
updated_at
FROM supabase.network.network_restrictions
WHERE ref = '{{ ref }}' -- required unless SUPABASE_PROJECT_ID is set
;

UPDATE examples​

No description available.

UPDATE supabase.network.network_restrictions
SET
add = '{{ add }}',
remove = '{{ remove }}'
WHERE
ref = '{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
RETURNING
applied_at,
config,
entitlement,
old_config,
status,
updated_at;

Lifecycle Methods​

EXEC variables use wire (API) names.

No description available.

EXEC supabase.network.network_restrictions.apply
@ref='{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
@@json=
'{
"dbAllowedCidrs": "{{ dbAllowedCidrs }}",
"dbAllowedCidrsV6": "{{ dbAllowedCidrsV6 }}"
}'
;