# Network Interconnects # CNIs ## List existing CNI objects `network_interconnects.cnis.list(CNIListParams**kwargs) -> CNIListResponse` **get** `/accounts/{account_id}/cni/cnis` List existing CNI objects ### Parameters - `account_id: str` Customer account tag - `cursor: Optional[int]` - `limit: Optional[int]` - `slot: Optional[str]` If specified, only show CNIs associated with the specified slot - `tunnel_id: Optional[str]` If specified, only show cnis associated with the specified tunnel id ### Returns - `class CNIListResponse: …` - `items: List[Item]` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: ItemMagic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[ItemBGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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: Optional[int]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) cnis = client.network_interconnects.cnis.list( account_id="account_id", ) print(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 `network_interconnects.cnis.get(strcni, CNIGetParams**kwargs) -> CNIGetResponse` **get** `/accounts/{account_id}/cni/cnis/{cni}` Get information about a CNI object ### Parameters - `account_id: str` Customer account tag - `cni: str` ### Returns - `class CNIGetResponse: …` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) cni = client.network_interconnects.cnis.get( cni="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(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 `network_interconnects.cnis.create(CNICreateParams**kwargs) -> CNICreateResponse` **post** `/accounts/{account_id}/cni/cnis` Create a new CNI object ### Parameters - `account_id: str` Customer account tag - `account: str` Customer account tag - `interconnect: str` - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: SequenceNotStr[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 - `class CNICreateResponse: …` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) cni = client.network_interconnects.cnis.create( account_id="account_id", account="account", interconnect="interconnect", magic={ "conduit_name": "conduit_name", "description": "description", "mtu": 0, }, ) print(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 `network_interconnects.cnis.update(strcni, CNIUpdateParams**kwargs) -> CNIUpdateResponse` **put** `/accounts/{account_id}/cni/cnis/{cni}` Modify stored information about a CNI object ### Parameters - `account_id: str` Customer account tag - `cni: str` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: SequenceNotStr[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 - `class CNIUpdateResponse: …` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) cni = client.network_interconnects.cnis.update( cni="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", ) print(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 `network_interconnects.cnis.delete(strcni, CNIDeleteParams**kwargs)` **delete** `/accounts/{account_id}/cni/cnis/{cni}` Delete a specified CNI object ### Parameters - `account_id: str` Customer account tag - `cni: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) client.network_interconnects.cnis.delete( cni="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) ``` ## Domain Types ### CNI List Response - `class CNIListResponse: …` - `items: List[Item]` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: ItemMagic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[ItemBGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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: Optional[int]` ### CNI Get Response - `class CNIGetResponse: …` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 - `class CNICreateResponse: …` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 - `class CNIUpdateResponse: …` - `id: str` - `account: str` Customer account tag - `cust_ip: str` Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. - `interconnect: str` Interconnect identifier hosting this CNI - `magic: Magic` - `conduit_name: str` - `description: str` - `mtu: int` - `p2p_ip: str` Cloudflare end of the point-to-point link - `bgp: Optional[BGP]` - `customer_asn: int` ASN used on the customer end of the BGP session - `extra_prefixes: List[str]` Extra set of static prefixes to advertise to the customer's end of the session - `md5_key: Optional[str]` 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 `network_interconnects.interconnects.list(InterconnectListParams**kwargs) -> InterconnectListResponse` **get** `/accounts/{account_id}/cni/interconnects` List existing interconnects ### Parameters - `account_id: str` Customer account tag - `cursor: Optional[int]` - `limit: Optional[int]` - `site: Optional[str]` If specified, only show interconnects located at the given site - `type: Optional[str]` If specified, only show interconnects of the given type ### Returns - `class InterconnectListResponse: …` - `items: List[Item]` - `class ItemNscInterconnectPhysicalBody: …` - `account: str` - `facility: ItemNscInterconnectPhysicalBodyFacility` - `address: List[str]` - `name: str` - `name: str` - `site: str` A Cloudflare site name. - `slot_id: str` - `speed: str` - `type: str` - `owner: Optional[str]` - `class ItemNscInterconnectGcpPartnerBody: …` - `account: str` - `name: str` - `region: str` - `type: str` - `owner: Optional[str]` - `speed: Optional[Literal["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: Optional[int]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) interconnects = client.network_interconnects.interconnects.list( account_id="account_id", ) print(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 `network_interconnects.interconnects.get(stricon, InterconnectGetParams**kwargs) -> InterconnectGetResponse` **get** `/accounts/{account_id}/cni/interconnects/{icon}` Get information about an interconnect object ### Parameters - `account_id: str` Customer account tag - `icon: str` ### Returns - `InterconnectGetResponse` - `class NscInterconnectPhysicalBody: …` - `account: str` - `facility: NscInterconnectPhysicalBodyFacility` - `address: List[str]` - `name: str` - `name: str` - `site: str` A Cloudflare site name. - `slot_id: str` - `speed: str` - `type: str` - `owner: Optional[str]` - `class NscInterconnectGcpPartnerBody: …` - `account: str` - `name: str` - `region: str` - `type: str` - `owner: Optional[str]` - `speed: Optional[Literal["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 ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) interconnect = client.network_interconnects.interconnects.get( icon="icon", account_id="account_id", ) print(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 `network_interconnects.interconnects.create(InterconnectCreateParams**kwargs) -> InterconnectCreateResponse` **post** `/accounts/{account_id}/cni/interconnects` Create a new interconnect ### Parameters - `account_id: str` Customer account tag - `account: str` - `slot_id: str` - `type: str` - `speed: Optional[str]` ### Returns - `InterconnectCreateResponse` - `class NscInterconnectPhysicalBody: …` - `account: str` - `facility: NscInterconnectPhysicalBodyFacility` - `address: List[str]` - `name: str` - `name: str` - `site: str` A Cloudflare site name. - `slot_id: str` - `speed: str` - `type: str` - `owner: Optional[str]` - `class NscInterconnectGcpPartnerBody: …` - `account: str` - `name: str` - `region: str` - `type: str` - `owner: Optional[str]` - `speed: Optional[Literal["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 ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) interconnect = client.network_interconnects.interconnects.create( account_id="account_id", account="account", slot_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", type="type", ) print(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 `network_interconnects.interconnects.delete(stricon, InterconnectDeleteParams**kwargs)` **delete** `/accounts/{account_id}/cni/interconnects/{icon}` Delete an interconnect object ### Parameters - `account_id: str` Customer account tag - `icon: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) client.network_interconnects.interconnects.delete( icon="icon", account_id="account_id", ) ``` ## Generate the Letter of Authorization (LOA) for a given interconnect `network_interconnects.interconnects.loa(stricon, InterconnectLOAParams**kwargs)` **get** `/accounts/{account_id}/cni/interconnects/{icon}/loa` Generate the Letter of Authorization (LOA) for a given interconnect ### Parameters - `account_id: str` Customer account tag - `icon: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) client.network_interconnects.interconnects.loa( icon="icon", account_id="account_id", ) ``` ## Get the current status of an interconnect object `network_interconnects.interconnects.status(stricon, InterconnectStatusParams**kwargs) -> InterconnectStatusResponse` **get** `/accounts/{account_id}/cni/interconnects/{icon}/status` Get the current status of an interconnect object ### Parameters - `account_id: str` Customer account tag - `icon: str` ### Returns - `InterconnectStatusResponse` - `class Pending: …` - `state: Literal["Pending"]` - `"Pending"` - `class Down: …` - `state: Literal["Down"]` - `"Down"` - `reason: Optional[str]` Diagnostic information, if available - `class Unhealthy: …` - `state: Literal["Unhealthy"]` - `"Unhealthy"` - `reason: Optional[str]` Diagnostic information, if available - `class Healthy: …` - `state: Literal["Healthy"]` - `"Healthy"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.network_interconnects.interconnects.status( icon="icon", account_id="account_id", ) print(response) ``` #### Response ```json { "state": "Pending" } ``` ## Domain Types ### Interconnect List Response - `class InterconnectListResponse: …` - `items: List[Item]` - `class ItemNscInterconnectPhysicalBody: …` - `account: str` - `facility: ItemNscInterconnectPhysicalBodyFacility` - `address: List[str]` - `name: str` - `name: str` - `site: str` A Cloudflare site name. - `slot_id: str` - `speed: str` - `type: str` - `owner: Optional[str]` - `class ItemNscInterconnectGcpPartnerBody: …` - `account: str` - `name: str` - `region: str` - `type: str` - `owner: Optional[str]` - `speed: Optional[Literal["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: Optional[int]` ### Interconnect Get Response - `InterconnectGetResponse` - `class NscInterconnectPhysicalBody: …` - `account: str` - `facility: NscInterconnectPhysicalBodyFacility` - `address: List[str]` - `name: str` - `name: str` - `site: str` A Cloudflare site name. - `slot_id: str` - `speed: str` - `type: str` - `owner: Optional[str]` - `class NscInterconnectGcpPartnerBody: …` - `account: str` - `name: str` - `region: str` - `type: str` - `owner: Optional[str]` - `speed: Optional[Literal["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` - `class NscInterconnectPhysicalBody: …` - `account: str` - `facility: NscInterconnectPhysicalBodyFacility` - `address: List[str]` - `name: str` - `name: str` - `site: str` A Cloudflare site name. - `slot_id: str` - `speed: str` - `type: str` - `owner: Optional[str]` - `class NscInterconnectGcpPartnerBody: …` - `account: str` - `name: str` - `region: str` - `type: str` - `owner: Optional[str]` - `speed: Optional[Literal["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` - `class Pending: …` - `state: Literal["Pending"]` - `"Pending"` - `class Down: …` - `state: Literal["Down"]` - `"Down"` - `reason: Optional[str]` Diagnostic information, if available - `class Unhealthy: …` - `state: Literal["Unhealthy"]` - `"Unhealthy"` - `reason: Optional[str]` Diagnostic information, if available - `class Healthy: …` - `state: Literal["Healthy"]` - `"Healthy"` # Settings ## Get the current settings for the active account `network_interconnects.settings.get(SettingGetParams**kwargs) -> SettingGetResponse` **get** `/accounts/{account_id}/cni/settings` Get the current settings for the active account ### Parameters - `account_id: str` ### Returns - `class SettingGetResponse: …` - `default_asn: int` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) setting = client.network_interconnects.settings.get( account_id="account_id", ) print(setting.default_asn) ``` #### Response ```json { "default_asn": 0 } ``` ## Update the current settings for the active account `network_interconnects.settings.update(SettingUpdateParams**kwargs) -> SettingUpdateResponse` **put** `/accounts/{account_id}/cni/settings` Update the current settings for the active account ### Parameters - `account_id: str` - `default_asn: Optional[int]` ### Returns - `class SettingUpdateResponse: …` - `default_asn: int` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) setting = client.network_interconnects.settings.update( account_id="account_id", ) print(setting.default_asn) ``` #### Response ```json { "default_asn": 0 } ``` ## Domain Types ### Setting Get Response - `class SettingGetResponse: …` - `default_asn: int` ### Setting Update Response - `class SettingUpdateResponse: …` - `default_asn: int` # Slots ## Retrieve a list of all slots matching the specified parameters `network_interconnects.slots.list(SlotListParams**kwargs) -> SlotListResponse` **get** `/accounts/{account_id}/cni/slots` Retrieve a list of all slots matching the specified parameters ### Parameters - `account_id: str` Customer account tag - `address_contains: Optional[str]` If specified, only show slots with the given text in their address field - `cursor: Optional[int]` - `limit: Optional[int]` - `occupied: Optional[bool]` If specified, only show slots with a specific occupied/unoccupied state - `site: Optional[str]` If specified, only show slots located at the given site - `speed: Optional[str]` If specified, only show slots that support the given speed ### Returns - `class SlotListResponse: …` - `items: List[Item]` - `id: str` Slot ID - `facility: ItemFacility` - `address: List[str]` - `name: str` - `occupied: bool` Whether the slot is occupied or not - `site: str` - `speed: str` - `account: Optional[str]` Customer account tag - `next: Optional[int]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) slots = client.network_interconnects.slots.list( account_id="account_id", ) print(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 `network_interconnects.slots.get(strslot, SlotGetParams**kwargs) -> SlotGetResponse` **get** `/accounts/{account_id}/cni/slots/{slot}` Get information about the specified slot ### Parameters - `account_id: str` Customer account tag - `slot: str` ### Returns - `class SlotGetResponse: …` - `id: str` Slot ID - `facility: Facility` - `address: List[str]` - `name: str` - `occupied: bool` Whether the slot is occupied or not - `site: str` - `speed: str` - `account: Optional[str]` Customer account tag ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) slot = client.network_interconnects.slots.get( slot="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(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 - `class SlotListResponse: …` - `items: List[Item]` - `id: str` Slot ID - `facility: ItemFacility` - `address: List[str]` - `name: str` - `occupied: bool` Whether the slot is occupied or not - `site: str` - `speed: str` - `account: Optional[str]` Customer account tag - `next: Optional[int]` ### Slot Get Response - `class SlotGetResponse: …` - `id: str` Slot ID - `facility: Facility` - `address: List[str]` - `name: str` - `occupied: bool` Whether the slot is occupied or not - `site: str` - `speed: str` - `account: Optional[str]` Customer account tag