Skip to main content

turn

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

Overview

Nameturn
TypeResource
Idcloudflare.calls.turn

Fields

The following fields are returned by SELECT queries:

Retrieve TURN key details response

NameDatatypeDescription
namestringA short description of Calls app, not shown to end users. (default: , example: production-realtime-app)
createdstring (date-time)The date and time the item was created. (example: 2014-01-02T02:20:00Z)
modifiedstring (date-time)The date and time the item was last modified. (example: 2014-01-02T02:20:00Z)
uidstringA Cloudflare-generated unique identifier for a item. (example: 2a95132c15732412d22c1476fa83f27a)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkey_id, account_idFetches details for a single TURN key.
listselectaccount_idLists all TURN keys in the Cloudflare account
createinsertaccount_idCreates a new Cloudflare Calls TURN key.
updatereplacekey_id, account_idEdit details for a single TURN key.
deletedeletekey_id, account_idDeletes a TURN key from Cloudflare Calls

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.
key_idstring

SELECT examples

Fetches details for a single TURN key.

SELECT
name,
created,
modified,
uid
FROM cloudflare.calls.turn
WHERE key_id = '{{ key_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Creates a new Cloudflare Calls TURN key.

INSERT INTO cloudflare.calls.turn (
name,
account_id
)
SELECT
'{{ name }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

REPLACE examples

Edit details for a single TURN key.

REPLACE cloudflare.calls.turn
SET
name = '{{ name }}'
WHERE
key_id = '{{ key_id }}' --required
AND account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Deletes a TURN key from Cloudflare Calls

DELETE FROM cloudflare.calls.turn
WHERE key_id = '{{ key_id }}' --required
AND account_id = '{{ account_id }}' --required
;