pydo.byoip_prefixes.patch()

Generated on 9 Jun 2026 from pydo version v0.36.0

Usage

client.byoip_prefixes.patch(
    byoip_prefix_uuid="f47ac10b-58cc-4372-a567-0e02b2c3d479",
    body={
        "advertise": True,
    },
)
Returns JSONRaises HttpResponseError

Description

To update a BYOIP prefix, send a PATCH request to /v2/byoip_prefixes/$byoip_prefix_uuid.

Currently, you can update the advertisement status of the prefix. The response will include the updated details of the prefix.

Parameters

byoip_prefix_uuid string required

A unique identifier for a BYOIP prefix.

advertise boolean optional

Example: True

Whether the BYOIP prefix should be advertised

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

byoip_prefix_uuid = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

req = {
    "advertise": True,
}

resp = client.byoip_prefixes.update(byoip_prefix_uuid=byoip_prefix_uuid, body=req)

Response Example

Show Response Example
{
  "byoip_prefix": {
    "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "status": "active",
    "region": "nyc3",
    "prefix": "203.0.113.0/24",
    "validations": [],
    "failure_reason": "",
    "advertised": true,
    "locked": false,
    "project_id": "12345678-1234-1234-1234-123456789012"
  }
}

More Information

See /v2/byoip_prefixes/{byoip_prefix_uuid} 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.