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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
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"
}