pydo.partner_attachments.create()

Generated on 7 Jul 2026 from pydo version v0.39.0

Usage

client.partner_attachments.create(
    body={
        "name": "env.prod-partner-network-connect",
        "connection_bandwidth_in_mbps": 1000,
        "region": "nyc",
        ...,
    },
)
Returns JSONRaises HttpResponseError

Description

To create a new partner attachment, send a POST request to /v2/partner_network_connect/attachments with a JSON object containing the required configuration details.

Parameters

name string required

Example: env.prod-partner-network-connect

The name of the partner attachment. Must be unique and may only contain alphanumeric characters, dashes, and periods.

connection_bandwidth_in_mbps integer required

Bandwidth (in Mbps) of the connection.

One of: 1000, 2000, 5000, 10000

region string required

The region to create the partner attachment.

One of: nyc, sfo, fra, ams, sgp

naas_provider string required

Example: megaport

vpc_ids array of strings required

Example: ['c140286f-e6ce-4131-8b7b-df4590ce8d6a', '994a2735-dc84-11e8-80bc-3cfdfea9fba1']

An array of VPCs IDs.

parent_uuid string optional

Example: d594cf8d-8c79-4bc5-aec1-6f9b211506b3

Optional associated partner attachment UUID

bgp object optional

Optional BGP configurations

Show child properties
local_router_ip string required

Example: 169.254.0.1/29

IP of the DO router

peer_router_ip string required

Example: 169.254.0.6/29

IP of the Naas Provider router

peer_router_asn integer required

Example: 64532

ASN of the peer router

auth_key string required

Example: 0xsNnb1pwQlowdoMySEfWwk4I

BGP Auth Key

redundancy_zone string optional

Optional redundancy zone for the partner attachment.

One of: MEGAPORT_BLUE, MEGAPORT_RED

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))

req = { 
  "connection_bandwidth_in_mbps": 1000,
  "naas_provider": "MEGAPORT",  
  "name": "c5pAqd-ped-007",
  "region": "NYC",
  "vpc_ids": [
      "bafc1c1d-bac1-2412-7f5e-fezc832z213z"
  ],
  "bgp": {
      "auth_key": "0zzyTNuRZa00vqkzIToPG3q",
      "local_router_ip": "169.254.11.1/29",
      "peer_router_asn": 133938,
      "peer_router_ip": "169.254.11.2/29"
  },
}

resp = client.partner_attachments.create(body=req)

Response Example

Show Response Example
{
  "partner_attachment": {
    "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "name": "env.prod-partner-network-connect",
    "state": "CREATED",
    "created_at": "2025-03-27T13:03:53Z",
    "connection_bandwidth_in_mbps": 1000,
    "region": "NYC",
    "naas_provider": "MEGAPORT",
    "vpc_ids": [
      "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
    ],
    "bgp": {
      "local_asn": 65000,
      "local_router_ip": "2.2.2.2/29",
      "peer_asn": 65001,
      "peer_router_ip": "3.3.3.3/29"
    }
  }
}

More Information

See /v2/partner_network_connect/attachments in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.