cnis
Creates, updates, deletes, gets or lists a cnis resource.
Overview
| Name | cnis |
| Type | Resource |
| Id | cloudflare.network_interconnects.cnis |
Fields
The following fields are returned by SELECT queries:
- get
- list
CNI's associated data
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | |
account | string | Customer account tag |
bgp | object | |
cust_ip | string (A.B.C.D/N) | Customer end of the point-to-point link This should always be inside the same prefix as p2p_ip. (example: 192.168.3.4/31) |
interconnect | string | Interconnect identifier hosting this CNI |
magic | object | |
p2p_ip | string (A.B.C.D/N) | Cloudflare end of the point-to-point link (example: 192.168.3.4/31) |
List of matching CNI objects
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | |
account | string | Customer account tag |
bgp | object | |
cust_ip | string (A.B.C.D/N) | Customer end of the point-to-point link This should always be inside the same prefix as p2p_ip. (example: 192.168.3.4/31) |
interconnect | string | Interconnect identifier hosting this CNI |
magic | object | |
p2p_ip | string (A.B.C.D/N) | Cloudflare end of the point-to-point link (example: 192.168.3.4/31) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | cni, account_id | ||
list | select | account_id | slot, tunnel_id, cursor, limit | |
create | insert | account_id, interconnect, account, magic | ||
update | replace | cni, account_id, id, interconnect, account, p2p_ip, cust_ip, magic | ||
delete | delete | cni, account_id |
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. |
cni | string (uuid) | CNI ID to retrieve information about |
cursor | integer (int32) | |
limit | integer | |
slot | string | If specified, only show CNIs associated with the specified slot |
tunnel_id | string | If specified, only show cnis associated with the specified tunnel id |
SELECT examples
- get
- list
CNI's associated data
SELECT
id,
account,
bgp,
cust_ip,
interconnect,
magic,
p2p_ip
FROM cloudflare.network_interconnects.cnis
WHERE cni = '{{ cni }}' -- required
AND account_id = '{{ account_id }}' -- required
;
List of matching CNI objects
SELECT
id,
account,
bgp,
cust_ip,
interconnect,
magic,
p2p_ip
FROM cloudflare.network_interconnects.cnis
WHERE account_id = '{{ account_id }}' -- required
AND slot = '{{ slot }}'
AND tunnel_id = '{{ tunnel_id }}'
AND cursor = '{{ cursor }}'
AND limit = '{{ limit }}'
;
INSERT examples
- create
- Manifest
No description available.
INSERT INTO cloudflare.network_interconnects.cnis (
account,
bgp,
interconnect,
magic,
account_id
)
SELECT
'{{ account }}' /* required */,
'{{ bgp }}',
'{{ interconnect }}' /* required */,
'{{ magic }}' /* required */,
'{{ account_id }}'
RETURNING
id,
account,
bgp,
cust_ip,
interconnect,
magic,
p2p_ip
;
# Description fields are for documentation purposes
- name: cnis
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the cnis resource.
- name: account
value: "{{ account }}"
description: |
Customer account tag
- name: bgp
value:
customer_asn: {{ customer_asn }}
extra_prefixes:
- "{{ extra_prefixes }}"
md5_key: "{{ md5_key }}"
- name: interconnect
value: "{{ interconnect }}"
- name: magic
value:
conduit_name: "{{ conduit_name }}"
description: "{{ description }}"
mtu: {{ mtu }}
REPLACE examples
- update
No description available.
REPLACE cloudflare.network_interconnects.cnis
SET
account = '{{ account }}',
bgp = '{{ bgp }}',
cust_ip = '{{ cust_ip }}',
id = '{{ id }}',
interconnect = '{{ interconnect }}',
magic = '{{ magic }}',
p2p_ip = '{{ p2p_ip }}'
WHERE
cni = '{{ cni }}' --required
AND account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
AND interconnect = '{{ interconnect }}' --required
AND account = '{{ account }}' --required
AND p2p_ip = '{{ p2p_ip }}' --required
AND cust_ip = '{{ cust_ip }}' --required
AND magic = '{{ magic }}' --required
RETURNING
id,
account,
bgp,
cust_ip,
interconnect,
magic,
p2p_ip;
DELETE examples
- delete
No description available.
DELETE FROM cloudflare.network_interconnects.cnis
WHERE cni = '{{ cni }}' --required
AND account_id = '{{ account_id }}' --required
;