network_restrictions
Creates, updates, deletes, gets or lists a network_restrictions resource.
Overview​
| Name | network_restrictions |
| Type | Resource |
| Id | supabase.network.network_restrictions |
Fields​
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
applied_at | string (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>) |
config | object | At 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. |
entitlement | string | (disallowed, allowed) |
old_config | object | Populated when a new config has been received, but not registered as successfully applied to a project. |
status | string | (stored, applied) |
updated_at | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ref | ||
update | update | ref | ||
apply | exec | ref |
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.
| Name | Datatype | Description |
|---|---|---|
ref | string | Supabase 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​
- get
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​
- update
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.
- apply
No description available.
EXEC supabase.network.network_restrictions.apply
@ref='{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
@@json=
'{
"dbAllowedCidrs": "{{ dbAllowedCidrs }}",
"dbAllowedCidrsV6": "{{ dbAllowedCidrsV6 }}"
}'
;