Skip to main content

routes_versions

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

Overview

Nameroutes_versions
TypeResource
Idcloudflare.ai_gateway.routes_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring
namestring
gateway_idstring
version_idstring
activestring (true, false)
created_atstring
datastring
elementsarray
modified_atstring (date-time)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_accountselectaccount_id, gateway_id, id, version_idGet an AI Gateway Dynamic Route Version.
listselectaccount_id, gateway_id, idList all AI Gateway Dynamic Route Versions.
create_versioninsertaccount_id, gateway_id, id, elementsCreate a new AI Gateway Dynamic Route Version.

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
account_idstringThe Cloudflare account ID.
gateway_idstringThe AI Gateway ID.
idstringResource ID.
version_idstring

SELECT examples

Get an AI Gateway Dynamic Route Version.

SELECT
id,
name,
gateway_id,
version_id,
active,
created_at,
data,
elements,
modified_at
FROM cloudflare.ai_gateway.routes_versions
WHERE account_id = '{{ account_id }}' -- required
AND gateway_id = '{{ gateway_id }}' -- required
AND id = '{{ id }}' -- required
AND version_id = '{{ version_id }}' -- required
;

INSERT examples

Create a new AI Gateway Dynamic Route Version.

INSERT INTO cloudflare.ai_gateway.routes_versions (
elements,
account_id,
gateway_id,
id
)
SELECT
'{{ elements }}' /* required */,
'{{ account_id }}',
'{{ gateway_id }}',
'{{ id }}'
RETURNING
result,
success
;