pydo.cdn.update_endpoints()
Generated on 24 Apr 2025
from pydo
version
v0.10.0
Description
To update the TTL, certificate ID, or the FQDN of the custom subdomain for
an existing CDN endpoint, send a PUT request to
/v2/cdn/endpoints/$ENDPOINT_ID
.
Parameters
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
cdn_id |
string | True | A unique identifier for a CDN endpoint. | |
body |
JSON or IO[bytes] | True |
Request Sample
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
update_req = {
"ttl": 3600,
"certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
"custom_domain": "static.example.com",
}
update_resp = client.cdn.update_endpoints("19f06b6a", update_req)
More Information
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.