Skip to content
Start here

Create a new interconnect

client.NetworkInterconnects.Interconnects.New(ctx, params) (*InterconnectNewResponse, error)
POST/accounts/{account_id}/cni/interconnects

Create a new interconnect

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Magic WAN WriteMagic Transit Write
ParametersExpand Collapse
params InterconnectNewParams
AccountID param.Field[string]

Path param: Customer account tag

Account param.Field[string]

Body param

SlotID param.Field[string]

Body param

formatuuid
Type param.Field[string]

Body param

Speed param.Field[string]optional

Body param

ReturnsExpand Collapse
type InterconnectNewResponse interface{…}
One of the following:
type InterconnectNewResponseNscInterconnectPhysicalBody struct{…}
Account string
Facility InterconnectNewResponseNscInterconnectPhysicalBodyFacility
Address []string
Name string
Name string
Site string

A Cloudflare site name.

SlotID string
formatuuid
Speed string
Type string
Owner stringoptional
type InterconnectNewResponseNscInterconnectGcpPartnerBody struct{…}
Account string
Name string
Region string
Type string
Owner stringoptional
Speed InterconnectNewResponseNscInterconnectGcpPartnerBodySpeedoptional

Bandwidth structure as visible through the customer-facing API.

One of the following:
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed50M InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "50M"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed100M InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "100M"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed200M InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "200M"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed300M InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "300M"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed400M InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "400M"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed500M InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "500M"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed1G InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "1G"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed2G InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "2G"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed5G InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "5G"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed10G InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "10G"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed20G InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "20G"
const InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed50G InterconnectNewResponseNscInterconnectGcpPartnerBodySpeed = "50G"

Create a new interconnect

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/network_interconnects"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  interconnect, err := client.NetworkInterconnects.Interconnects.New(context.TODO(), network_interconnects.InterconnectNewParams{
    AccountID: cloudflare.F("account_id"),
    Body: network_interconnects.InterconnectNewParamsBodyNscInterconnectCreatePhysicalBody{
      Account: cloudflare.F("account"),
      SlotID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
      Type: cloudflare.F("type"),
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", interconnect)
}
{
  "account": "account",
  "facility": {
    "address": [
      "string"
    ],
    "name": "name"
  },
  "name": "name",
  "site": "site",
  "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "speed": "speed",
  "type": "type",
  "owner": "owner"
}
Returns Examples
{
  "account": "account",
  "facility": {
    "address": [
      "string"
    ],
    "name": "name"
  },
  "name": "name",
  "site": "site",
  "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "speed": "speed",
  "type": "type",
  "owner": "owner"
}