---
title: "Create CDN resource"
method: POST
path: "/cdn/resources"
tags: ["CDN resources"]
---

# Create CDN resource

`POST /cdn/resources`

## Request body

- CreateResource
  - `cname` string, required — Delivery domains that will be used for content delivery through a CDN. Delivery domains should be added to your DNS settings.
  - `originGroup` integer — Origin group ID with which the CDN resource is associated. Exactly one of `origin` or `originGroup` must be provided during resource creation.
  - `origin` string — IP address or domain name of the origin and the port, if custom port is used. Exactly one of `origin` or `originGroup` must be provided during resource creation.
  - `active` boolean — Enables or disables a CDN resource. Possible values: - **true** - CDN resource is active. Content is being delivered. - **false** - CDN resource is deactivated. Content is not being delivered.
  - `originProtocol` 'HTTP' | 'HTTPS' | 'MATCH' — Protocol used by CDN servers to request content from an origin source. Possible values: - **HTTPS** - CDN servers will connect to the origin via HTTPS. - **HTTP** - CDN servers will connect to the origin via HTTP. - **MATCH** - connection protocol will be chosen automatically (content on the origin source should be available for the CDN both through HTTP and HTTPS). If protocol is not specified, HTTP is used to connect to an origin server.
  - `name` string, nullable — CDN resource name.
  - `description` string — Optional comment describing the CDN resource.
  - `secondaryHostnames` string[] — Additional delivery domains (CNAMEs) that will be used to deliver content via the CDN. Up to ten additional CNAMEs are possible.
  - `sslEnabled` boolean — Defines whether the HTTPS protocol enabled for content delivery. Possible values: - **true** - HTTPS is enabled. - **false** - HTTPS is disabled.
  - `sslData` integer, nullable — ID of the SSL certificate linked to the CDN resource. Can be used only with `"sslEnabled": true`.
  - `proxy_ssl_enabled` boolean — Enables or disables SSL certificate validation of the origin server before completing any connection. Possible values: - **true** - Origin SSL certificate validation is enabled. - **false** - Origin SSL certificate validation is disabled.
  - `proxy_ssl_ca` integer, nullable — ID of the trusted CA certificate used to verify an origin. It can be used only with `"proxy_ssl_enabled": true`.
  - `proxy_ssl_data` integer, nullable — ID of the SSL certificate used to verify an origin. It can be used only with `"proxy_ssl_enabled": true`.
  - `primary_resource` integer, nullable — ID of the main CDN resource which has a shared caching zone with a reserve CDN resource. If the parameter is not empty, then the current CDN resource is the reserve. You cannot change some options, create rules, set up origin shielding, or use the reserve CDN resource for Streaming.
  - `waap_api_domain_enabled` boolean — Defines whether the associated WAAP Domain is identified as an API Domain. Possible values: - **true** - The associated WAAP Domain is designated as an API Domain. - **false** - The associated WAAP Domain is not designated as an API Domain.
  - `options` ResourceOptions — List of options that can be configured for the CDN resource. In case of `null` value the option is not added to the CDN resource. Option may inherit its value from the global account settings.
    - `allowedHttpMethods` AllowedHttpMethods, nullable — HTTP methods allowed for content requests from the CDN.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required
    - `brotli_compression` BrotliCompression, nullable — Compresses content with Brotli on the CDN side. CDN servers will request only uncompressed content from the origin. Notes: 1. CDN only supports "Brotli compression" when the "origin shielding" feature is activated. 2. If a precache server is not active for a CDN resource, no compression occurs, even if the option is enabled. 3. `brotli_compression` is not supported with `fetch_compressed` or `slice` options enabled. 4. `fetch_compressed` option in CDN resource settings overrides `brotli_compression` in rules. If you enabled `fetch_compressed` in CDN resource and want to enable `brotli_compression` in a rule, you must specify `fetch_compressed:false` in the rule.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — Allows to select the content types you want to compress. `text/html` is a mandatory content type.
    - `browser_cache_settings` BrowserCacheSettings, nullable — Cache expiration time for users browsers in seconds. Cache expiration time is applied to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308. Responses with other codes will not be cached.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, nginx time, required — Set the cache expiration time to '0s' to disable caching. The maximum duration is any equivalent to `1y`.
    - `cache_http_headers` CacheHttpHeaders, nullable — **Legacy option**. Use the `response_headers_hiding_policy` option instead. HTTP Headers that must be included in the response.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required
    - `cors` Cors, nullable — Enables or disables CORS (Cross-Origin Resource Sharing) header support. CORS header support allows the CDN to add the Access-Control-Allow-Origin header to a response to a browser.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — Value of the Access-Control-Allow-Origin header. Possible values: - **Adds * as the Access-Control-Allow-Origin header value** - Content will be uploaded for requests from any domain. `"value": ["*"]` - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the origin matches one of the listed domains** - Content will be uploaded only for requests from the domains specified in the field. `"value": ["domain.com", "second.dom.com"]` - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** - Content will be uploaded for requests from any domain, and the domain from which the request was sent will be added to the "Access-Control-Allow-Origin" header in the response. `"value": ["$http_origin"]`
      - `always` boolean — Defines whether the Access-Control-Allow-Origin header should be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response regardless of response code. - **false** - Header will only be added to responses with codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
    - `country_acl` CountryAcl, nullable — Enables control access to content for specified countries.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — Defines the type of CDN resource access policy. Possible values: - **allow** - Access is allowed for all the countries except for those specified in `excepted_values` field. - **deny** - Access is denied for all the countries except for those specified in `excepted_values` field.
      - `excepted_values` string[], required — List of countries according to ISO-3166-1. The meaning of the parameter depends on `policy_type` value: - **allow** - List of countries for which access is prohibited. - **deny** - List of countries for which access is allowed.
    - `disable_cache` DisableCache, nullable — **Legacy option**. Use the `edge_cache_settings` option instead. Allows the complete disabling of content caching.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - content caching is disabled. - **false** - content caching is enabled.
    - `disable_proxy_force_ranges` DisableProxyForceRanges, nullable — Allows 206 responses regardless of the settings of an origin source.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `edge_cache_settings` EdgeCacheSettings, nullable — Cache expiration time for CDN servers. `value` and `default` fields cannot be used simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, nginx time — Caching time. The value is applied to the following response codes: 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use `0s` to disable caching. The maximum duration is any equivalent to `1y`.
      - `custom_values` object — A MAP object representing the caching time in seconds for a response with a specific response code. These settings have a higher priority than the `value` field. - Use `any` key to specify caching time for all response codes. - Use `0s` value to disable caching for a specific response code.
      - `default` string, nginx time — Enables content caching according to the origin cache settings. The value is applied to the following response codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308, if an origin server does not have caching HTTP headers. Responses with other codes will not be cached. The maximum duration is any equivalent to `1y`.
    - `fastedge` Fastedge, nullable — Allows to configure FastEdge app to be called on different request/response phases. Note: At least one of `on_request_headers`, `on_request_body`, `on_response_headers`, or `on_response_body` must be specified.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `on_request_headers` object — Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `on_request_body` object — Allows to configure FastEdge application that will be called to handle request body as soon as CDN receives incoming HTTP request.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `on_response_headers` object — Allows to configure FastEdge application that will be called to handle response headers before CDN sends the HTTP response.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `on_response_body` object — Allows to configure FastEdge application that will be called to handle response body before CDN sends the HTTP response.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
    - `fetch_compressed` FetchCompressed, nullable — Makes the CDN request compressed content from the origin. The origin server should support compression. CDN servers will not decompress your content even if a user browser does not accept compression. Notes: 1. `fetch_compressed` is not supported with `gzipON` or `brotli_compression` or `slice` options enabled. 2. `fetch_compressed` overrides `gzipON` and `brotli_compression` in rule. If you enable it in CDN resource and want to use `gzipON` and `brotli_compression` in a rule, you have to specify `"fetch_compressed": false` in the rule.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `follow_origin_redirect` FollowOriginRedirect, nullable — Enables redirection from origin. If the origin server returns a redirect, the option allows the CDN to pull the requested content from the origin server that was returned in the redirect.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `codes` integer[], required — Redirect status code that the origin server returns. To serve up to date content to end users, you will need to purge the cache after managing the option.
    - `force_return` ForceReturn, nullable — Applies custom HTTP response codes for CDN content. The following codes are reserved by our system and cannot be specified in this option: 408, 444, 477, 494, 495, 496, 497, 499.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `code` integer, required — Status code value.
      - `body` string, required — URL for redirection or text.
      - `time_interval` object, nullable — Controls the time at which a custom HTTP response code should be applied. By default, a custom HTTP response code is applied at any time.
        - `start_time` string, required — Time from which a custom HTTP response code should be applied. Indicated in 24-hour format.
        - `end_time` string, required — Time until which a custom HTTP response code should be applied. Indicated in 24-hour format.
        - `time_zone` string, timezone — Time zone used to calculate time.
    - `forward_host_header` ForwardHostHeader, nullable — Forwards the Host header from a end-user request to an origin server. `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `grpc_passthrough` GrpcPassthrough, nullable — Enables gRPC pass-through for the CDN resource.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `gzipOn` GzipOn, nullable — Compresses content with gzip on the CDN end. CDN servers will request only uncompressed content from the origin. Notes: 1. Compression with gzip is not supported with `fetch_compressed` or `slice` options enabled. 2. `fetch_compressed` option in CDN resource settings overrides `gzipON` in rules. If you enable `fetch_compressed` in CDN resource and want to enable `gzipON` in rules, you need to specify `"fetch_compressed":false` for rules.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `hostHeader` HostHeader, nullable — Sets the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is `null`, the Host Header value is equal to first CNAME. `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Host Header value.
    - `http3_enabled` Http3Enabled, nullable — Enables HTTP/3 protocol for content delivery. `http3_enabled` option works only with `"sslEnabled": true`.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `ignore_cookie` IgnoreCookie, nullable — Defines whether the files with the Set-Cookies header are cached as one file or as different ones.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled, files with cookies are cached as one file. - **false** - Option is disabled, files with cookies are cached as different files.
    - `ignoreQueryString` IgnoreQueryString, nullable — How a file with different query strings is cached: either as one object (option is enabled) or as different objects (option is disabled.) `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `image_stack` ImageStack, nullable — Transforms JPG and PNG images (for example, resize or crop) and automatically converts them to WebP or AVIF format.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `avif_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to AVI format.
      - `webp_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to WebP format.
      - `quality` integer — Defines quality settings for JPG and PNG images. The higher the value, the better the image quality, and the larger the file size after conversion.
      - `png_lossless` boolean — Enables or disables compression without quality loss for PNG format.
    - `ip_address_acl` IpAddressAcl, nullable — Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — IP access policy type. Possible values: - **allow** - Allow access to all IPs except IPs specified in "excepted_values" field. - **deny** - Deny access to all IPs except IPs specified in "excepted_values" field.
      - `excepted_values` string[], required — List of IP addresses with a subnet mask. The meaning of the parameter depends on `policy_type` value: - **allow** - List of IP addresses for which access is prohibited. - **deny** - List of IP addresses for which access is allowed. Examples: - `192.168.3.2/32` - `2a03:d000:2980:7::8/128`
    - `limit_bandwidth` LimitBandwidth, nullable — Allows to control the download speed per connection.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `limit_type` 'static' | 'dynamic', required — Method of controlling the download speed per connection. Possible values: - **static** - Use speed and buffer fields to set the download speed limit. - **dynamic** - Use query strings **speed** and **buffer** to set the download speed limit. For example, when requesting content at the link ``` http://cdn.example.com/video.mp4?speed=50k&buffer=500k ``` the download speed will be limited to 50kB/s after 500 kB.
      - `speed` integer — Maximum download speed per connection.
      - `buffer` integer — Amount of downloaded data after which the user will be rate limited.
    - `proxy_cache_key` ProxyCacheKey, nullable — Allows you to modify your cache key. If omitted, the default value is `$request_uri`. Combine the specified variables to create a key for caching. - **$`request_uri`** - **$scheme** - **$uri** **Warning**: Enabling and changing this option can invalidate your current cache and affect the cache hit ratio. Furthermore, the "Purge by pattern" option will not work.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Key for caching.
    - `proxy_cache_methods_set` ProxyCacheMethodsSet, nullable — Caching for POST requests along with default GET and HEAD.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `proxy_connect_timeout` ProxyConnectTimeout, nullable — The time limit for establishing a connection with the origin.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Timeout value in seconds. Supported range: **1s - 5s**.
    - `proxy_read_timeout` ProxyReadTimeout, nullable — The time limit for receiving a partial response from the origin. If no response is received within this time, the connection will be closed. **Note:** When used with a WebSocket connection, this option supports values only in the range 1–20 seconds (instead of the usual 1–30 seconds).
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Timeout value in seconds. Supported range: **1s - 30s**.
    - `query_params_blacklist` QueryParamsBlacklist, nullable — Files with the specified query parameters are cached as one object, files with other parameters are cached as different objects. `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — List of query parameters.
    - `query_params_whitelist` QueryParamsWhitelist, nullable — Files with the specified query parameters are cached as different objects, files with other parameters are cached as one object. `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — List of query parameters.
    - `query_string_forwarding` QueryStringForwarding, nullable — The Query String Forwarding feature allows for the seamless transfer of parameters embedded in playlist files to the corresponding media chunk files. This functionality ensures that specific attributes, such as authentication tokens or tracking information, are consistently passed along from the playlist manifest to the individual media segments. This is particularly useful for maintaining continuity in security, analytics, and any other parameter-based operations across the entire media delivery workflow.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `forward_from_file_types` string[], required — The `forward_from_files_types` field specifies the types of playlist files from which parameters will be extracted and forwarded. This typically includes formats that list multiple media chunk references, such as HLS and DASH playlists. Parameters associated with these playlist files (like query strings or headers) will be propagated to the chunks they reference.
      - `forward_to_file_types` string[], required — The field specifies the types of media chunk files to which parameters, extracted from playlist files, will be forwarded. These refer to the actual segments of media content that are delivered to viewers. Ensuring the correct parameters are forwarded to these files is crucial for maintaining the integrity of the streaming session.
      - `forward_only_keys` string[] — The `forward_only_keys` field allows for granular control over which specific parameters are forwarded from playlist files to media chunk files. By specifying certain keys, only those parameters will be propagated, ensuring that only relevant information is passed along. This is particularly useful for security and performance optimization, as it prevents unnecessary or sensitive data from being included in requests for media chunks.
      - `forward_except_keys` string[] — The `forward_except_keys` field provides a mechanism to exclude specific parameters from being forwarded from playlist files to media chunk files. By listing certain keys in this field, you can ensure that these parameters are omitted during the forwarding process. This is particularly useful for preventing sensitive or irrelevant information from being included in requests for media chunks, thereby enhancing security and optimizing performance.
    - `redirect_http_to_https` RedirectHttpToHttps, nullable — Enables redirect from HTTP to HTTPS. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `redirect_https_to_http` RedirectHttpsToHttp, nullable — Enables redirect from HTTPS to HTTP. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `referrer_acl` ReferrerAcl, nullable — Controls access to the CDN resource content for specified domain names.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — Policy type. Possible values: - **allow** - Allow access to all domain names except the domain names specified in `excepted_values` field. - **deny** - Deny access to all domain names except the domain names specified in `excepted_values` field.
      - `excepted_values` string[], required — List of domain names or wildcard domains (without protocol: `http://` or `https://`.) The meaning of the parameter depends on `policy_type` value: - **allow** - List of domain names for which access is prohibited. - **deny** - List of IP domain names for which access is allowed. Examples: - `example.com` - `*.example.com`
    - `response_headers_hiding_policy` ResponseHeadersHidingPolicy, nullable — Hides HTTP headers from an origin server in the CDN response.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `mode` 'hide' | 'show', required — How HTTP headers are hidden from the response. Possible values: - **show** - Hide only HTTP headers listed in the `excepted` field. - **hide** - Hide all HTTP headers except headers listed in the "excepted" field.
      - `excepted` string[], required — List of HTTP headers. Parameter meaning depends on the value of the `mode` field: - **show** - List of HTTP headers to hide from response. - **hide** - List of HTTP headers to include in response. Other HTTP headers will be hidden. The following headers are required and cannot be hidden from response: - `Connection` - `Content-Length` - `Content-Type` - `Date` - `Server`
    - `rewrite` Rewrite, nullable — Changes and redirects requests from the CDN to the origin. It operates according to the [Nginx](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite) configuration.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `flag` 'break' | 'last' | 'redirect' | 'permanent' — Flag for the Rewrite option. Possible values: - **last** - Stop processing the current set of `ngx_http_rewrite_module` directives and start a search for a new location matching changed URI. - **break** - Stop processing the current set of the Rewrite option. - **redirect** - Return a temporary redirect with the 302 code; used when a replacement string does not start with `http://`, `https://`, or `$scheme`. - **permanent** - Return a permanent redirect with the 301 code.
      - `body` string, required — Path for the Rewrite option. Example: - `/(.*) /media/$1`
    - `secure_key` SecureKey, nullable — Configures access with tokenized URLs. This makes impossible to access content without a valid (unexpired) token.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `key` string, nullable, required — Key generated on your side that will be used for URL signing.
      - `type` 0 | 2 — Type of URL signing. Possible types: - **Type 0** - Includes end user IP to secure token generation. - **Type 2** - Excludes end user IP from secure token generation.
    - `slice` Slice, nullable — Requests and caches files larger than 10 MB in parts (no larger than 10 MB per part.) This reduces time to first byte. The option is based on the [Slice](https://nginx.org/en/docs/http/ngx_http_slice_module.html) module. Notes: 1. Origin must support HTTP Range requests. 2. Not supported with `gzipON`, `brotli_compression` or `fetch_compressed` options enabled.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `sni` Sni, nullable — The hostname that is added to SNI requests from CDN servers to the origin server via HTTPS. SNI is generally only required if your origin uses shared hosting or does not have a dedicated IP address. If the origin server presents multiple certificates, SNI allows the origin server to know which certificate to use for the connection. The option works only if `originProtocol` parameter is `HTTPS` or `MATCH`.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `sni_type` 'dynamic' | 'custom' — SNI (Server Name Indication) type. Possible values: - **dynamic** - SNI hostname depends on `hostHeader` and `forward_host_header` options. It has several possible combinations: - If the `hostHeader` option is enabled and specified, SNI hostname matches the Host header. - If the `forward_host_header` option is enabled and has true value, SNI hostname matches the Host header used in the request made to a CDN. - If the `hostHeader` and `forward_host_header` options are disabled, SNI hostname matches the primary CNAME. - **custom** - custom SNI hostname is in use.
      - `custom_hostname` string, domain, required — Custom SNI hostname. It is required if `sni_type` is set to custom.
    - `stale` Stale, nullable — Serves stale cached content in case of origin unavailability.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — Defines list of errors for which "Always online" option is applied.
    - `static_response_headers` StaticResponseHeaders, nullable — Custom HTTP Headers that a CDN server adds to a response.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` object[], required
        - `name` string, required — HTTP Header name. Restrictions: - Maximum 128 symbols. - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and underscores only.
        - `value` string[], required — Header value. Restrictions: - Maximum 512 symbols. - Letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). - Must start with a letter, number, asterisk or {. - Multiple values can be added.
        - `always` boolean — Defines whether the header will be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response from CDN regardless of response code. - **false** - Header will be added only to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
    - `staticHeaders` StaticHeaders, nullable — **Legacy option**. Use the `static_response_headers` option instead. Custom HTTP Headers that a CDN server adds to response. Up to fifty custom HTTP Headers can be specified. May contain a header with multiple values.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 128 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
    - `staticRequestHeaders` StaticRequestHeaders, nullable — Custom HTTP Headers for a CDN server to add to request. Up to fifty custom HTTP Headers can be specified.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 255 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
    - `tls_versions` TlsVersions, nullable — List of SSL/TLS protocol versions allowed for HTTPS connections from end users to the domain. When the option is disabled, all protocols versions are allowed.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — List of SSL/TLS protocol versions (case sensitive).
    - `use_default_le_chain` UseDefaultLeChain, nullable — Let's Encrypt certificate chain. The specified chain will be used during the next Let's Encrypt certificate issue or renewal.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Default Let's Encrypt certificate chain. This is a deprecated version, use it only for compatibilities with Android devices 7.1.1 or lower. - **false** - Alternative Let's Encrypt certificate chain.
    - `use_dns01_le_challenge` UseDns01LeChallenge, nullable — DNS-01 challenge to issue a Let's Encrypt certificate for the resource. DNS service should be activated to enable this option.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - DNS-01 challenge is used to issue Let's Encrypt certificate. - **false** - HTTP-01 challenge is used to issue Let's Encrypt certificate.
    - `use_rsa_le_cert` UseRsaLeCert, nullable — RSA Let's Encrypt certificate type for the CDN resource. The specified value will be used during the next Let's Encrypt certificate issue or renewal.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - RSA Let's Encrypt certificate. - **false** - ECDSA Let's Encrypt certificate.
    - `user_agent_acl` UserAgentAcl, nullable — Controls access to the content for specified User-Agents.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — User-Agents policy type. Possible values: - **allow** - Allow access for all User-Agents except specified in `excepted_values` field. - **deny** - Deny access for all User-Agents except specified in `excepted_values` field.
      - `excepted_values` string[], required — List of User-Agents that will be allowed/denied. The meaning of the parameter depends on `policy_type`: - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. You can provide exact User-Agent strings or regular expressions. Regular expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). Use an empty string `""` to allow/deny access when the User-Agent header is empty.
    - `waap` Waap, nullable — Allows to enable WAAP (Web Application and API Protection).
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `websockets` Websockets, nullable — Enables or disables WebSockets connections to an origin server.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.

## Response `201`

Successful.

- ResourceResponse
  - `id` integer — CDN resource ID.
  - `cname` string — Delivery domains that will be used for content delivery through a CDN. Delivery domains should be added to your DNS settings.
  - `active` boolean — Enables or disables a CDN resource. Possible values: - **true** - CDN resource is active. Content is being delivered. - **false** - CDN resource is deactivated. Content is not being delivered.
  - `enabled` boolean — Enables or disables a CDN resource change by a user. Possible values: - **true** - CDN resource is enabled and can be changed. Content can be delivered. - **false** - CDN resource is disabled and cannot be changed. Content can not be delivered.
  - `status` 'active' | 'suspended' | 'processed' | 'deleted' — CDN resource status. Possible values: - **active** - CDN resource is active. Content is available to users. - **suspended** - CDN resource is suspended. Content is not available to users. - **processed** - CDN resource has recently been created and is currently being processed. It will take about fifteen minutes to propagate it to all locations. - **deleted** - CDN resource is deleted.
  - `deleted` boolean — Defines whether CDN resource has been deleted. Possible values: - **true** - CDN resource is deleted. - **false** - CDN resource is not deleted.
  - `client` integer — ID of an account to which the CDN resource belongs.
  - `name` string, nullable — CDN resource name.
  - `description` string — Optional comment describing the CDN resource.
  - `created` string — Date of CDN resource creation.
  - `updated` string — Date of the last CDN resource update.
  - `originGroup` integer — Origin group ID with which the CDN resource is associated.
  - `originGroup_name` string — Origin group name.
  - `originProtocol` 'HTTP' | 'HTTPS' | 'MATCH' — Protocol used by CDN servers to request content from an origin source. Possible values: - **HTTPS** - CDN servers will connect to the origin via HTTPS. - **HTTP** - CDN servers will connect to the origin via HTTP. - **MATCH** - connection protocol will be chosen automatically (content on the origin source should be available for the CDN both through HTTP and HTTPS). If protocol is not specified, HTTP is used to connect to an origin server.
  - `secondaryHostnames` string[] — Additional delivery domains (CNAMEs) that will be used to deliver content via the CDN. Up to ten additional CNAMEs are possible.
  - `shielded` boolean — Defines whether origin shielding feature is enabled for the resource. Possible values: - **true** - Origin shielding is enabled. - **false** - Origin shielding is disabled.
  - `shield_dc` string, nullable — Name of the origin shielding location data center. Parameter returns **null** if origin shielding is disabled.
  - `shield_enabled` boolean — Defines whether origin shield is active and working for the CDN resource. Possible values: - **true** - Origin shield is active. - **false** - Origin shield is not active.
  - `shield_routing_map` integer, nullable — Defines whether the origin shield with a dynamic location is enabled for the CDN resource. To manage origin shielding, you must contact customer support.
  - `sslEnabled` boolean — Defines whether the HTTPS protocol enabled for content delivery. Possible values: - **true** - HTTPS is enabled. - **false** - HTTPS is disabled.
  - `sslData` integer, nullable — ID of the SSL certificate linked to the CDN resource. Can be used only with `"sslEnabled": true`.
  - `proxy_ssl_enabled` boolean — Enables or disables SSL certificate validation of the origin server before completing any connection. Possible values: - **true** - Origin SSL certificate validation is enabled. - **false** - Origin SSL certificate validation is disabled.
  - `proxy_ssl_ca` integer, nullable — ID of the trusted CA certificate used to verify an origin. It can be used only with `"proxy_ssl_enabled": true`.
  - `proxy_ssl_data` integer, nullable — ID of the SSL certificate used to verify an origin. It can be used only with `"proxy_ssl_enabled": true`.
  - `preset_applied` boolean — Defines whether the CDN resource has a preset applied. Possible values: - **true** - CDN resource has a preset applied. CDN resource options included in the preset cannot be edited. - **false** - CDN resource does not have a preset applied.
  - `vp_enabled` boolean — Defines whether the CDN resource is integrated with the Streaming Platform. Possible values: - **true** - CDN resource is configured for Streaming Platform. Changing resource settings can affect its operation. - **false** - CDN resource is not configured for Streaming Platform.
  - `full_custom_enabled` boolean — Defines whether the CDN resource has a custom configuration. Possible values: - **true** - CDN resource has a custom configuration. You cannot change resource settings, except for the SSL certificate. To change other settings, contact technical support. - **false** - CDN resource has a regular configuration. You can change CDN resource settings.
  - `can_purge_by_urls` boolean — Defines whether the CDN resource can be used for purge by URLs feature. It's available only in case the CDN resource has enabled `ignore_vary_header` option.
  - `suspend_date` string, nullable — Date when the CDN resource was suspended automatically if there is no traffic on it for 90 days. Not specified if the resource was not stopped due to lack of traffic.
  - `suspended` boolean — Defines whether the CDN resource has been automatically suspended because there was no traffic on it for 90 days. Possible values: - **true** - CDN resource is currently automatically suspended. - **false** - CDN resource is not automatically suspended. You can enable CDN resource using the `active` field. If there is no traffic on the CDN resource within seven days following activation, it will be suspended again. To avoid CDN resource suspension due to no traffic, contact technical support.
  - `primary_resource` integer, nullable — ID of the main CDN resource which has a shared caching zone with a reserve CDN resource. If the parameter is not empty, then the current CDN resource is the reserve. You cannot change some options, create rules, set up origin shielding, or use the reserve CDN resource for Streaming.
  - `is_primary` boolean, nullable — Defines whether a CDN resource has a cache zone shared with other CDN resources. Possible values: - **true** - CDN resource is main and has a shared caching zone with other CDN resources, which are called reserve. - **false** - CDN resource is reserve and it has a shared caching zone with the main CDN resource. You cannot change some options, create rules, set up origin shielding and use the reserve resource for Streaming. - **null** - CDN resource does not have a shared cache zone. The main CDN resource is specified in the `primary_resource` field. It cannot be suspended unless all related reserve CDN resources are suspended.
  - `waap_domain_id` string, nullable — The ID of the associated WAAP domain.
  - `rules` object[] — Rules configured for the CDN resource.
  - `options` ResourceOptions — List of options that can be configured for the CDN resource. In case of `null` value the option is not added to the CDN resource. Option may inherit its value from the global account settings.
    - `allowedHttpMethods` AllowedHttpMethods, nullable — HTTP methods allowed for content requests from the CDN.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required
    - `brotli_compression` BrotliCompression, nullable — Compresses content with Brotli on the CDN side. CDN servers will request only uncompressed content from the origin. Notes: 1. CDN only supports "Brotli compression" when the "origin shielding" feature is activated. 2. If a precache server is not active for a CDN resource, no compression occurs, even if the option is enabled. 3. `brotli_compression` is not supported with `fetch_compressed` or `slice` options enabled. 4. `fetch_compressed` option in CDN resource settings overrides `brotli_compression` in rules. If you enabled `fetch_compressed` in CDN resource and want to enable `brotli_compression` in a rule, you must specify `fetch_compressed:false` in the rule.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — Allows to select the content types you want to compress. `text/html` is a mandatory content type.
    - `browser_cache_settings` BrowserCacheSettings, nullable — Cache expiration time for users browsers in seconds. Cache expiration time is applied to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308. Responses with other codes will not be cached.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, nginx time, required — Set the cache expiration time to '0s' to disable caching. The maximum duration is any equivalent to `1y`.
    - `cache_http_headers` CacheHttpHeaders, nullable — **Legacy option**. Use the `response_headers_hiding_policy` option instead. HTTP Headers that must be included in the response.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required
    - `cors` Cors, nullable — Enables or disables CORS (Cross-Origin Resource Sharing) header support. CORS header support allows the CDN to add the Access-Control-Allow-Origin header to a response to a browser.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — Value of the Access-Control-Allow-Origin header. Possible values: - **Adds * as the Access-Control-Allow-Origin header value** - Content will be uploaded for requests from any domain. `"value": ["*"]` - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the origin matches one of the listed domains** - Content will be uploaded only for requests from the domains specified in the field. `"value": ["domain.com", "second.dom.com"]` - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** - Content will be uploaded for requests from any domain, and the domain from which the request was sent will be added to the "Access-Control-Allow-Origin" header in the response. `"value": ["$http_origin"]`
      - `always` boolean — Defines whether the Access-Control-Allow-Origin header should be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response regardless of response code. - **false** - Header will only be added to responses with codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
    - `country_acl` CountryAcl, nullable — Enables control access to content for specified countries.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — Defines the type of CDN resource access policy. Possible values: - **allow** - Access is allowed for all the countries except for those specified in `excepted_values` field. - **deny** - Access is denied for all the countries except for those specified in `excepted_values` field.
      - `excepted_values` string[], required — List of countries according to ISO-3166-1. The meaning of the parameter depends on `policy_type` value: - **allow** - List of countries for which access is prohibited. - **deny** - List of countries for which access is allowed.
    - `disable_cache` DisableCache, nullable — **Legacy option**. Use the `edge_cache_settings` option instead. Allows the complete disabling of content caching.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - content caching is disabled. - **false** - content caching is enabled.
    - `disable_proxy_force_ranges` DisableProxyForceRanges, nullable — Allows 206 responses regardless of the settings of an origin source.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `edge_cache_settings` EdgeCacheSettings, nullable — Cache expiration time for CDN servers. `value` and `default` fields cannot be used simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, nginx time — Caching time. The value is applied to the following response codes: 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use `0s` to disable caching. The maximum duration is any equivalent to `1y`.
      - `custom_values` object — A MAP object representing the caching time in seconds for a response with a specific response code. These settings have a higher priority than the `value` field. - Use `any` key to specify caching time for all response codes. - Use `0s` value to disable caching for a specific response code.
      - `default` string, nginx time — Enables content caching according to the origin cache settings. The value is applied to the following response codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308, if an origin server does not have caching HTTP headers. Responses with other codes will not be cached. The maximum duration is any equivalent to `1y`.
    - `fastedge` Fastedge, nullable — Allows to configure FastEdge app to be called on different request/response phases. Note: At least one of `on_request_headers`, `on_request_body`, `on_response_headers`, or `on_response_body` must be specified.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `on_request_headers` object — Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `on_request_body` object — Allows to configure FastEdge application that will be called to handle request body as soon as CDN receives incoming HTTP request.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `on_response_headers` object — Allows to configure FastEdge application that will be called to handle response headers before CDN sends the HTTP response.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `on_response_body` object — Allows to configure FastEdge application that will be called to handle response body before CDN sends the HTTP response.
        - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
        - `app_id` string, required — The ID of the application in FastEdge.
        - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
        - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
        - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
    - `fetch_compressed` FetchCompressed, nullable — Makes the CDN request compressed content from the origin. The origin server should support compression. CDN servers will not decompress your content even if a user browser does not accept compression. Notes: 1. `fetch_compressed` is not supported with `gzipON` or `brotli_compression` or `slice` options enabled. 2. `fetch_compressed` overrides `gzipON` and `brotli_compression` in rule. If you enable it in CDN resource and want to use `gzipON` and `brotli_compression` in a rule, you have to specify `"fetch_compressed": false` in the rule.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `follow_origin_redirect` FollowOriginRedirect, nullable — Enables redirection from origin. If the origin server returns a redirect, the option allows the CDN to pull the requested content from the origin server that was returned in the redirect.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `codes` integer[], required — Redirect status code that the origin server returns. To serve up to date content to end users, you will need to purge the cache after managing the option.
    - `force_return` ForceReturn, nullable — Applies custom HTTP response codes for CDN content. The following codes are reserved by our system and cannot be specified in this option: 408, 444, 477, 494, 495, 496, 497, 499.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `code` integer, required — Status code value.
      - `body` string, required — URL for redirection or text.
      - `time_interval` object, nullable — Controls the time at which a custom HTTP response code should be applied. By default, a custom HTTP response code is applied at any time.
        - `start_time` string, required — Time from which a custom HTTP response code should be applied. Indicated in 24-hour format.
        - `end_time` string, required — Time until which a custom HTTP response code should be applied. Indicated in 24-hour format.
        - `time_zone` string, timezone — Time zone used to calculate time.
    - `forward_host_header` ForwardHostHeader, nullable — Forwards the Host header from a end-user request to an origin server. `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `grpc_passthrough` GrpcPassthrough, nullable — Enables gRPC pass-through for the CDN resource.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `gzipOn` GzipOn, nullable — Compresses content with gzip on the CDN end. CDN servers will request only uncompressed content from the origin. Notes: 1. Compression with gzip is not supported with `fetch_compressed` or `slice` options enabled. 2. `fetch_compressed` option in CDN resource settings overrides `gzipON` in rules. If you enable `fetch_compressed` in CDN resource and want to enable `gzipON` in rules, you need to specify `"fetch_compressed":false` for rules.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `hostHeader` HostHeader, nullable — Sets the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is `null`, the Host Header value is equal to first CNAME. `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Host Header value.
    - `http3_enabled` Http3Enabled, nullable — Enables HTTP/3 protocol for content delivery. `http3_enabled` option works only with `"sslEnabled": true`.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `ignore_cookie` IgnoreCookie, nullable — Defines whether the files with the Set-Cookies header are cached as one file or as different ones.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled, files with cookies are cached as one file. - **false** - Option is disabled, files with cookies are cached as different files.
    - `ignoreQueryString` IgnoreQueryString, nullable — How a file with different query strings is cached: either as one object (option is enabled) or as different objects (option is disabled.) `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `image_stack` ImageStack, nullable — Transforms JPG and PNG images (for example, resize or crop) and automatically converts them to WebP or AVIF format.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `avif_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to AVI format.
      - `webp_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to WebP format.
      - `quality` integer — Defines quality settings for JPG and PNG images. The higher the value, the better the image quality, and the larger the file size after conversion.
      - `png_lossless` boolean — Enables or disables compression without quality loss for PNG format.
    - `ip_address_acl` IpAddressAcl, nullable — Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — IP access policy type. Possible values: - **allow** - Allow access to all IPs except IPs specified in "excepted_values" field. - **deny** - Deny access to all IPs except IPs specified in "excepted_values" field.
      - `excepted_values` string[], required — List of IP addresses with a subnet mask. The meaning of the parameter depends on `policy_type` value: - **allow** - List of IP addresses for which access is prohibited. - **deny** - List of IP addresses for which access is allowed. Examples: - `192.168.3.2/32` - `2a03:d000:2980:7::8/128`
    - `limit_bandwidth` LimitBandwidth, nullable — Allows to control the download speed per connection.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `limit_type` 'static' | 'dynamic', required — Method of controlling the download speed per connection. Possible values: - **static** - Use speed and buffer fields to set the download speed limit. - **dynamic** - Use query strings **speed** and **buffer** to set the download speed limit. For example, when requesting content at the link ``` http://cdn.example.com/video.mp4?speed=50k&buffer=500k ``` the download speed will be limited to 50kB/s after 500 kB.
      - `speed` integer — Maximum download speed per connection.
      - `buffer` integer — Amount of downloaded data after which the user will be rate limited.
    - `proxy_cache_key` ProxyCacheKey, nullable — Allows you to modify your cache key. If omitted, the default value is `$request_uri`. Combine the specified variables to create a key for caching. - **$`request_uri`** - **$scheme** - **$uri** **Warning**: Enabling and changing this option can invalidate your current cache and affect the cache hit ratio. Furthermore, the "Purge by pattern" option will not work.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Key for caching.
    - `proxy_cache_methods_set` ProxyCacheMethodsSet, nullable — Caching for POST requests along with default GET and HEAD.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `proxy_connect_timeout` ProxyConnectTimeout, nullable — The time limit for establishing a connection with the origin.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Timeout value in seconds. Supported range: **1s - 5s**.
    - `proxy_read_timeout` ProxyReadTimeout, nullable — The time limit for receiving a partial response from the origin. If no response is received within this time, the connection will be closed. **Note:** When used with a WebSocket connection, this option supports values only in the range 1–20 seconds (instead of the usual 1–30 seconds).
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string, required — Timeout value in seconds. Supported range: **1s - 30s**.
    - `query_params_blacklist` QueryParamsBlacklist, nullable — Files with the specified query parameters are cached as one object, files with other parameters are cached as different objects. `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — List of query parameters.
    - `query_params_whitelist` QueryParamsWhitelist, nullable — Files with the specified query parameters are cached as different objects, files with other parameters are cached as one object. `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — List of query parameters.
    - `query_string_forwarding` QueryStringForwarding, nullable — The Query String Forwarding feature allows for the seamless transfer of parameters embedded in playlist files to the corresponding media chunk files. This functionality ensures that specific attributes, such as authentication tokens or tracking information, are consistently passed along from the playlist manifest to the individual media segments. This is particularly useful for maintaining continuity in security, analytics, and any other parameter-based operations across the entire media delivery workflow.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `forward_from_file_types` string[], required — The `forward_from_files_types` field specifies the types of playlist files from which parameters will be extracted and forwarded. This typically includes formats that list multiple media chunk references, such as HLS and DASH playlists. Parameters associated with these playlist files (like query strings or headers) will be propagated to the chunks they reference.
      - `forward_to_file_types` string[], required — The field specifies the types of media chunk files to which parameters, extracted from playlist files, will be forwarded. These refer to the actual segments of media content that are delivered to viewers. Ensuring the correct parameters are forwarded to these files is crucial for maintaining the integrity of the streaming session.
      - `forward_only_keys` string[] — The `forward_only_keys` field allows for granular control over which specific parameters are forwarded from playlist files to media chunk files. By specifying certain keys, only those parameters will be propagated, ensuring that only relevant information is passed along. This is particularly useful for security and performance optimization, as it prevents unnecessary or sensitive data from being included in requests for media chunks.
      - `forward_except_keys` string[] — The `forward_except_keys` field provides a mechanism to exclude specific parameters from being forwarded from playlist files to media chunk files. By listing certain keys in this field, you can ensure that these parameters are omitted during the forwarding process. This is particularly useful for preventing sensitive or irrelevant information from being included in requests for media chunks, thereby enhancing security and optimizing performance.
    - `redirect_http_to_https` RedirectHttpToHttps, nullable — Enables redirect from HTTP to HTTPS. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `redirect_https_to_http` RedirectHttpsToHttp, nullable — Enables redirect from HTTPS to HTTP. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `referrer_acl` ReferrerAcl, nullable — Controls access to the CDN resource content for specified domain names.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — Policy type. Possible values: - **allow** - Allow access to all domain names except the domain names specified in `excepted_values` field. - **deny** - Deny access to all domain names except the domain names specified in `excepted_values` field.
      - `excepted_values` string[], required — List of domain names or wildcard domains (without protocol: `http://` or `https://`.) The meaning of the parameter depends on `policy_type` value: - **allow** - List of domain names for which access is prohibited. - **deny** - List of IP domain names for which access is allowed. Examples: - `example.com` - `*.example.com`
    - `response_headers_hiding_policy` ResponseHeadersHidingPolicy, nullable — Hides HTTP headers from an origin server in the CDN response.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `mode` 'hide' | 'show', required — How HTTP headers are hidden from the response. Possible values: - **show** - Hide only HTTP headers listed in the `excepted` field. - **hide** - Hide all HTTP headers except headers listed in the "excepted" field.
      - `excepted` string[], required — List of HTTP headers. Parameter meaning depends on the value of the `mode` field: - **show** - List of HTTP headers to hide from response. - **hide** - List of HTTP headers to include in response. Other HTTP headers will be hidden. The following headers are required and cannot be hidden from response: - `Connection` - `Content-Length` - `Content-Type` - `Date` - `Server`
    - `rewrite` Rewrite, nullable — Changes and redirects requests from the CDN to the origin. It operates according to the [Nginx](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite) configuration.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `flag` 'break' | 'last' | 'redirect' | 'permanent' — Flag for the Rewrite option. Possible values: - **last** - Stop processing the current set of `ngx_http_rewrite_module` directives and start a search for a new location matching changed URI. - **break** - Stop processing the current set of the Rewrite option. - **redirect** - Return a temporary redirect with the 302 code; used when a replacement string does not start with `http://`, `https://`, or `$scheme`. - **permanent** - Return a permanent redirect with the 301 code.
      - `body` string, required — Path for the Rewrite option. Example: - `/(.*) /media/$1`
    - `secure_key` SecureKey, nullable — Configures access with tokenized URLs. This makes impossible to access content without a valid (unexpired) token.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `key` string, nullable, required — Key generated on your side that will be used for URL signing.
      - `type` 0 | 2 — Type of URL signing. Possible types: - **Type 0** - Includes end user IP to secure token generation. - **Type 2** - Excludes end user IP from secure token generation.
    - `slice` Slice, nullable — Requests and caches files larger than 10 MB in parts (no larger than 10 MB per part.) This reduces time to first byte. The option is based on the [Slice](https://nginx.org/en/docs/http/ngx_http_slice_module.html) module. Notes: 1. Origin must support HTTP Range requests. 2. Not supported with `gzipON`, `brotli_compression` or `fetch_compressed` options enabled.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `sni` Sni, nullable — The hostname that is added to SNI requests from CDN servers to the origin server via HTTPS. SNI is generally only required if your origin uses shared hosting or does not have a dedicated IP address. If the origin server presents multiple certificates, SNI allows the origin server to know which certificate to use for the connection. The option works only if `originProtocol` parameter is `HTTPS` or `MATCH`.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `sni_type` 'dynamic' | 'custom' — SNI (Server Name Indication) type. Possible values: - **dynamic** - SNI hostname depends on `hostHeader` and `forward_host_header` options. It has several possible combinations: - If the `hostHeader` option is enabled and specified, SNI hostname matches the Host header. - If the `forward_host_header` option is enabled and has true value, SNI hostname matches the Host header used in the request made to a CDN. - If the `hostHeader` and `forward_host_header` options are disabled, SNI hostname matches the primary CNAME. - **custom** - custom SNI hostname is in use.
      - `custom_hostname` string, domain, required — Custom SNI hostname. It is required if `sni_type` is set to custom.
    - `stale` Stale, nullable — Serves stale cached content in case of origin unavailability.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — Defines list of errors for which "Always online" option is applied.
    - `static_response_headers` StaticResponseHeaders, nullable — Custom HTTP Headers that a CDN server adds to a response.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` object[], required
        - `name` string, required — HTTP Header name. Restrictions: - Maximum 128 symbols. - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and underscores only.
        - `value` string[], required — Header value. Restrictions: - Maximum 512 symbols. - Letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). - Must start with a letter, number, asterisk or {. - Multiple values can be added.
        - `always` boolean — Defines whether the header will be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response from CDN regardless of response code. - **false** - Header will be added only to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
    - `staticHeaders` StaticHeaders, nullable — **Legacy option**. Use the `static_response_headers` option instead. Custom HTTP Headers that a CDN server adds to response. Up to fifty custom HTTP Headers can be specified. May contain a header with multiple values.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 128 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
    - `staticRequestHeaders` StaticRequestHeaders, nullable — Custom HTTP Headers for a CDN server to add to request. Up to fifty custom HTTP Headers can be specified.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 255 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
    - `tls_versions` TlsVersions, nullable — List of SSL/TLS protocol versions allowed for HTTPS connections from end users to the domain. When the option is disabled, all protocols versions are allowed.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` string[], required — List of SSL/TLS protocol versions (case sensitive).
    - `use_default_le_chain` UseDefaultLeChain, nullable — Let's Encrypt certificate chain. The specified chain will be used during the next Let's Encrypt certificate issue or renewal.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Default Let's Encrypt certificate chain. This is a deprecated version, use it only for compatibilities with Android devices 7.1.1 or lower. - **false** - Alternative Let's Encrypt certificate chain.
    - `use_dns01_le_challenge` UseDns01LeChallenge, nullable — DNS-01 challenge to issue a Let's Encrypt certificate for the resource. DNS service should be activated to enable this option.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - DNS-01 challenge is used to issue Let's Encrypt certificate. - **false** - HTTP-01 challenge is used to issue Let's Encrypt certificate.
    - `use_rsa_le_cert` UseRsaLeCert, nullable — RSA Let's Encrypt certificate type for the CDN resource. The specified value will be used during the next Let's Encrypt certificate issue or renewal.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - RSA Let's Encrypt certificate. - **false** - ECDSA Let's Encrypt certificate.
    - `user_agent_acl` UserAgentAcl, nullable — Controls access to the content for specified User-Agents.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `policy_type` 'allow' | 'deny', required — User-Agents policy type. Possible values: - **allow** - Allow access for all User-Agents except specified in `excepted_values` field. - **deny** - Deny access for all User-Agents except specified in `excepted_values` field.
      - `excepted_values` string[], required — List of User-Agents that will be allowed/denied. The meaning of the parameter depends on `policy_type`: - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. You can provide exact User-Agent strings or regular expressions. Regular expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). Use an empty string `""` to allow/deny access when the User-Agent header is empty.
    - `waap` Waap, nullable — Allows to enable WAAP (Web Application and API Protection).
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
    - `websockets` Websockets, nullable — Enables or disables WebSockets connections to an origin server.
      - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.

## Other responses

- `400` — Failed to create the CDN resource.

---

[API](https://skmtc.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/versions/09e652815095/schema)
