app_configs
Creates, updates, deletes, gets or lists an app_configs resource.
Overview
| Name | app_configs |
| Type | Resource |
| Id | cloudflare.magic_transit.app_configs |
Fields
The following fields are returned by SELECT queries:
- list
List App Configs response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
account_app_id | string | Magic account app ID. (example: ac60d3d0435248289d446cedd870bcf4) |
managed_app_id | string | Managed app ID. (example: cloudflare) |
site_id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
breakout | boolean | Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. |
preferred_wans | array | WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). |
priority | integer | Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id, site_id | Lists App Configs associated with a site. | |
magic_site_app_configs_add_app_config | insert | account_id, site_id | Creates a new App Config for a site | |
magic_site_app_configs_patch_app_config | update | account_id, site_id, app_config_id | Updates an App Config for a site | |
magic_site_app_configs_update_app_config | replace | account_id, site_id, app_config_id | Updates an App Config for a site | |
magic_site_app_configs_delete_app_config | delete | account_id, site_id, app_config_id | Deletes specific App Config associated with a site. |
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. |
app_config_id | string | |
site_id | string | The site ID. |
SELECT examples
- list
Lists App Configs associated with a site.
SELECT
id,
account_app_id,
managed_app_id,
site_id,
breakout,
preferred_wans,
priority
FROM cloudflare.magic_transit.app_configs
WHERE account_id = '{{ account_id }}' -- required
AND site_id = '{{ site_id }}' -- required
;
INSERT examples
- magic_site_app_configs_add_app_config
- Manifest
Creates a new App Config for a site
INSERT INTO cloudflare.magic_transit.app_configs (
breakout,
preferred_wans,
priority,
account_app_id,
managed_app_id,
account_id,
site_id
)
SELECT
{{ breakout }},
'{{ preferred_wans }}',
{{ priority }},
'{{ account_app_id }}',
'{{ managed_app_id }}',
'{{ account_id }}',
'{{ site_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: app_configs
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the app_configs resource.
- name: site_id
value: "{{ site_id }}"
description: Required parameter for the app_configs resource.
- name: breakout
value: {{ breakout }}
description: |
Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.
- name: preferred_wans
value:
- "{{ preferred_wans }}"
description: |
WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).
- name: priority
value: {{ priority }}
description: |
Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)
- name: account_app_id
value: "{{ account_app_id }}"
description: |
Magic account app ID.
- name: managed_app_id
value: "{{ managed_app_id }}"
description: |
Managed app ID.
UPDATE examples
- magic_site_app_configs_patch_app_config
Updates an App Config for a site
UPDATE cloudflare.magic_transit.app_configs
SET
account_app_id = '{{ account_app_id }}',
breakout = {{ breakout }},
managed_app_id = '{{ managed_app_id }}',
preferred_wans = '{{ preferred_wans }}',
priority = {{ priority }}
WHERE
account_id = '{{ account_id }}' --required
AND site_id = '{{ site_id }}' --required
AND app_config_id = '{{ app_config_id }}' --required
RETURNING
errors,
messages,
result,
success;
REPLACE examples
- magic_site_app_configs_update_app_config
Updates an App Config for a site
REPLACE cloudflare.magic_transit.app_configs
SET
account_app_id = '{{ account_app_id }}',
breakout = {{ breakout }},
managed_app_id = '{{ managed_app_id }}',
preferred_wans = '{{ preferred_wans }}',
priority = {{ priority }}
WHERE
account_id = '{{ account_id }}' --required
AND site_id = '{{ site_id }}' --required
AND app_config_id = '{{ app_config_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- magic_site_app_configs_delete_app_config
Deletes specific App Config associated with a site.
DELETE FROM cloudflare.magic_transit.app_configs
WHERE account_id = '{{ account_id }}' --required
AND site_id = '{{ site_id }}' --required
AND app_config_id = '{{ app_config_id }}' --required
;