godo.CDNs.UpdateCustomDomain()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.CDNs.UpdateCustomDomain(ctx context.Context, id string, updateRequest *godo.CDNUpdateCustomDomainRequest) (*godo.CDN, *godo.Response, error)Description
UpdateCustomDomain sets or removes the custom domain of an individual CDN
This method sends a PUT request to /v2/cdn/endpoints/{}.
Parameters
idstring requiredupdateRequest*godo.CDNUpdateCustomDomainRequest required
Fields of godo.CDNUpdateCustomDomainRequest
CDNUpdateCustomDomainRequest represents a request to update the custom domain of a CDN.
CustomDomainstringCertificateIDstring
Returns
- *godo.CDN
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.CDN
CDN represents a DigitalOcean CDN
IDstringOriginstringEndpointstringCreatedAttime.TimeTTLuint32CertificateIDstringCustomDomainstring
Request Sample
Response Example
More Information
See PUT /v2/cdn/endpoints/{} in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.