---
title: "Update CDN"
method: PUT
path: "/delivery/v2.1/global/workspaces/{workspaceUUID}/cdns/{resourceId}"
tags: ["CDN and DNS (v2.1)"]
---

# Update CDN

`PUT /delivery/v2.1/global/workspaces/{workspaceUUID}/cdns/{resourceId}`

Updates an existing CDN object in the specified workspace with the provided configuration.

## Path parameters

- `resourceId` string, required
- `workspaceUUID` string, required

## Request body

- V2CDN
  - `apiVersion` 'delivery/v2' | 'delivery/v2.1', required — Version identifier of the API schema
  - `kind` 'CDN', required — The string value 'CDN' that identifies the schema
  - `metadata` V2ObjectMeta, required — Standard resource metadata fields
    - `creationTimestamp` string, date-time, required
    - `labels` object, required — Labels are key-value pairs attached to resources for organization and categorization
    - `name` string, required — User-provided name that uniquely identifies the resource within its workspace
    - `namespace` string, required — Namespace is the namespace in which the resource exists
    - `uid` string, required — System-generated unique identifier for the resource
  - `spec` V1beta1CDNSpec, required — Desired configuration for the CDN
    - `authorizeByConfigMap` boolean — Whether to authorize the CDN by config map. This is just for Sotoon internal usage.
    - `cache` V1beta1CDNCache, nullable — The cache configuration for the CDN.
      - `version` integer, required — The version of the cache configuration.
    - `canonicalHostname` string — The canonical hostname of the CDN
    - `canonicalRedirect` V1beta1CDNCanonicalRedirect, nullable — The canonical redirect configuration for the CDN.
      - `excludedCidrBlocks` string[] — The CIDR blocks to exclude from the canonical redirect.
      - `includedCidrBlocks` string[] — The CIDR blocks to include in the canonical redirect.
      - `matchingFilters` V1beta1MatchingFilter[] — The matching filters to canonical redirect.
        - `hostSuffix` string — The host suffix to match for canonical redirect.
        - `pathParts` string[] — The parts of the path to match for canonical redirect.
      - `redirect` boolean — Whether to redirect matched filters to the canonical hostname.
      - `servers` string[] — The servers to serve the canonical redirect.
    - `customPages` V1beta1CDNCustomPage[] — The custom error pages configuration for the CDN.
      - `content` string — The content of the custom page.
      - `statusCode` integer, required — The status code to use for the custom page.
    - `defaultHostname` string — The default hostname of the CDN
    - `description` string — A brief description of the CDN.
    - `development_mode` boolean — Whether to enable development mode to disable caching mechanism for 3 hours.
    - `firewall` V1beta1CDNFirewall, nullable — The firewall field lets you enable security features by creating rules that control access for specific users. Define the rule conditions in constraints, and specify the outcome in action when a request meets those conditions.
      - `enabled` boolean — Indicates if the firewall is active.
      - `iran_access` boolean — Specifies whether access from Iran is allowed.
      - `rules` V1beta1CDNFirewallRule[] — List of firewall rules that define access conditions and actions.
        - `action` V1beta1CDNFirewallAction, nullable, required — The action to take when the rule matches.
          - `basic` V1beta1CDNFirewallBasicAction, nullable — Require basic authentication for the requests.
            - `message` string — Message to return when the basic authentication failed.
            - `password` string — Password for the basic authentication action.
            - `username` string — Username for the basic authentication action.
          - `block` V1beta1CDNFirewallBlockAction, nullable — Blocks requests that match the rule.
            - `responseHeaders` V1beta1CDNFirewallResponseHeaders[] — Response headers to return when the block action is triggered.
              - …
            - `statusCode` integer — Status code to return when the block action is triggered.
            - `template` string — Template to return when the block action is triggered.
          - `captcha` V1beta1CDNFirewallCaptchaAction, nullable — Used to differentiate humans from bots, except search engine crawlers.
            - `backend` string, required — Backend used for the captcha action.
            - `name` string — Name of the cookie which is used by browser after solving captcha challenge.
            - `recaptcha` V1beta1CDNFirewallRecaptchaBackend, nullable — Recaptcha backend used for the captcha action.
              - …
            - `salt` string — Salt used for the captcha action when computing hash.
            - `template` string — Template used for the captcha action.
            - `ttl` integer — Time to live for the captcha action in seconds.
          - `cookie` V1beta1CDNFirewallCookieAction, nullable — Checks if requests contain specific cookie.
            - `name` string — Target cookie name.
            - `salt` string — Salt value used for the cookie when computing hash.
            - `ttl` integer — Cookie time-to-live in seconds.
          - `js` V1beta1CDNFirewallJSAction, nullable — Requires users to run a script to detect bots, except search engine crawlers.
            - `name` string — Name of the cookie which is used by browser after solving JS challenge.
            - `salt` string — Salt used for the JS action when computing hash.
            - `template` string — Template used for the JS action.
            - `ttl` integer — Time to live for the JS action in seconds.
          - `ratelimit` V1beta1CDNFirewallRatelimitAction, nullable — Prevents abuse by limiting the number of requests based on identifiers like ja4, jwt, or ip.
            - `algorithm` string — Algorithm used for the ratelimit action. One of: sliding_window, token_bucket.
            - `burst` integer — Burst of requests.
            - `identifier` V1beta1CDNFirewallRatelimitIdentifier, nullable, required — Identifier used for the ratelimit action.
              - …
            - `penalty_period` integer — Period of time in seconds that the penalty is applied to when the request exceeds the rate limit.
            - `period` integer — Period of time in seconds that the rate limit is applied to.
            - `rate` integer, required — Rate of incoming requests per period that are considered allowed.
            - `responseHeaders` V1beta1CDNFirewallResponseHeaders[] — Optional response headers to return when the request exceeds the rate limit.
              - …
            - `statusCode` integer — Status code to return when the request exceeds the rate limit.
            - `template` string — Template to return when the request exceeds the rate limit.
            - `validationStatusCode` integer — Status code to return when identifying user by the ratelimit identifier failed.
            - `validationTemplate` string — Template to return when identifying user by the ratelimit identifier failed.
          - `redirect` V1beta1CDNFirewallRedirectAction, nullable — Redirects requests that match the rule to a target URL.
            - `extraHeaders` V1beta1CDNLocationHeader[] — Extra headers to add to the http redirect response.
              - …
            - `extraQueryString` V1beta1CDNFirewallQueryStringRecord[] — Extra query strings to add to the redirect URL.
              - …
            - `preservePath` boolean, required — Preserves the path in the redirect URL.
            - `preserveQueryString` boolean, required — Preserves the query string in the redirect URL.
            - `referrer` boolean, required — Preserves the referrer in the redirect URL.
            - `statusCode` integer, required — Status code to return when the redirect action is triggered.
            - `target` string, required — Target URL to redirect to.
          - `staticPage` V1beta1CDNFirewallStaticPageAction, nullable — Serves a static page when the request is blocked.
            - `content` string — Content of the static page.
            - `responseHeaders` V1beta1CDNFirewallResponseHeaders[] — Response headers to return when the static page action is triggered.
              - …
            - `statusCode` integer, required — Status code to return when the static page action is triggered.
          - `type` string, required — Specifies the action to take when the rule matches. One of: allow, block, js, captcha, bypass, cookie, ratelimit, basic, redirect, staticPage, waf, cacheBypass, forceTLS. The 'allow' action permits the request regardless of subsequent operations. The 'cacheBypass' action bypasses caching for the request.
          - `waf` V1beta1CDNFirewallWAFAction, nullable — Uses WAF to block requests that match the rule.
            - `name` string, required — Name of the WAF rule.
        - `constraints` array[], required — List of constraints that define the conditions for the rule to match. Constraints are evaluated as a Disjunctive Normal Form (DNF) expression, members of each inner array get AND-ed and members of the outer array get OR-ed.
          - V1beta1CDNFirewallConstraint[]
            - `args` V1beta1CDNFirewallConstraintArgs, nullable — Constraint based on query parameters.
              - …
            - `asn` V1beta1CDNFirewallConstraintASN, nullable — Constraint based on the ASN.
              - …
            - `cookie` V1beta1CDNFirewallConstraintCookie, nullable — Constraint based on cookie values.
              - …
            - `country` V1beta1CDNFirewallConstraintCountry, nullable — Constraint based on the request’s country.
              - …
            - `edge` V1beta1CDNFirewallConstraintEdge, nullable — Constraint based on Edge server.
              - …
            - `header` V1beta1CDNFirewallConstraintHeader, nullable — Constraint based on HTTP headers.
              - …
            - `host` V1beta1CDNFirewallConstraintHost, nullable — Constraint based on the request host.
              - …
            - `http_version` V1beta1CDNFirewallConstraintHTTPVersion, nullable — Constraint based on the HTTP version.
              - …
            - `ip` V1beta1CDNFirewallConstraintIP, nullable — Constraint based on IP addresses.
              - …
            - `known_bots` V1beta1CDNFirewallConstraintKnownBots, nullable — Constraint targeting known bot traffic.
              - …
            - `method` V1beta1CDNFirewallConstraintMethod, nullable — Constraint based on the HTTP method.
              - …
            - `negate` boolean — Indicates whether to invert the constraint condition.
            - `path` V1beta1CDNFirewallConstraintPath, nullable — Constraint based on the request path.
              - …
            - `port` V1beta1CDNFirewallConstraintPort, nullable — Constraint based on the request port.
              - …
            - `tls` V1beta1CDNFirewallConstraintTLS, nullable — Constraint based on TLS attributes.
              - …
            - `type` string, required — Specifies the constraint type. One of: asn, cookie, country, header, ip, host, port, method, uri, path, args, http_version, tls, known_bots.
            - `uri` V1beta1CDNFirewallConstraintURI, nullable — Constraint based on the request URI.
              - …
        - `description` string — A brief description of the firewall rule.
        - `enabled` boolean — Indicates if the firewall rule is active.
        - `name` string, required — The name of the firewall rule.
    - `hostname` string — The domain name that will be served through the CDN. Can be the root domain or a subdomain.
    - `locations` V1beta1CDNLocation[] — The request paths that clients can access and that the CDN proxies to the upstream servers.
      - `action` string — The action to take when the request matches the location. One of: proxy_http (proxy the request to the upstream), proxy_grpc (proxy the request to the upstream using gRPC), redirect (redirect the request to the target URL). The 'proxy_http' action proxies the request to the upstream server. The 'proxy_grpc' action proxies the request to the upstream server using gRPC. The 'redirect' action redirects the request to the target URL.
      - `cache` V1beta1CDNLocationCache, nullable — The cache configuration for the location.
        - `browserTTL` integer — Time-to-live (TTL) in seconds for browser cache.
        - `cookieKeys` string[] — List of cookie keys to consider when caching.
        - `detectCountry` boolean — Enable country detection for country-specific caching. If enabled, the content will be cached based on the country.
        - `detectDevice` boolean — Enable device detection for device-specific caching. If enabled, the content will be cached based on the device type.
        - `edgeTTL` integer — TTL in seconds for edge cache.
        - `ignoreUpstreamTTL` boolean — Whether to ignore the cache-control settings set by the upstream server. If enabled, the TTL settings from the upstream server will not be applied.
        - `immutable` boolean — In Immutable mode, the browser does not check for updates on cached content that hasn’t expired, reducing extra requests and improving performance. However, enabling this may risk serving outdated data to users.
        - `level` string, required — Cache level for the location. Options: bypass (skip cache), standard (use standard cache), ignore-query-string (cache ignores query strings).
        - `noStaleWhileUpdating` boolean — Disables serving stale cached responses while the cache is being refreshed in the background. When false, stale content may be served during updates.
        - `nonSuccessTTL` integer — TTL in seconds for caching non-successful responses.
        - `private` boolean — Enable private caching for this location.
        - `staleTTL` integer — TTL in seconds for serving stale content while refreshing cache.
        - `ttlTimeUnit` string — Time unit for TTL values.
      - `cors` V1beta1CDNLocationCORS, nullable — The CORS configuration for the location.
        - `allowCredentials` boolean — Whether to allow credentials for the location.
        - `allowHeaders` string[] — List of headers to allow.
        - `allowMethods` string[] — List of methods to allow.
        - `allowOrigins` string[] — List of origins to allow.
        - `enabled` boolean — Whether to enable CORS for the location.
        - `exposeHeaders` string[] — List of headers to expose.
        - `maxAge` integer — Max age in seconds for the CORS policy.
      - `description` string — A brief description of the location.
      - `headers` V1beta1CDNLocationHeaders, nullable — The headers configuration for the location.
        - `downstream` V1beta1CDNLocationHeader[] — The headers to add to the downstream response. Use can prevent sending some headers by setting the value to an empty string.
          - `name` string, required — The name of the header.
          - `value` string, required — The value of the header.
        - `upstream` V1beta1CDNLocationHeader[] — The headers to add to the upstream response. Use can prevent sending some headers by setting the value to an empty string.
          - `name` string, required — The name of the header.
          - `value` string, required — The value of the header.
      - `host` string — The host to match the request.
      - `imgsvc` V1beta1CDNLocationImageService, nullable — The image service configuration for the location.
        - `defaultPreset` string — The name of the default preset for the image service.
        - `enabled` boolean, required — Whether to enable image service for the location.
        - `forcedFilter` V1beta1CDNLocationImageServiceForcedFilter, nullable — The forced filter for the image service.
          - `enabled` boolean, required
          - `filter` string
      - `path` string, required — The path to match the request.
      - `quickcdnIntegrity` string — The QuickCDN integrity for the location.
      - `redirect` V1beta1CDNLocationRedirect, nullable — The redirect configuration for the location.
        - `preserveQueryString` boolean, required — Whether to preserve the query string when redirecting the request.
        - `referrer` boolean, required — Whether to preserve the referrer header when redirecting the request.
        - `statusCode` integer, required — The status code to return when redirecting the request.
        - `target` string, required — The target URL to redirect the request to.
      - `rewrite` V1beta1CDNLocationRewrite, nullable — The rewrite configuration for the location.
        - `prefix` string — The prefix to rewrite the request. PCRE expressions are supported.
        - `replaceWith` string — The new path to replace the prefix with.
      - `secureLink` boolean — Whether to enable secure link for the location.
      - `timeout` integer — The timeout in seconds for the request.
      - `upstream` string — The upstream to proxy the request to.
    - `routingRules` V1beta1CDNRoutingRule[] — Routing rules allow you to rewrite cdn configurations based on constraints, similar to firewall. Each request will be evaluated with each one of the rules in order and the configuration (e.g upstream, cache) will be changed accordingly.
      - `actions` V1beta1CDNRoutingAction[], required — List of actions to take when the rule matches.
        - `setUpstream` V1beta1CDNSetUpstreamAction, nullable — Set the request's upstream. Note that upstream has to be defined within the same website, otherwise the action won't take effect.
          - `upstreamName` string, required — Name of the upstream.
        - `type` string, required — Name of the action. One of: setUpstream
      - `constraints` array[], required — List of constraints that define the conditions for the rule to match. Constraints are evaluated as a Disjunctive Normal Form (DNF) expression, members of each inner array get AND-ed and members of the outer array get OR-ed.
        - V1beta1CDNFirewallConstraint[]
          - `args` V1beta1CDNFirewallConstraintArgs, nullable — Constraint based on query parameters.
            - `expected` string[] — Query string values used for comparison.
            - `name` string, required — Name of the target query string.
            - `operator` string, required — Specifies the comparison operator for the query strings. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `asn` V1beta1CDNFirewallConstraintASN, nullable — Constraint based on the ASN.
            - `expected` integer[], required — ASN values used for comparison.
            - `operator` string, required — Specifies the comparison operator for ASN. One of: equals, lesser, greater.
          - `cookie` V1beta1CDNFirewallConstraintCookie, nullable — Constraint based on cookie values.
            - `expected` string[] — Cookie values used for comparison.
            - `name` string, required — Name of the target cookie.
            - `operator` string, required — Specifies the comparison operator for the cookie. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `country` V1beta1CDNFirewallConstraintCountry, nullable — Constraint based on the request’s country.
            - `expected` string[], required — Country codes used for comparison.
            - `operator` string, required — Specifies the comparison operator for the country. One of: equals.
          - `edge` V1beta1CDNFirewallConstraintEdge, nullable — Constraint based on Edge server.
            - `expected` string[], required — Edge names used for comparison.
            - `operator` string, required — Specifies the comparison operator for edge server name. One of: equals, contains, starts_with, ends_with, matches.
          - `header` V1beta1CDNFirewallConstraintHeader, nullable — Constraint based on HTTP headers.
            - `expected` string[] — Header values used for comparison.
            - `name` string, required — Name of the target header.
            - `operator` string, required — Specifies the comparison operator for the header. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `host` V1beta1CDNFirewallConstraintHost, nullable — Constraint based on the request host.
            - `expected` string[], required — Host values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the host. One of: equals, contains, starts_with, ends_with, matches.
          - `http_version` V1beta1CDNFirewallConstraintHTTPVersion, nullable — Constraint based on the HTTP version.
            - `expected` string[], required — HTTP version values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the HTTP version. One of: equals.
          - `ip` V1beta1CDNFirewallConstraintIP, nullable — Constraint based on IP addresses.
            - `expected` string[] — IP addresses used for comparison.
            - `ipSet` string — IP set name used for comparison.
            - `operator` string, required — Specifies the comparison operator for IP addresses. One of: ip_matches.
          - `known_bots` V1beta1CDNFirewallConstraintKnownBots, nullable — Constraint targeting known bot traffic.
            - `expected` boolean, required — Indicates whether the request is from a known bot.
            - `operator` string, required — Specifies the comparison operator for known bots. One of: equals.
          - `method` V1beta1CDNFirewallConstraintMethod, nullable — Constraint based on the HTTP method.
            - `expected` string[], required — Method values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the method. One of: equals.
          - `negate` boolean — Indicates whether to invert the constraint condition.
          - `path` V1beta1CDNFirewallConstraintPath, nullable — Constraint based on the request path.
            - `expected` string[], required — Path values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the path. One of: equals, contains, starts_with, ends_with, matches.
          - `port` V1beta1CDNFirewallConstraintPort, nullable — Constraint based on the request port.
            - `expected` string[], required — Port values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the port. One of: equals.
          - `tls` V1beta1CDNFirewallConstraintTLS, nullable — Constraint based on TLS attributes.
            - `expected` boolean, required — Indicates whether TLS should be enabled.
            - `operator` string, required — Specifies the comparison operator for TLS. One of: equals.
          - `type` string, required — Specifies the constraint type. One of: asn, cookie, country, header, ip, host, port, method, uri, path, args, http_version, tls, known_bots.
          - `uri` V1beta1CDNFirewallConstraintURI, nullable — Constraint based on the request URI.
            - `expected` string[], required — URI values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the URI. One of: equals, contains, starts_with, ends_with, matches.
      - `enabled` boolean — Indicates if the rule is active.
      - `name` string, required — Name of the rule.
    - `secureLink` V1beta1CDNSecureLink, nullable — The secure link configuration for the CDN.
      - `considerIP` boolean — Whether to consider the IP address when generating the secure link.
      - `expireName` string — The name of the expire query-string parameter to use for the secure link.
      - `ignorePath` boolean — Whether to ignore the path when generating the secure link.
      - `secrets` string[] — The secrets to use for the secure link. The secrets must be 16-32 characters long.
      - `tokenName` string — The name of the token query-string parameter to use for the secure link.
    - `tls` V1beta1CDNTLS, nullable — The TLS configuration for the CDN.
      - `auto` boolean — Automatically generate a TLS certificate for the CDN.
      - `clockSkewOffsetHours` integer — Hours to account for client clock skew when validating certificates. If a certificate's NotBefore date is within this offset, an older certificate may be used.
      - `crt` string, byte — TLS certificate in PEM format.
      - `disableOCSP` boolean — Disable OCSP stapling for the CDN.
      - `dnsNames` string[] — DNS names to include in the TLS certificate.
      - `enabled` boolean — Enable TLS for the CDN.
      - `forced` boolean — Force TLS; the CDN will serve only HTTPS traffic.
      - `key` string, byte — Private key in PEM format.
      - `minVersion` string — Minimum TLS version to enforce.
      - `ocsp` string, byte — OCSP response in PEM format.
      - `secretName` string — Name of the secret where the TLS certificate is stored.
      - `wildcard` boolean — Enable wildcard certificate for the CDN (e.g., *.example.com). Requires the domain to be hosted by Sotoon DNS.
    - `upstreams` V1beta1CDNUpstream[] — The origin servers behind the CDN that provide your website’s content.
      - `description` string — The description of the upstream.
      - `haRouting` V1beta1HARouting, nullable — The high-availability routing configuration for this upstream.
        - `enabled` boolean — Whether to enable high-availability routing.
        - `expiries` object — The expiries to use for the high-availability routing. Expiries are used for automatic mode and after these times, the routes will be truncated. This is just for Sotoon internal usages.
        - `expiries_unix` object — The expiries to use for the high-availability routing. Expiries are used for automatic mode and after these times, the routes will be truncated. This is just for Sotoon internal usages.
        - `manual` boolean — Whether to enable manual high-availability routing. This is just for Sotoon internal usages.
        - `routes` object — The routes to use for the high-availability routing.
      - `hc` V1beta1CDNUpstreamHealthCheck, nullable — The legacy health check configuration for the upstream.
        - `path` string, required — The path to check the health of the upstream.
      - `hc2` V1beta1CDNUpstreamHealthCheck2, nullable — The modern health check configuration for the upstream.
        - `downThreshold` integer — The number of consecutive failed health checks required to mark the server as down.
        - `http` V1beta1CDNUpstreamHealthCheckHTTP, nullable — The HTTP health check configuration.
          - `hostHeader` string — The host header to use for the health check.
          - `uri` string, required — The URI to check the health of the upstream.
        - `protocol` string — The protocol to use for the health check. One of: http, tcp.
        - `timeoutSeconds` integer — The timeout in seconds for the health check.
      - `hostHeader` string — Specifies a custom Host header to send in requests to the upstream server. If not set, the CDN uses the origin domain if defined, or otherwise (if origin is defined by IP address) the CDN’s own hostname.
      - `loadBalancer` V1beta1CDNUpstreamLoadBalancer, nullable — The load balancer configuration for the upstream.
        - `hashType` string — The hash type to use for the hash load balancing strategy. One of: ip (IP-based hashing), header (header-based hashing).
        - `headers` string[] — The headers to use for the hash load balancing strategy.
        - `strategy` string — The load balancing strategy to use. One of: wrr (weighted round-robin), hash (consistent hashing).
      - `name` string, required — The name of the upstream.
      - `passiveThreshold` integer — The passive threshold for the upstream. Servers with passive set to true will receive traffic only when the number of available upstream servers reaches or falls below the passiveThreshold value.
      - `preferredHealthCheckVersion` integer — Specifies the preferred health check version for this upstream.
      - `quickcdnIntegrity` string — The quickcdn integrity for the upstream.
      - `scheme` string — The protocol scheme used by the upstream.
      - `servers` V1beta1CDNUpstreamServer[] — The servers that make up the upstream.
        - `host` string, required — The host name or IP address of the upstream server.
        - `passive` boolean — Whether to mark the server as passive. Servers with passive set to true will receive traffic only when the number of available upstream servers reaches or falls below the passiveThreshold value.
        - `port` integer, required — The port number of the upstream server.
        - `resolvedIP` string — The resolved IP address of the upstream server. This is just for Sotoon internal usages.
        - `weight` integer, required — The weight of the upstream server used for load balancing such as weighted round-robin or consistent hashing.
      - `smartRouting` boolean — Whether to enable SEO optimizations through smart routing for the upstream.
    - `wsid` string — The workspace id of the CDN
  - `status` V1beta1CDNStatus, required — Current observed state of the CDN
    - `conditions` V1Condition[] — Conditions of the CDN resource.
      - `lastTransitionTime` string, date-time, required
      - `message` string, required
      - `observedGeneration` integer
      - `reason` string, required
      - `status` string, required
      - `type` string, required
    - `desc` string — The description of the CDN.
    - `development_mode_disable_timestamp` integer — The time when the development mode will be disabled.
    - `log_forwarders` V1beta1LogForwarder[] — The log forwarders of the CDN.
      - `constraints` array[] — The constraints of the log forwarder.
        - V1LogForwarderConstraint[]
          - `args` V1LogForwarderConstraintArgs, nullable — Constraint based on query parameters.
            - `expected` string[], required — Query string values used for comparison.
            - `name` string, required — Name of the target query string.
            - `operator` string, required — Specifies the comparison operator for the query strings. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `asn` V1LogForwarderConstraintASN, nullable — Constraint based on the ASN.
            - `expected` integer[], required — ASN values used for comparison.
            - `operator` string, required — Specifies the comparison operator for ASN. One of: equals, lesser, greater.
          - `cache_status` V1LogForwarderConstraintCacheStatus, nullable — Constraint based on the cache status of the request.
            - `expected` string[], required — Cache status values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the cache status. One of: equals.
          - `cookie` V1LogForwarderConstraintCookie, nullable — Constraint based on cookie values.
            - `expected` string[], required — Cookie values used for comparison.
            - `name` string, required — Name of the target cookie.
            - `operator` string, required — Specifies the comparison operator for the cookie. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `country` V1LogForwarderConstraintCountry, nullable — Constraint based on the request’s country.
            - `expected` string[], required — Country codes used for comparison.
            - `operator` string, required — Specifies the comparison operator for the country. One of: equals.
          - `header` V1LogForwarderConstraintHeader, nullable — Constraint based on HTTP headers.
            - `expected` string[], required — Header values used for comparison.
            - `name` string, required — Name of the target header.
            - `operator` string, required — Specifies the comparison operator for the header. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `host` V1LogForwarderConstraintHost, nullable — Constraint based on the request host.
            - `expected` string[], required — Host values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the host. One of: equals, contains, starts_with, ends_with, matches.
          - `http_version` V1LogForwarderConstraintHTTPVersion, nullable — Constraint based on the HTTP version.
            - `expected` string[], required — HTTP version values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the HTTP version. One of: equals.
          - `ip` V1LogForwarderConstraintIP, nullable — Constraint based on IP addresses.
            - `expected` string[], required — IP addresses used for comparison.
            - `operator` string, required — Specifies the comparison operator for IP addresses. One of: ip_matches.
          - `known_bots` V1LogForwarderConstraintKnownBots, nullable — Constraint targeting known bot traffic.
            - `expected` boolean, required — Indicates whether the request is from a known bot.
            - `operator` string, required — Specifies the comparison operator for known bots. One of: equals.
          - `method` V1LogForwarderConstraintMethod, nullable — Constraint based on the HTTP method.
            - `expected` string[], required — Method values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the method. One of: equals.
          - `negate` boolean — Indicates whether to invert the constraint condition.
          - `path` V1LogForwarderConstraintPath, nullable — Constraint based on the request path.
            - `expected` string[], required — Path values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the path. One of: equals, contains, starts_with, ends_with, matches.
          - `port` V1LogForwarderConstraintPort, nullable — Constraint based on the request port.
            - `expected` string[], required — Port values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the port. One of: equals.
          - `status` V1LogForwarderConstraintStatus, nullable — Constraint based on the status of the request.
            - `expected` string[], required — Status values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the status. One of: equals.
          - `tls` V1LogForwarderConstraintTLS, nullable — Constraint based on TLS attributes.
            - `expected` boolean, required — Indicates whether TLS should be enabled.
            - `operator` string, required — Specifies the comparison operator for TLS. One of: equals.
          - `type` string, required — Specifies the constraint type. One of: asn, cookie, country, header, ip, host, port, method, uri, path, args, http_version, tls, known_bots, status, upstream_status, cache_status, user_agent, upstream_address.
          - `upstream_address` V1LogForwarderConstraintUpstreamAddress, nullable — Constraint based on the upstream address of the request.
            - `expected` string[], required — Upstream address values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the upstream address. One of: ip_matches.
          - `upstream_status` V1LogForwarderConstraintUpstreamStatus, nullable — Constraint based on the status of the request from the upstream.
            - `expected` string[], required — Upstream status values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the upstream status. One of: equals.
          - `uri` V1LogForwarderConstraintURI, nullable — Constraint based on the request URI.
            - `expected` string[], required — URI values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the URI. One of: equals, contains, starts_with, ends_with, matches.
          - `user_agent` V1LogForwarderConstraintUserAgent, nullable — Constraint based on the user agent of the request.
            - `expected` string[], required — User agent values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the user agent. One of: equals, contains, starts_with, ends_with, matches.
      - `name` string, required — The name of the log forwarder.
    - `purges` V1beta1PurgeRequest[] — The purges of the CDN.
      - `hosts` string[], required — The hosts to purge.
      - `paths` string[], required — The paths to purge.
      - `timestamp` integer, required — The timestamp of the purge request.
    - `status` string, required — The status of the CDN.
    - `status_code` integer, required — The status code of the CDN.

