# Network Interconnects # CNIs ## List existing CNI objects `client.networkInterconnects.cnis.list(CNIListParamsparams, RequestOptionsoptions?): CNIListResponse` **get** `/accounts/{account_id}/cni/cnis` List existing CNI objects ### Parameters - `params: CNIListParams` - `account_id: string` Path param: Customer account tag - `cursor?: number | null` Query param - `limit?: number | null` Query param - `slot?: string | null` Query param: If specified, only show CNIs associated with the specified slot - `tunnel_id?: string | null` Query param: If specified, only show cnis associated with the specified tunnel id ### Returns - `CNIListResponse` - `items: Array` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. - `next?: number | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cnis = await client.networkInterconnects.cnis.list({ account_id: 'account_id' }); console.log(cnis.items); ``` #### Response ```json { "items": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account": "account", "cust_ip": "192.168.3.4/31", "interconnect": "interconnect", "magic": { "conduit_name": "conduit_name", "description": "description", "mtu": 0 }, "p2p_ip": "192.168.3.4/31", "bgp": { "customer_asn": 0, "extra_prefixes": [ "string" ], "md5_key": "md5_key" } } ], "next": 0 } ``` ## Get information about a CNI object `client.networkInterconnects.cnis.get(stringcni, CNIGetParamsparams, RequestOptionsoptions?): CNIGetResponse` **get** `/accounts/{account_id}/cni/cnis/{cni}` Get information about a CNI object ### Parameters - `cni: string` - `params: CNIGetParams` - `account_id: string` Customer account tag ### Returns - `CNIGetResponse` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cni = await client.networkInterconnects.cnis.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(cni.id); ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account": "account", "cust_ip": "192.168.3.4/31", "interconnect": "interconnect", "magic": { "conduit_name": "conduit_name", "description": "description", "mtu": 0 }, "p2p_ip": "192.168.3.4/31", "bgp": { "customer_asn": 0, "extra_prefixes": [ "string" ], "md5_key": "md5_key" } } ``` ## Create a new CNI object `client.networkInterconnects.cnis.create(CNICreateParamsparams, RequestOptionsoptions?): CNICreateResponse` **post** `/accounts/{account_id}/cni/cnis` Create a new CNI object ### Parameters - `params: CNICreateParams` - `account_id: string` Path param: Customer account tag - `account: string` Body param: Customer account tag - `interconnect: string` Body param - `magic: Magic` Body param - `conduit_name: string` - `description: string` - `mtu: number` - `bgp?: BGP` Body param - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### Returns - `CNICreateResponse` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cni = await client.networkInterconnects.cnis.create({ account_id: 'account_id', account: 'account', interconnect: 'interconnect', magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0, }, }); console.log(cni.id); ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account": "account", "cust_ip": "192.168.3.4/31", "interconnect": "interconnect", "magic": { "conduit_name": "conduit_name", "description": "description", "mtu": 0 }, "p2p_ip": "192.168.3.4/31", "bgp": { "customer_asn": 0, "extra_prefixes": [ "string" ], "md5_key": "md5_key" } } ``` ## Modify stored information about a CNI object `client.networkInterconnects.cnis.update(stringcni, CNIUpdateParamsparams, RequestOptionsoptions?): CNIUpdateResponse` **put** `/accounts/{account_id}/cni/cnis/{cni}` Modify stored information about a CNI object ### Parameters - `cni: string` - `params: CNIUpdateParams` - `account_id: string` Path param: Customer account tag - `id: string` Body param - `account: string` Body param: Customer account tag - `cust_ip: string` Body param: Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Body param: Interconnect identifier hosting this CNI - `magic: Magic` Body param - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Body param: Cloudflare end of the point-to-point link - `bgp?: BGP` Body param - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### Returns - `CNIUpdateResponse` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cni = await client.networkInterconnects.cnis.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', account: 'account', cust_ip: '192.168.3.4/31', interconnect: 'interconnect', magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0, }, p2p_ip: '192.168.3.4/31', }); console.log(cni.id); ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account": "account", "cust_ip": "192.168.3.4/31", "interconnect": "interconnect", "magic": { "conduit_name": "conduit_name", "description": "description", "mtu": 0 }, "p2p_ip": "192.168.3.4/31", "bgp": { "customer_asn": 0, "extra_prefixes": [ "string" ], "md5_key": "md5_key" } } ``` ## Delete a specified CNI object `client.networkInterconnects.cnis.delete(stringcni, CNIDeleteParamsparams, RequestOptionsoptions?): void` **delete** `/accounts/{account_id}/cni/cnis/{cni}` Delete a specified CNI object ### Parameters - `cni: string` - `params: CNIDeleteParams` - `account_id: string` Customer account tag ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.networkInterconnects.cnis.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); ``` ## Domain Types ### CNI List Response - `CNIListResponse` - `items: Array` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. - `next?: number | null` ### CNI Get Response - `CNIGetResponse` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### CNI Create Response - `CNICreateResponse` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. ### CNI Update Response - `CNIUpdateResponse` - `id: string` - `account: string` Customer account tag - `cust_ip: string` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: string` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: string` - `description: string` - `mtu: number` - `p2p_ip: string` Cloudflare end of the point-to-point link - `bgp?: BGP` - `customer_asn: number` ASN used on the customer end of the BGP session - `extra_prefixes: Array` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key?: string | null` MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= |` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected. # Interconnects ## List existing interconnects `client.networkInterconnects.interconnects.list(InterconnectListParamsparams, RequestOptionsoptions?): InterconnectListResponse` **get** `/accounts/{account_id}/cni/interconnects` List existing interconnects ### Parameters - `params: InterconnectListParams` - `account_id: string` Path param: Customer account tag - `cursor?: number | null` Query param - `limit?: number | null` Query param - `site?: string | null` Query param: If specified, only show interconnects located at the given site - `type?: string | null` Query param: If specified, only show interconnects of the given type ### Returns - `InterconnectListResponse` - `items: Array` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` - `next?: number | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const interconnects = await client.networkInterconnects.interconnects.list({ account_id: 'account_id', }); console.log(interconnects.items); ``` #### Response ```json { "items": [ { "account": "account", "facility": { "address": [ "string" ], "name": "name" }, "name": "name", "site": "site", "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "speed": "speed", "type": "type", "owner": "owner" } ], "next": 0 } ``` ## Get information about an interconnect object `client.networkInterconnects.interconnects.get(stringicon, InterconnectGetParamsparams, RequestOptionsoptions?): InterconnectGetResponse` **get** `/accounts/{account_id}/cni/interconnects/{icon}` Get information about an interconnect object ### Parameters - `icon: string` - `params: InterconnectGetParams` - `account_id: string` Customer account tag ### Returns - `InterconnectGetResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const interconnect = await client.networkInterconnects.interconnects.get('icon', { account_id: 'account_id', }); console.log(interconnect); ``` #### Response ```json { "account": "account", "facility": { "address": [ "string" ], "name": "name" }, "name": "name", "site": "site", "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "speed": "speed", "type": "type", "owner": "owner" } ``` ## Create a new interconnect `client.networkInterconnects.interconnects.create(InterconnectCreateParamsparams, RequestOptionsoptions?): InterconnectCreateResponse` **post** `/accounts/{account_id}/cni/interconnects` Create a new interconnect ### Parameters - `InterconnectCreateParams = NscInterconnectCreatePhysicalBody | NscInterconnectCreateGcpPartnerBody` - `InterconnectCreateParamsBase` - `NscInterconnectCreatePhysicalBody extends InterconnectCreateParamsBase` - `NscInterconnectCreateGcpPartnerBody extends InterconnectCreateParamsBase` ### Returns - `InterconnectCreateResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const interconnect = await client.networkInterconnects.interconnects.create({ account_id: 'account_id', account: 'account', slot_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', type: 'type', }); console.log(interconnect); ``` #### Response ```json { "account": "account", "facility": { "address": [ "string" ], "name": "name" }, "name": "name", "site": "site", "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "speed": "speed", "type": "type", "owner": "owner" } ``` ## Delete an interconnect object `client.networkInterconnects.interconnects.delete(stringicon, InterconnectDeleteParamsparams, RequestOptionsoptions?): void` **delete** `/accounts/{account_id}/cni/interconnects/{icon}` Delete an interconnect object ### Parameters - `icon: string` - `params: InterconnectDeleteParams` - `account_id: string` Customer account tag ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.networkInterconnects.interconnects.delete('icon', { account_id: 'account_id' }); ``` ## Generate the Letter of Authorization (LOA) for a given interconnect `client.networkInterconnects.interconnects.loa(stringicon, InterconnectLOAParamsparams, RequestOptionsoptions?): void` **get** `/accounts/{account_id}/cni/interconnects/{icon}/loa` Generate the Letter of Authorization (LOA) for a given interconnect ### Parameters - `icon: string` - `params: InterconnectLOAParams` - `account_id: string` Customer account tag ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.networkInterconnects.interconnects.loa('icon', { account_id: 'account_id' }); ``` ## Get the current status of an interconnect object `client.networkInterconnects.interconnects.status(stringicon, InterconnectStatusParamsparams, RequestOptionsoptions?): InterconnectStatusResponse` **get** `/accounts/{account_id}/cni/interconnects/{icon}/status` Get the current status of an interconnect object ### Parameters - `icon: string` - `params: InterconnectStatusParams` - `account_id: string` Customer account tag ### Returns - `InterconnectStatusResponse = Pending | Down | Unhealthy | Healthy` - `Pending` - `state: "Pending"` - `"Pending"` - `Down` - `state: "Down"` - `"Down"` - `reason?: string | null` Diagnostic information, if available - `Unhealthy` - `state: "Unhealthy"` - `"Unhealthy"` - `reason?: string | null` Diagnostic information, if available - `Healthy` - `state: "Healthy"` - `"Healthy"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.networkInterconnects.interconnects.status('icon', { account_id: 'account_id', }); console.log(response); ``` #### Response ```json { "state": "Pending" } ``` ## Domain Types ### Interconnect List Response - `InterconnectListResponse` - `items: Array` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` - `next?: number | null` ### Interconnect Get Response - `InterconnectGetResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### Interconnect Create Response - `InterconnectCreateResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### Interconnect Status Response - `InterconnectStatusResponse = Pending | Down | Unhealthy | Healthy` - `Pending` - `state: "Pending"` - `"Pending"` - `Down` - `state: "Down"` - `"Down"` - `reason?: string | null` Diagnostic information, if available - `Unhealthy` - `state: "Unhealthy"` - `"Unhealthy"` - `reason?: string | null` Diagnostic information, if available - `Healthy` - `state: "Healthy"` - `"Healthy"` # Settings ## Get the current settings for the active account `client.networkInterconnects.settings.get(SettingGetParamsparams, RequestOptionsoptions?): SettingGetResponse` **get** `/accounts/{account_id}/cni/settings` Get the current settings for the active account ### Parameters - `params: SettingGetParams` - `account_id: string` Account tag to retrieve settings for ### Returns - `SettingGetResponse` - `default_asn: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const setting = await client.networkInterconnects.settings.get({ account_id: 'account_id' }); console.log(setting.default_asn); ``` #### Response ```json { "default_asn": 0 } ``` ## Update the current settings for the active account `client.networkInterconnects.settings.update(SettingUpdateParamsparams, RequestOptionsoptions?): SettingUpdateResponse` **put** `/accounts/{account_id}/cni/settings` Update the current settings for the active account ### Parameters - `params: SettingUpdateParams` - `account_id: string` Path param: Account tag to update settings for - `default_asn?: number | null` Body param ### Returns - `SettingUpdateResponse` - `default_asn: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const setting = await client.networkInterconnects.settings.update({ account_id: 'account_id' }); console.log(setting.default_asn); ``` #### Response ```json { "default_asn": 0 } ``` ## Domain Types ### Setting Get Response - `SettingGetResponse` - `default_asn: number` ### Setting Update Response - `SettingUpdateResponse` - `default_asn: number` # Slots ## Retrieve a list of all slots matching the specified parameters `client.networkInterconnects.slots.list(SlotListParamsparams, RequestOptionsoptions?): SlotListResponse` **get** `/accounts/{account_id}/cni/slots` Retrieve a list of all slots matching the specified parameters ### Parameters - `params: SlotListParams` - `account_id: string` Path param: Customer account tag - `address_contains?: string | null` Query param: If specified, only show slots with the given text in their address field - `cursor?: number | null` Query param - `limit?: number | null` Query param - `occupied?: boolean | null` Query param: If specified, only show slots with a specific occupied/unoccupied state - `site?: string | null` Query param: If specified, only show slots located at the given site - `speed?: string | null` Query param: If specified, only show slots that support the given speed ### Returns - `SlotListResponse` - `items: Array` - `id: string` Slot ID - `facility: Facility` - `address: Array` - `name: string` - `occupied: boolean` Whether the slot is occupied or not - `site: string` - `speed: string` - `account?: string` Customer account tag - `next?: number | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const slots = await client.networkInterconnects.slots.list({ account_id: 'account_id' }); console.log(slots.items); ``` #### Response ```json { "items": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "facility": { "address": [ "string" ], "name": "name" }, "occupied": true, "site": "site", "speed": "speed", "account": "account" } ], "next": 0 } ``` ## Get information about the specified slot `client.networkInterconnects.slots.get(stringslot, SlotGetParamsparams, RequestOptionsoptions?): SlotGetResponse` **get** `/accounts/{account_id}/cni/slots/{slot}` Get information about the specified slot ### Parameters - `slot: string` - `params: SlotGetParams` - `account_id: string` Customer account tag ### Returns - `SlotGetResponse` - `id: string` Slot ID - `facility: Facility` - `address: Array` - `name: string` - `occupied: boolean` Whether the slot is occupied or not - `site: string` - `speed: string` - `account?: string` Customer account tag ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const slot = await client.networkInterconnects.slots.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(slot.id); ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "facility": { "address": [ "string" ], "name": "name" }, "occupied": true, "site": "site", "speed": "speed", "account": "account" } ``` ## Domain Types ### Slot List Response - `SlotListResponse` - `items: Array` - `id: string` Slot ID - `facility: Facility` - `address: Array` - `name: string` - `occupied: boolean` Whether the slot is occupied or not - `site: string` - `speed: string` - `account?: string` Customer account tag - `next?: number | null` ### Slot Get Response - `SlotGetResponse` - `id: string` Slot ID - `facility: Facility` - `address: Array` - `name: string` - `occupied: boolean` Whether the slot is occupied or not - `site: string` - `speed: string` - `account?: string` Customer account tag