cf_interconnects
Creates, updates, deletes, gets or lists a cf_interconnects resource.
Overview
| Name | cf_interconnects |
| Type | Resource |
| Id | cloudflare.magic_transit.cf_interconnects |
Fields
The following fields are returned by SELECT queries:
- get
- list
List interconnect Details response
| Name | Datatype | Description |
|---|---|---|
interconnect | object |
List interconnects response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: c4a7362d577a6c3019a474fd6f485821) |
name | string | The name of the interconnect. The name cannot share a name with other tunnels. (example: pni_ord) |
virtual_port_reservation_id | string | Identifier (example: c4a7362d577a6c3019a474fd6f485821) |
colo_name | string | The name of the interconnect. The name cannot share a name with other tunnels. (example: pni_ord) |
automatic_return_routing | boolean | True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the coupler_integration account flag to be enabled; requests setting this to true without that flag will be rejected. |
created_on | string (date-time) | The date and time the tunnel was created. (example: 2017-06-14T00:00:00Z) |
description | string | An optional description of the interconnect. (example: Tunnel for Interconnect to ORD) |
gre | object | The configuration specific to GRE interconnects. |
health_check | object | |
interface_address | string | A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. (example: 192.0.2.0/31) |
interface_address6 | string | A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 (example: 2606:54c1:7:0:a9fe:12d2:1:200/127) |
modified_on | string (date-time) | The date and time the tunnel was last modified. (example: 2017-06-14T05:20:00Z) |
mtu | integer | The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | cf_interconnect_id, account_id | x-magic-new-hc-target | Lists details for a specific interconnect. |
list | select | account_id | x-magic-new-hc-target | Lists interconnects associated with an account. |
update | replace | cf_interconnect_id, account_id | x-magic-new-hc-target | Updates a specific interconnect associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes. |
bulk_update | replace | account_id | x-magic-new-hc-target | Updates multiple interconnects associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes. |
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. |
cf_interconnect_id | string | |
x-magic-new-hc-target | boolean | If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false. |
SELECT examples
- get
- list
Lists details for a specific interconnect.
SELECT
interconnect
FROM cloudflare.magic_transit.cf_interconnects
WHERE cf_interconnect_id = '{{ cf_interconnect_id }}' -- required
AND account_id = '{{ account_id }}' -- required
AND x-magic-new-hc-target = '{{ x-magic-new-hc-target }}'
;
Lists interconnects associated with an account.
SELECT
id,
name,
virtual_port_reservation_id,
colo_name,
automatic_return_routing,
created_on,
description,
gre,
health_check,
interface_address,
interface_address6,
modified_on,
mtu
FROM cloudflare.magic_transit.cf_interconnects
WHERE account_id = '{{ account_id }}' -- required
AND x-magic-new-hc-target = '{{ x-magic-new-hc-target }}'
;
REPLACE examples
- update
- bulk_update
Updates a specific interconnect associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.
REPLACE cloudflare.magic_transit.cf_interconnects
SET
automatic_return_routing = {{ automatic_return_routing }},
description = '{{ description }}',
gre = '{{ gre }}',
health_check = '{{ health_check }}',
interface_address = '{{ interface_address }}',
interface_address6 = '{{ interface_address6 }}',
mtu = {{ mtu }},
name = '{{ name }}'
WHERE
cf_interconnect_id = '{{ cf_interconnect_id }}' --required
AND account_id = '{{ account_id }}' --required
AND x-magic-new-hc-target = {{ x-magic-new-hc-target}}
RETURNING
errors,
messages,
result,
success;
Updates multiple interconnects associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.
REPLACE cloudflare.magic_transit.cf_interconnects
SET
-- No updatable properties
WHERE
account_id = '{{ account_id }}' --required
AND x-magic-new-hc-target = {{ x-magic-new-hc-target}}
RETURNING
errors,
messages,
result,
success;