Skip to main content

catalog_syncs

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

Overview

Namecatalog_syncs
TypeResource
Idcloudflare.magic_cloud_networking.catalog_syncs

Fields

The following fields are returned by SELECT queries:

OK.

NameDatatypeDescription
idstring (uuid)
namestring
destination_idstring (uuid)
descriptionstring
destination_typestring (NONE, ZERO_TRUST_LIST)
errorsobject
includes_discoveries_untilstring
last_attempted_update_atstring
last_successful_update_atstring
last_user_update_atstring
policystring
update_modestring (AUTO, MANUAL)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, sync_idRead a Catalog Sync (Closed Beta).
listselectaccount_idList Catalog Syncs (Closed Beta).
createinsertaccount_id, name, update_mode, destination_typeforwardedCreate a new Catalog Sync (Closed Beta).
editupdateaccount_id, sync_idUpdate a Catalog Sync (Closed Beta).
updatereplaceaccount_id, sync_idUpdate a Catalog Sync (Closed Beta).
deletedeleteaccount_id, sync_iddelete_destinationDelete a Catalog Sync (Closed Beta).
refreshexecaccount_id, sync_idRefresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta).

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.
sync_idstring (uuid)
delete_destinationboolean
forwardedstring

SELECT examples

Read a Catalog Sync (Closed Beta).

SELECT
id,
name,
destination_id,
description,
destination_type,
errors,
includes_discoveries_until,
last_attempted_update_at,
last_successful_update_at,
last_user_update_at,
policy,
update_mode
FROM cloudflare.magic_cloud_networking.catalog_syncs
WHERE account_id = '{{ account_id }}' -- required
AND sync_id = '{{ sync_id }}' -- required
;

INSERT examples

Create a new Catalog Sync (Closed Beta).

INSERT INTO cloudflare.magic_cloud_networking.catalog_syncs (
description,
destination_type,
name,
policy,
update_mode,
account_id,
forwarded
)
SELECT
'{{ description }}',
'{{ destination_type }}' /* required */,
'{{ name }}' /* required */,
'{{ policy }}',
'{{ update_mode }}' /* required */,
'{{ account_id }}',
'{{ forwarded }}'
RETURNING
errors,
messages,
result,
success
;

UPDATE examples

Update a Catalog Sync (Closed Beta).

UPDATE cloudflare.magic_cloud_networking.catalog_syncs
SET
description = '{{ description }}',
name = '{{ name }}',
policy = '{{ policy }}',
update_mode = '{{ update_mode }}'
WHERE
account_id = '{{ account_id }}' --required
AND sync_id = '{{ sync_id }}' --required
RETURNING
errors,
messages,
result,
success;

REPLACE examples

Update a Catalog Sync (Closed Beta).

REPLACE cloudflare.magic_cloud_networking.catalog_syncs
SET
description = '{{ description }}',
name = '{{ name }}',
policy = '{{ policy }}',
update_mode = '{{ update_mode }}'
WHERE
account_id = '{{ account_id }}' --required
AND sync_id = '{{ sync_id }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete a Catalog Sync (Closed Beta).

DELETE FROM cloudflare.magic_cloud_networking.catalog_syncs
WHERE account_id = '{{ account_id }}' --required
AND sync_id = '{{ sync_id }}' --required
AND delete_destination = '{{ delete_destination }}'
;

Lifecycle Methods

Refresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta).

EXEC cloudflare.magic_cloud_networking.catalog_syncs.refresh
@account_id='{{ account_id }}' --required,
@sync_id='{{ sync_id }}' --required
;