Skip to main content

edge_configs

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

Overview​

Nameedge_configs
TypeResource
Idvercel.edge_config.edge_configs

Fields​

The following fields are returned by SELECT queries:

The Global Config.

NameDatatypeDescription
idstring
owner_idstring (wire: ownerId)
created_atnumber (wire: createdAt)
created_bystringThe ID of the user who created the Global Config, optional because it is not always set. (wire: createdBy)
deleted_atnumber (wire: deletedAt)
digeststring
item_countnumber (wire: itemCount)
purposeobject
schemastring(opaque JSON object)
size_in_bytesnumber (wire: sizeInBytes)
slugstringName for the Global Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores).
synced_to_dynamo_atnumberTimestamp of when the Global Config was synced to DynamoDB initially. It is only set when syncing the entire Global Config, not when updating. (wire: syncedToDynamoAt)
transferobjectKeeps track of the current state of the Global Config while it gets transferred.
updated_atnumber (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectedge_config_idteam_id, slugReturns a Global Config.
listselectteam_id, slugReturns all Global Configs.
createinsertslugteam_idCreates a Global Config.
updateupdateedge_config_id, slugteam_idUpdates a Global Config.
deletedeleteedge_config_idteam_id, slugDelete a Global Config by id.

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
edge_config_idstring
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples​

Returns a Global Config.

SELECT
id,
owner_id,
created_at,
created_by,
deleted_at,
digest,
item_count,
purpose,
schema,
size_in_bytes,
slug,
synced_to_dynamo_at,
transfer,
updated_at
FROM vercel.edge_config.edge_configs
WHERE edge_config_id = '{{ edge_config_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

INSERT examples​

Creates a Global Config.

INSERT INTO vercel.edge_config.edge_configs (
slug,
items,
team_id
)
SELECT
'{{ slug }}' /* required */,
'{{ items }}',
'{{ team_id }}'
RETURNING
id,
owner_id,
created_at,
created_by,
deleted_at,
digest,
item_count,
purpose,
schema,
size_in_bytes,
slug,
synced_to_dynamo_at,
transfer,
updated_at
;

UPDATE examples​

Updates a Global Config.

UPDATE vercel.edge_config.edge_configs
SET
slug = '{{ slug }}'
WHERE
edge_config_id = '{{ edge_config_id }}' --required
AND slug = '{{ slug }}' --required
AND team_id = '{{ team_id}}'
RETURNING
id,
owner_id,
created_at,
created_by,
deleted_at,
digest,
item_count,
purpose,
schema,
size_in_bytes,
slug,
synced_to_dynamo_at,
transfer,
updated_at;

DELETE examples​

Delete a Global Config by id.

DELETE FROM vercel.edge_config.edge_configs
WHERE edge_config_id = '{{ edge_config_id }}' --required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;