## Response `200`

The cdn was successfully updated. 
The response contains the complete cdn details including the assigned unique identifier.

- V2CDN
  - `apiVersion` 'delivery/v2' | 'delivery/v2.1', required — Version identifier of the API schema
  - `kind` 'CDN', required — The string value 'CDN' that identifies the schema
  - `metadata` V2ObjectMeta, required — Standard resource metadata fields
    - `creationTimestamp` string, date-time, required
    - `labels` object, required — Labels are key-value pairs attached to resources for organization and categorization
    - `name` string, required — User-provided name that uniquely identifies the resource within its workspace
    - `namespace` string, required — Namespace is the namespace in which the resource exists
    - `uid` string, required — System-generated unique identifier for the resource
  - `spec` V1beta1CDNSpec, required — Desired configuration for the CDN
    - `authorizeByConfigMap` boolean — Whether to authorize the CDN by config map. This is just for Sotoon internal usage.
    - `cache` V1beta1CDNCache, nullable — The cache configuration for the CDN.
      - `version` integer, required — The version of the cache configuration.
    - `canonicalHostname` string — The canonical hostname of the CDN
    - `canonicalRedirect` V1beta1CDNCanonicalRedirect, nullable — The canonical redirect configuration for the CDN.
      - `excludedCidrBlocks` string[] — The CIDR blocks to exclude from the canonical redirect.
      - `includedCidrBlocks` string[] — The CIDR blocks to include in the canonical redirect.
      - `matchingFilters` V1beta1MatchingFilter[] — The matching filters to canonical redirect.
        - `hostSuffix` string — The host suffix to match for canonical redirect.
        - `pathParts` string[] — The parts of the path to match for canonical redirect.
      - `redirect` boolean — Whether to redirect matched filters to the canonical hostname.
      - `servers` string[] — The servers to serve the canonical redirect.
    - `customPages` V1beta1CDNCustomPage[] — The custom error pages configuration for the CDN.
      - `content` string — The content of the custom page.
      - `statusCode` integer, required — The status code to use for the custom page.
    - `defaultHostname` string — The default hostname of the CDN
    - `description` string — A brief description of the CDN.
    - `development_mode` boolean — Whether to enable development mode to disable caching mechanism for 3 hours.
    - `firewall` V1beta1CDNFirewall, nullable — The firewall field lets you enable security features by creating rules that control access for specific users. Define the rule conditions in constraints, and specify the outcome in action when a request meets those conditions.
      - `enabled` boolean — Indicates if the firewall is active.
      - `iran_access` boolean — Specifies whether access from Iran is allowed.
      - `rules` V1beta1CDNFirewallRule[] — List of firewall rules that define access conditions and actions.
        - `action` V1beta1CDNFirewallAction, nullable, required — The action to take when the rule matches.
          - `basic` V1beta1CDNFirewallBasicAction, nullable — Require basic authentication for the requests.
            - `message` string — Message to return when the basic authentication failed.
            - `password` string — Password for the basic authentication action.
            - `username` string — Username for the basic authentication action.
          - `block` V1beta1CDNFirewallBlockAction, nullable — Blocks requests that match the rule.
            - `responseHeaders` V1beta1CDNFirewallResponseHeaders[] — Response headers to return when the block action is triggered.
              - …
            - `statusCode` integer — Status code to return when the block action is triggered.
            - `template` string — Template to return when the block action is triggered.
          - `captcha` V1beta1CDNFirewallCaptchaAction, nullable — Used to differentiate humans from bots, except search engine crawlers.
            - `backend` string, required — Backend used for the captcha action.
            - `name` string — Name of the cookie which is used by browser after solving captcha challenge.
            - `recaptcha` V1beta1CDNFirewallRecaptchaBackend, nullable — Recaptcha backend used for the captcha action.
              - …
            - `salt` string — Salt used for the captcha action when computing hash.
            - `template` string — Template used for the captcha action.
            - `ttl` integer — Time to live for the captcha action in seconds.
          - `cookie` V1beta1CDNFirewallCookieAction, nullable — Checks if requests contain specific cookie.
            - `name` string — Target cookie name.
            - `salt` string — Salt value used for the cookie when computing hash.
            - `ttl` integer — Cookie time-to-live in seconds.
          - `js` V1beta1CDNFirewallJSAction, nullable — Requires users to run a script to detect bots, except search engine crawlers.
            - `name` string — Name of the cookie which is used by browser after solving JS challenge.
            - `salt` string — Salt used for the JS action when computing hash.
            - `template` string — Template used for the JS action.
            - `ttl` integer — Time to live for the JS action in seconds.
          - `ratelimit` V1beta1CDNFirewallRatelimitAction, nullable — Prevents abuse by limiting the number of requests based on identifiers like ja4, jwt, or ip.
            - `algorithm` string — Algorithm used for the ratelimit action. One of: sliding_window, token_bucket.
            - `burst` integer — Burst of requests.
            - `identifier` V1beta1CDNFirewallRatelimitIdentifier, nullable, required — Identifier used for the ratelimit action.
              - …
            - `penalty_period` integer — Period of time in seconds that the penalty is applied to when the request exceeds the rate limit.
            - `period` integer — Period of time in seconds that the rate limit is applied to.
            - `rate` integer, required — Rate of incoming requests per period that are considered allowed.
            - `responseHeaders` V1beta1CDNFirewallResponseHeaders[] — Optional response headers to return when the request exceeds the rate limit.
              - …
            - `statusCode` integer — Status code to return when the request exceeds the rate limit.
            - `template` string — Template to return when the request exceeds the rate limit.
            - `validationStatusCode` integer — Status code to return when identifying user by the ratelimit identifier failed.
            - `validationTemplate` string — Template to return when identifying user by the ratelimit identifier failed.
          - `redirect` V1beta1CDNFirewallRedirectAction, nullable — Redirects requests that match the rule to a target URL.
            - `extraHeaders` V1beta1CDNLocationHeader[] — Extra headers to add to the http redirect response.
              - …
            - `extraQueryString` V1beta1CDNFirewallQueryStringRecord[] — Extra query strings to add to the redirect URL.
              - …
            - `preservePath` boolean, required — Preserves the path in the redirect URL.
            - `preserveQueryString` boolean, required — Preserves the query string in the redirect URL.
            - `referrer` boolean, required — Preserves the referrer in the redirect URL.
            - `statusCode` integer, required — Status code to return when the redirect action is triggered.
            - `target` string, required — Target URL to redirect to.
          - `staticPage` V1beta1CDNFirewallStaticPageAction, nullable — Serves a static page when the request is blocked.
            - `content` string — Content of the static page.
            - `responseHeaders` V1beta1CDNFirewallResponseHeaders[] — Response headers to return when the static page action is triggered.
              - …
            - `statusCode` integer, required — Status code to return when the static page action is triggered.
          - `type` string, required — Specifies the action to take when the rule matches. One of: allow, block, js, captcha, bypass, cookie, ratelimit, basic, redirect, staticPage, waf, cacheBypass, forceTLS. The 'allow' action permits the request regardless of subsequent operations. The 'cacheBypass' action bypasses caching for the request.
          - `waf` V1beta1CDNFirewallWAFAction, nullable — Uses WAF to block requests that match the rule.
            - `name` string, required — Name of the WAF rule.
        - `constraints` array[], required — List of constraints that define the conditions for the rule to match. Constraints are evaluated as a Disjunctive Normal Form (DNF) expression, members of each inner array get AND-ed and members of the outer array get OR-ed.
          - V1beta1CDNFirewallConstraint[]
            - `args` V1beta1CDNFirewallConstraintArgs, nullable — Constraint based on query parameters.
              - …
            - `asn` V1beta1CDNFirewallConstraintASN, nullable — Constraint based on the ASN.
              - …
            - `cookie` V1beta1CDNFirewallConstraintCookie, nullable — Constraint based on cookie values.
              - …
            - `country` V1beta1CDNFirewallConstraintCountry, nullable — Constraint based on the request’s country.
              - …
            - `edge` V1beta1CDNFirewallConstraintEdge, nullable — Constraint based on Edge server.
              - …
            - `header` V1beta1CDNFirewallConstraintHeader, nullable — Constraint based on HTTP headers.
              - …
            - `host` V1beta1CDNFirewallConstraintHost, nullable — Constraint based on the request host.
              - …
            - `http_version` V1beta1CDNFirewallConstraintHTTPVersion, nullable — Constraint based on the HTTP version.
              - …
            - `ip` V1beta1CDNFirewallConstraintIP, nullable — Constraint based on IP addresses.
              - …
            - `known_bots` V1beta1CDNFirewallConstraintKnownBots, nullable — Constraint targeting known bot traffic.
              - …
            - `method` V1beta1CDNFirewallConstraintMethod, nullable — Constraint based on the HTTP method.
              - …
            - `negate` boolean — Indicates whether to invert the constraint condition.
            - `path` V1beta1CDNFirewallConstraintPath, nullable — Constraint based on the request path.
              - …
            - `port` V1beta1CDNFirewallConstraintPort, nullable — Constraint based on the request port.
              - …
            - `tls` V1beta1CDNFirewallConstraintTLS, nullable — Constraint based on TLS attributes.
              - …
            - `type` string, required — Specifies the constraint type. One of: asn, cookie, country, header, ip, host, port, method, uri, path, args, http_version, tls, known_bots.
            - `uri` V1beta1CDNFirewallConstraintURI, nullable — Constraint based on the request URI.
              - …
        - `description` string — A brief description of the firewall rule.
        - `enabled` boolean — Indicates if the firewall rule is active.
        - `name` string, required — The name of the firewall rule.
    - `hostname` string — The domain name that will be served through the CDN. Can be the root domain or a subdomain.
    - `locations` V1beta1CDNLocation[] — The request paths that clients can access and that the CDN proxies to the upstream servers.
      - `action` string — The action to take when the request matches the location. One of: proxy_http (proxy the request to the upstream), proxy_grpc (proxy the request to the upstream using gRPC), redirect (redirect the request to the target URL). The 'proxy_http' action proxies the request to the upstream server. The 'proxy_grpc' action proxies the request to the upstream server using gRPC. The 'redirect' action redirects the request to the target URL.
      - `cache` V1beta1CDNLocationCache, nullable — The cache configuration for the location.
        - `browserTTL` integer — Time-to-live (TTL) in seconds for browser cache.
        - `cookieKeys` string[] — List of cookie keys to consider when caching.
        - `detectCountry` boolean — Enable country detection for country-specific caching. If enabled, the content will be cached based on the country.
        - `detectDevice` boolean — Enable device detection for device-specific caching. If enabled, the content will be cached based on the device type.
        - `edgeTTL` integer — TTL in seconds for edge cache.
        - `ignoreUpstreamTTL` boolean — Whether to ignore the cache-control settings set by the upstream server. If enabled, the TTL settings from the upstream server will not be applied.
        - `immutable` boolean — In Immutable mode, the browser does not check for updates on cached content that hasn’t expired, reducing extra requests and improving performance. However, enabling this may risk serving outdated data to users.
        - `level` string, required — Cache level for the location. Options: bypass (skip cache), standard (use standard cache), ignore-query-string (cache ignores query strings).
        - `noStaleWhileUpdating` boolean — Disables serving stale cached responses while the cache is being refreshed in the background. When false, stale content may be served during updates.
        - `nonSuccessTTL` integer — TTL in seconds for caching non-successful responses.
        - `private` boolean — Enable private caching for this location.
        - `staleTTL` integer — TTL in seconds for serving stale content while refreshing cache.
        - `ttlTimeUnit` string — Time unit for TTL values.
      - `cors` V1beta1CDNLocationCORS, nullable — The CORS configuration for the location.
        - `allowCredentials` boolean — Whether to allow credentials for the location.
        - `allowHeaders` string[] — List of headers to allow.
        - `allowMethods` string[] — List of methods to allow.
        - `allowOrigins` string[] — List of origins to allow.
        - `enabled` boolean — Whether to enable CORS for the location.
        - `exposeHeaders` string[] — List of headers to expose.
        - `maxAge` integer — Max age in seconds for the CORS policy.
      - `description` string — A brief description of the location.
      - `headers` V1beta1CDNLocationHeaders, nullable — The headers configuration for the location.
        - `downstream` V1beta1CDNLocationHeader[] — The headers to add to the downstream response. Use can prevent sending some headers by setting the value to an empty string.
          - `name` string, required — The name of the header.
          - `value` string, required — The value of the header.
        - `upstream` V1beta1CDNLocationHeader[] — The headers to add to the upstream response. Use can prevent sending some headers by setting the value to an empty string.
          - `name` string, required — The name of the header.
          - `value` string, required — The value of the header.
      - `host` string — The host to match the request.
      - `imgsvc` V1beta1CDNLocationImageService, nullable — The image service configuration for the location.
        - `defaultPreset` string — The name of the default preset for the image service.
        - `enabled` boolean, required — Whether to enable image service for the location.
        - `forcedFilter` V1beta1CDNLocationImageServiceForcedFilter, nullable — The forced filter for the image service.
          - `enabled` boolean, required
          - `filter` string
      - `path` string, required — The path to match the request.
      - `quickcdnIntegrity` string — The QuickCDN integrity for the location.
      - `redirect` V1beta1CDNLocationRedirect, nullable — The redirect configuration for the location.
        - `preserveQueryString` boolean, required — Whether to preserve the query string when redirecting the request.
        - `referrer` boolean, required — Whether to preserve the referrer header when redirecting the request.
        - `statusCode` integer, required — The status code to return when redirecting the request.
        - `target` string, required — The target URL to redirect the request to.
      - `rewrite` V1beta1CDNLocationRewrite, nullable — The rewrite configuration for the location.
        - `prefix` string — The prefix to rewrite the request. PCRE expressions are supported.
        - `replaceWith` string — The new path to replace the prefix with.
      - `secureLink` boolean — Whether to enable secure link for the location.
      - `timeout` integer — The timeout in seconds for the request.
      - `upstream` string — The upstream to proxy the request to.
    - `routingRules` V1beta1CDNRoutingRule[] — Routing rules allow you to rewrite cdn configurations based on constraints, similar to firewall. Each request will be evaluated with each one of the rules in order and the configuration (e.g upstream, cache) will be changed accordingly.
      - `actions` V1beta1CDNRoutingAction[], required — List of actions to take when the rule matches.
        - `setUpstream` V1beta1CDNSetUpstreamAction, nullable — Set the request's upstream. Note that upstream has to be defined within the same website, otherwise the action won't take effect.
          - `upstreamName` string, required — Name of the upstream.
        - `type` string, required — Name of the action. One of: setUpstream
      - `constraints` array[], required — List of constraints that define the conditions for the rule to match. Constraints are evaluated as a Disjunctive Normal Form (DNF) expression, members of each inner array get AND-ed and members of the outer array get OR-ed.
        - V1beta1CDNFirewallConstraint[]
          - `args` V1beta1CDNFirewallConstraintArgs, nullable — Constraint based on query parameters.
            - `expected` string[] — Query string values used for comparison.
            - `name` string, required — Name of the target query string.
            - `operator` string, required — Specifies the comparison operator for the query strings. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `asn` V1beta1CDNFirewallConstraintASN, nullable — Constraint based on the ASN.
            - `expected` integer[], required — ASN values used for comparison.
            - `operator` string, required — Specifies the comparison operator for ASN. One of: equals, lesser, greater.
          - `cookie` V1beta1CDNFirewallConstraintCookie, nullable — Constraint based on cookie values.
            - `expected` string[] — Cookie values used for comparison.
            - `name` string, required — Name of the target cookie.
            - `operator` string, required — Specifies the comparison operator for the cookie. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `country` V1beta1CDNFirewallConstraintCountry, nullable — Constraint based on the request’s country.
            - `expected` string[], required — Country codes used for comparison.
            - `operator` string, required — Specifies the comparison operator for the country. One of: equals.
          - `edge` V1beta1CDNFirewallConstraintEdge, nullable — Constraint based on Edge server.
            - `expected` string[], required — Edge names used for comparison.
            - `operator` string, required — Specifies the comparison operator for edge server name. One of: equals, contains, starts_with, ends_with, matches.
          - `header` V1beta1CDNFirewallConstraintHeader, nullable — Constraint based on HTTP headers.
            - `expected` string[] — Header values used for comparison.
            - `name` string, required — Name of the target header.
            - `operator` string, required — Specifies the comparison operator for the header. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `host` V1beta1CDNFirewallConstraintHost, nullable — Constraint based on the request host.
            - `expected` string[], required — Host values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the host. One of: equals, contains, starts_with, ends_with, matches.
          - `http_version` V1beta1CDNFirewallConstraintHTTPVersion, nullable — Constraint based on the HTTP version.
            - `expected` string[], required — HTTP version values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the HTTP version. One of: equals.
          - `ip` V1beta1CDNFirewallConstraintIP, nullable — Constraint based on IP addresses.
            - `expected` string[] — IP addresses used for comparison.
            - `ipSet` string — IP set name used for comparison.
            - `operator` string, required — Specifies the comparison operator for IP addresses. One of: ip_matches.
          - `known_bots` V1beta1CDNFirewallConstraintKnownBots, nullable — Constraint targeting known bot traffic.
            - `expected` boolean, required — Indicates whether the request is from a known bot.
            - `operator` string, required — Specifies the comparison operator for known bots. One of: equals.
          - `method` V1beta1CDNFirewallConstraintMethod, nullable — Constraint based on the HTTP method.
            - `expected` string[], required — Method values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the method. One of: equals.
          - `negate` boolean — Indicates whether to invert the constraint condition.
          - `path` V1beta1CDNFirewallConstraintPath, nullable — Constraint based on the request path.
            - `expected` string[], required — Path values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the path. One of: equals, contains, starts_with, ends_with, matches.
          - `port` V1beta1CDNFirewallConstraintPort, nullable — Constraint based on the request port.
            - `expected` string[], required — Port values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the port. One of: equals.
          - `tls` V1beta1CDNFirewallConstraintTLS, nullable — Constraint based on TLS attributes.
            - `expected` boolean, required — Indicates whether TLS should be enabled.
            - `operator` string, required — Specifies the comparison operator for TLS. One of: equals.
          - `type` string, required — Specifies the constraint type. One of: asn, cookie, country, header, ip, host, port, method, uri, path, args, http_version, tls, known_bots.
          - `uri` V1beta1CDNFirewallConstraintURI, nullable — Constraint based on the request URI.
            - `expected` string[], required — URI values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the URI. One of: equals, contains, starts_with, ends_with, matches.
      - `enabled` boolean — Indicates if the rule is active.
      - `name` string, required — Name of the rule.
    - `secureLink` V1beta1CDNSecureLink, nullable — The secure link configuration for the CDN.
      - `considerIP` boolean — Whether to consider the IP address when generating the secure link.
      - `expireName` string — The name of the expire query-string parameter to use for the secure link.
      - `ignorePath` boolean — Whether to ignore the path when generating the secure link.
      - `secrets` string[] — The secrets to use for the secure link. The secrets must be 16-32 characters long.
      - `tokenName` string — The name of the token query-string parameter to use for the secure link.
    - `tls` V1beta1CDNTLS, nullable — The TLS configuration for the CDN.
      - `auto` boolean — Automatically generate a TLS certificate for the CDN.
      - `clockSkewOffsetHours` integer — Hours to account for client clock skew when validating certificates. If a certificate's NotBefore date is within this offset, an older certificate may be used.
      - `crt` string, byte — TLS certificate in PEM format.
      - `disableOCSP` boolean — Disable OCSP stapling for the CDN.
      - `dnsNames` string[] — DNS names to include in the TLS certificate.
      - `enabled` boolean — Enable TLS for the CDN.
      - `forced` boolean — Force TLS; the CDN will serve only HTTPS traffic.
      - `key` string, byte — Private key in PEM format.
      - `minVersion` string — Minimum TLS version to enforce.
      - `ocsp` string, byte — OCSP response in PEM format.
      - `secretName` string — Name of the secret where the TLS certificate is stored.
      - `wildcard` boolean — Enable wildcard certificate for the CDN (e.g., *.example.com). Requires the domain to be hosted by Sotoon DNS.
    - `upstreams` V1beta1CDNUpstream[] — The origin servers behind the CDN that provide your website’s content.
      - `description` string — The description of the upstream.
      - `haRouting` V1beta1HARouting, nullable — The high-availability routing configuration for this upstream.
        - `enabled` boolean — Whether to enable high-availability routing.
        - `expiries` object — The expiries to use for the high-availability routing. Expiries are used for automatic mode and after these times, the routes will be truncated. This is just for Sotoon internal usages.
        - `expiries_unix` object — The expiries to use for the high-availability routing. Expiries are used for automatic mode and after these times, the routes will be truncated. This is just for Sotoon internal usages.
        - `manual` boolean — Whether to enable manual high-availability routing. This is just for Sotoon internal usages.
        - `routes` object — The routes to use for the high-availability routing.
      - `hc` V1beta1CDNUpstreamHealthCheck, nullable — The legacy health check configuration for the upstream.
        - `path` string, required — The path to check the health of the upstream.
      - `hc2` V1beta1CDNUpstreamHealthCheck2, nullable — The modern health check configuration for the upstream.
        - `downThreshold` integer — The number of consecutive failed health checks required to mark the server as down.
        - `http` V1beta1CDNUpstreamHealthCheckHTTP, nullable — The HTTP health check configuration.
          - `hostHeader` string — The host header to use for the health check.
          - `uri` string, required — The URI to check the health of the upstream.
        - `protocol` string — The protocol to use for the health check. One of: http, tcp.
        - `timeoutSeconds` integer — The timeout in seconds for the health check.
      - `hostHeader` string — Specifies a custom Host header to send in requests to the upstream server. If not set, the CDN uses the origin domain if defined, or otherwise (if origin is defined by IP address) the CDN’s own hostname.
      - `loadBalancer` V1beta1CDNUpstreamLoadBalancer, nullable — The load balancer configuration for the upstream.
        - `hashType` string — The hash type to use for the hash load balancing strategy. One of: ip (IP-based hashing), header (header-based hashing).
        - `headers` string[] — The headers to use for the hash load balancing strategy.
        - `strategy` string — The load balancing strategy to use. One of: wrr (weighted round-robin), hash (consistent hashing).
      - `name` string, required — The name of the upstream.
      - `passiveThreshold` integer — The passive threshold for the upstream. Servers with passive set to true will receive traffic only when the number of available upstream servers reaches or falls below the passiveThreshold value.
      - `preferredHealthCheckVersion` integer — Specifies the preferred health check version for this upstream.
      - `quickcdnIntegrity` string — The quickcdn integrity for the upstream.
      - `scheme` string — The protocol scheme used by the upstream.
      - `servers` V1beta1CDNUpstreamServer[] — The servers that make up the upstream.
        - `host` string, required — The host name or IP address of the upstream server.
        - `passive` boolean — Whether to mark the server as passive. Servers with passive set to true will receive traffic only when the number of available upstream servers reaches or falls below the passiveThreshold value.
        - `port` integer, required — The port number of the upstream server.
        - `resolvedIP` string — The resolved IP address of the upstream server. This is just for Sotoon internal usages.
        - `weight` integer, required — The weight of the upstream server used for load balancing such as weighted round-robin or consistent hashing.
      - `smartRouting` boolean — Whether to enable SEO optimizations through smart routing for the upstream.
    - `wsid` string — The workspace id of the CDN
  - `status` V1beta1CDNStatus, required — Current observed state of the CDN
    - `conditions` V1Condition[] — Conditions of the CDN resource.
      - `lastTransitionTime` string, date-time, required
      - `message` string, required
      - `observedGeneration` integer
      - `reason` string, required
      - `status` string, required
      - `type` string, required
    - `desc` string — The description of the CDN.
    - `development_mode_disable_timestamp` integer — The time when the development mode will be disabled.
    - `log_forwarders` V1beta1LogForwarder[] — The log forwarders of the CDN.
      - `constraints` array[] — The constraints of the log forwarder.
        - V1LogForwarderConstraint[]
          - `args` V1LogForwarderConstraintArgs, nullable — Constraint based on query parameters.
            - `expected` string[], required — Query string values used for comparison.
            - `name` string, required — Name of the target query string.
            - `operator` string, required — Specifies the comparison operator for the query strings. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `asn` V1LogForwarderConstraintASN, nullable — Constraint based on the ASN.
            - `expected` integer[], required — ASN values used for comparison.
            - `operator` string, required — Specifies the comparison operator for ASN. One of: equals, lesser, greater.
          - `cache_status` V1LogForwarderConstraintCacheStatus, nullable — Constraint based on the cache status of the request.
            - `expected` string[], required — Cache status values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the cache status. One of: equals.
          - `cookie` V1LogForwarderConstraintCookie, nullable — Constraint based on cookie values.
            - `expected` string[], required — Cookie values used for comparison.
            - `name` string, required — Name of the target cookie.
            - `operator` string, required — Specifies the comparison operator for the cookie. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `country` V1LogForwarderConstraintCountry, nullable — Constraint based on the request’s country.
            - `expected` string[], required — Country codes used for comparison.
            - `operator` string, required — Specifies the comparison operator for the country. One of: equals.
          - `header` V1LogForwarderConstraintHeader, nullable — Constraint based on HTTP headers.
            - `expected` string[], required — Header values used for comparison.
            - `name` string, required — Name of the target header.
            - `operator` string, required — Specifies the comparison operator for the header. One of: equals, contains, starts_with, ends_with, matches, exists.
          - `host` V1LogForwarderConstraintHost, nullable — Constraint based on the request host.
            - `expected` string[], required — Host values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the host. One of: equals, contains, starts_with, ends_with, matches.
          - `http_version` V1LogForwarderConstraintHTTPVersion, nullable — Constraint based on the HTTP version.
            - `expected` string[], required — HTTP version values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the HTTP version. One of: equals.
          - `ip` V1LogForwarderConstraintIP, nullable — Constraint based on IP addresses.
            - `expected` string[], required — IP addresses used for comparison.
            - `operator` string, required — Specifies the comparison operator for IP addresses. One of: ip_matches.
          - `known_bots` V1LogForwarderConstraintKnownBots, nullable — Constraint targeting known bot traffic.
            - `expected` boolean, required — Indicates whether the request is from a known bot.
            - `operator` string, required — Specifies the comparison operator for known bots. One of: equals.
          - `method` V1LogForwarderConstraintMethod, nullable — Constraint based on the HTTP method.
            - `expected` string[], required — Method values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the method. One of: equals.
          - `negate` boolean — Indicates whether to invert the constraint condition.
          - `path` V1LogForwarderConstraintPath, nullable — Constraint based on the request path.
            - `expected` string[], required — Path values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the path. One of: equals, contains, starts_with, ends_with, matches.
          - `port` V1LogForwarderConstraintPort, nullable — Constraint based on the request port.
            - `expected` string[], required — Port values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the port. One of: equals.
          - `status` V1LogForwarderConstraintStatus, nullable — Constraint based on the status of the request.
            - `expected` string[], required — Status values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the status. One of: equals.
          - `tls` V1LogForwarderConstraintTLS, nullable — Constraint based on TLS attributes.
            - `expected` boolean, required — Indicates whether TLS should be enabled.
            - `operator` string, required — Specifies the comparison operator for TLS. One of: equals.
          - `type` string, required — Specifies the constraint type. One of: asn, cookie, country, header, ip, host, port, method, uri, path, args, http_version, tls, known_bots, status, upstream_status, cache_status, user_agent, upstream_address.
          - `upstream_address` V1LogForwarderConstraintUpstreamAddress, nullable — Constraint based on the upstream address of the request.
            - `expected` string[], required — Upstream address values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the upstream address. One of: ip_matches.
          - `upstream_status` V1LogForwarderConstraintUpstreamStatus, nullable — Constraint based on the status of the request from the upstream.
            - `expected` string[], required — Upstream status values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the upstream status. One of: equals.
          - `uri` V1LogForwarderConstraintURI, nullable — Constraint based on the request URI.
            - `expected` string[], required — URI values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the URI. One of: equals, contains, starts_with, ends_with, matches.
          - `user_agent` V1LogForwarderConstraintUserAgent, nullable — Constraint based on the user agent of the request.
            - `expected` string[], required — User agent values used for comparison.
            - `operator` string, required — Specifies the comparison operator for the user agent. One of: equals, contains, starts_with, ends_with, matches.
      - `name` string, required — The name of the log forwarder.
    - `purges` V1beta1PurgeRequest[] — The purges of the CDN.
      - `hosts` string[], required — The hosts to purge.
      - `paths` string[], required — The paths to purge.
      - `timestamp` integer, required — The timestamp of the purge request.
    - `status` string, required — The status of the CDN.
    - `status_code` integer, required — The status code of the CDN.

## Other responses

- `400` — Bad Request - invalid request payload or parameters
- `401` — Unauthorized - invalid or expired authentication token
- `403` — Forbidden - insufficient permissions

---

[API](https://skmtc.dev/sotoon/apis/sotoon-api.md) · [All operations](https://skmtc.dev/sotoon/apis/sotoon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sotoon/sotoon-api/revisions/c937cd9861c5/schema)
