catalog_syncs
Creates, updates, deletes, gets or lists a catalog_syncs resource.
Overview
| Name | catalog_syncs |
| Type | Resource |
| Id | cloudflare.magic_cloud_networking.catalog_syncs |
Fields
The following fields are returned by SELECT queries:
- get
- list
OK.
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | |
name | string | |
destination_id | string (uuid) | |
description | string | |
destination_type | string | (NONE, ZERO_TRUST_LIST) |
errors | object | |
includes_discoveries_until | string | |
last_attempted_update_at | string | |
last_successful_update_at | string | |
last_user_update_at | string | |
policy | string | |
update_mode | string | (AUTO, MANUAL) |
OK.
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | |
name | string | |
destination_id | string (uuid) | |
description | string | |
destination_type | string | (NONE, ZERO_TRUST_LIST) |
errors | object | |
includes_discoveries_until | string | |
last_attempted_update_at | string | |
last_successful_update_at | string | |
last_user_update_at | string | |
policy | string | |
update_mode | string | (AUTO, MANUAL) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, sync_id | Read a Catalog Sync (Closed Beta). | |
list | select | account_id | List Catalog Syncs (Closed Beta). | |
create | insert | account_id, name, update_mode, destination_type | forwarded | Create a new Catalog Sync (Closed Beta). |
edit | update | account_id, sync_id | Update a Catalog Sync (Closed Beta). | |
update | replace | account_id, sync_id | Update a Catalog Sync (Closed Beta). | |
delete | delete | account_id, sync_id | delete_destination | Delete a Catalog Sync (Closed Beta). |
refresh | exec | account_id, sync_id | Refresh 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
sync_id | string (uuid) | |
delete_destination | boolean | |
forwarded | string |
SELECT examples
- get
- list
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
;
List Catalog Syncs (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
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: catalog_syncs
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the catalog_syncs resource.
- name: description
value: "{{ description }}"
- name: destination_type
value: "{{ destination_type }}"
valid_values: ['NONE', 'ZERO_TRUST_LIST']
- name: name
value: "{{ name }}"
- name: policy
value: "{{ policy }}"
- name: update_mode
value: "{{ update_mode }}"
valid_values: ['AUTO', 'MANUAL']
- name: forwarded
value: "{{ forwarded }}"
UPDATE examples
- edit
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
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
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
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
;