Skip to main content

tags

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

Overview

Nametags
TypeResource
Idcloudflare.zero_trust.tags

Fields

The following fields are returned by SELECT queries:

Get a tag response

NameDatatypeDescription
namestringThe name of the tag (example: engineers)
app_countintegerThe number of applications that have this tag
created_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
updated_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, tag_nameGet a tag
listselectaccount_idpage, per_pageList tags
createinsertaccount_idCreate a tag
updatereplaceaccount_id, tag_name, nameUpdate a tag
deletedeleteaccount_id, tag_nameDelete a tag

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.
tag_namestring
pageinteger
per_pageinteger

SELECT examples

Get a tag

SELECT
name,
app_count,
created_at,
updated_at
FROM cloudflare.zero_trust.tags
WHERE account_id = '{{ account_id }}' -- required
AND tag_name = '{{ tag_name }}' -- required
;

INSERT examples

Create a tag

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

REPLACE examples

Update a tag

REPLACE cloudflare.zero_trust.tags
SET
name = '{{ name }}'
WHERE
account_id = '{{ account_id }}' --required
AND tag_name = '{{ tag_name }}' --required
AND name = '{{ name }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete a tag

DELETE FROM cloudflare.zero_trust.tags
WHERE account_id = '{{ account_id }}' --required
AND tag_name = '{{ tag_name }}' --required
;