> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get rules list



## OpenAPI

````yaml /api-reference/services_documented/cdn_api.yaml get /cdn/resources/{resource_id}/rules
openapi: 3.1.0
info:
  title: Gcore OpenAPI – CDN API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-15T06:37:28.230198+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: CDN service
    description: Information about the current state of the CDN service in your account.
    x-displayName: CDN service
  - name: CDN resources
    x-displayName: CDN resources
  - name: Origins
    x-displayName: Origins
  - name: Rules
    description: >-
      Rules allow to set up custom settings for certain file types or paths.

      By default, the rule inherits all options values from the related CDN
      resource.


      Each option in rule settings can be in one of the following states:

      - **Inherit** - Option is not added to the rule. Option inherits its value
      from the CDN resource settings. In this case, the option value is
      **null**.

      - **ON** - Option is added to the rule and enabled. Option values
      configured in the rule will override values from the CDN resource
      settings.

      - **OFF** - Option is added to the rule and disabled. Option will be
      turned off.
    x-displayName: Rules
  - name: Rule templates
    x-displayName: Rule templates
  - name: SSL certificates
    x-displayName: SSL certificates
  - name: Let's Encrypt certificates
    x-displayName: Let's Encrypt certificates
  - name: CA certificates
    x-displayName: CA certificates
  - name: CDN activity logs
    description: |-
      Get the history of users requests to CDN.
      It contains requests made both via the API and via the control panel.

      The following methods are not tracked in the activity logs:
      - HEAD
      - OPTIONS
    x-displayName: CDN activity logs
  - name: Log viewer
    description: >-
      Log viewer provides you with general information about CDN operation. This
      information does not contain all possible

      sets of fields and restricted by time. To receive full data, use Logs
      Uploader.
    x-displayName: Log viewer
  - name: Logs uploader
    description: >-
      Logs uploader allows you to upload logs with desired format to desired
      storages.


      Consists of three main parts:

      - **Policies** - rules that define which logs are uploaded and how they
      are uploaded.

      - **Targets** - destinations where logs are uploaded.

      - **Configs** - combinations of logs uploader policies, targets and
      resources to which they are applied.
    x-displayName: Logs uploader
  - name: Tools
    x-displayName: Tools
  - name: CDN Statistics
    description: >-
      Consumption statistics is updated in near real-time as a standard
      practice.

      However, the frequency of updates can vary, but they are typically
      available within a 24-hour period.

      Exceptions, such as maintenance periods, may delay data beyond 24 hours
      until servers resume and fill in the missing statistics.
    x-displayName: Statistics
  - name: Advanced analytics
    description: >-
      Advanced analytics allows to get statistics about unique visitors,
      traffic, and requests for countries, directories, browsers, devices, and
      operation systems for up to 90 days starting from today.


      Advanced analytics API is based on the [GraphQL
      framework](https://graphql.org/).


      Advanced analytics API has one single endpoint:

       https://api.gcore.com/cdn/advanced/v2/query

      You can pass the query parameters as a JSON object in the payload of a
      POST request to this endpoint.

      You can use curl to make requests to the Advanced analytics API.
      Alternatively, you can use a GraphQL client

      to construct queries and pass requests to the Advanced analytics API.


      You can write queries in GraphQL much like in SQL: specify the data set
      (CDN resource), the metrics

      to retrieve (such as unique visitors and traffic), and filter or group by
      dimensions (for example, a country).
    x-displayName: Advanced analytics
  - name: Origin shielding
    x-displayName: Origin shielding
  - name: IP addresses list
    x-displayName: IP addresses list
  - name: Purge history
    x-displayName: Purge history
paths:
  /cdn/resources/{resource_id}/rules:
    get:
      tags:
        - Rules
      summary: Get rules list
      operationId: get-rules-list
      parameters:
        - $ref: '#/components/parameters/resource_id'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleListResponse'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            cdn_resource_rule_list = client.cdn.cdn_resources.rules.list(
                resource_id=0,
            )
            print(cdn_resource_rule_list)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cdn\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcdnResourceRuleList, err := client.CDN.CDNResources.Rules.List(\n\t\tcontext.TODO(),\n\t\t0,\n\t\tcdn.CDNResourceRuleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", cdnResourceRuleList)\n}\n"
components:
  parameters:
    resource_id:
      in: path
      name: resource_id
      description: CDN resource ID.
      required: true
      schema:
        type: integer
    limit:
      in: query
      name: limit
      schema:
        type: integer
        minimum: 1
        maximum: 1000
      description: Maximum number of items to return in the response. Cannot exceed 1000.
    offset:
      in: query
      name: offset
      schema:
        type: integer
        minimum: 0
      description: Number of items to skip from the beginning of the list.
  schemas:
    RuleListResponse:
      oneOf:
        - title: Plain list
          type: array
          items:
            $ref: '#/components/schemas/RuleResponse'
          example:
            - id: 5
              name: My first rule
              active: true
              deleted: false
              originGroup: null
              rule: /folder/images/*.png
              ruleType: 0
              weight: 1
              originProtocol: HTTPS
              overrideOriginProtocol: HTTPS
              preset_applied: false
              primary_rule: null
        - title: Paginated list
          allOf:
            - $ref: '#/components/schemas/PaginatedResponse'
            - type: object
              properties:
                results:
                  type: array
                  items:
                    $ref: '#/components/schemas/RuleResponse'
          example:
            count: 1
            next: null
            previous: null
            results:
              - id: 5
                name: My first rule
                active: true
                deleted: false
                originGroup: null
                rule: /folder/images/*.png
                ruleType: 0
                weight: 1
                originProtocol: HTTPS
                overrideOriginProtocol: HTTPS
                preset_applied: false
                primary_rule: null
    RuleResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/components-schemas-id'
        name:
          $ref: '#/components/schemas/components-schemas-name'
        active:
          $ref: '#/components/schemas/schemas-active'
        deleted:
          $ref: '#/components/schemas/schemas-deleted'
        originGroup:
          $ref: '#/components/schemas/schemas-originGroup'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        originProtocol:
          $ref: '#/components/schemas/schemas-originProtocol'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        preset_applied:
          $ref: '#/components/schemas/schemas-preset_applied'
        primary_rule:
          $ref: '#/components/schemas/primary_rule'
        options:
          $ref: '#/components/schemas/rule_options'
          type: object
    PaginatedResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total number of items.
        next:
          type: string
          nullable: true
          description: >-
            URL to the next page of results. Null if current page is the last
            one.
        previous:
          type: string
          nullable: true
          description: >-
            URL to the previous page of results. Null if current page is the
            first one.
        results:
          type: array
          description: List of items on the current page.
      required:
        - count
        - next
        - previous
        - results
    components-schemas-id:
      type: integer
      readOnly: true
      description: Rule ID.
      example: 5
    components-schemas-name:
      type: string
      maxLength: 255
      description: Rule name.
      example: My first rule
    schemas-active:
      type: boolean
      description: |-
        Enables or disables a rule.

        Possible values:
        - **true** - Rule is active, rule settings are applied.
        - **false** - Rule is inactive, rule settings are not applied.
      example: true
    schemas-deleted:
      type: boolean
      readOnly: true
      description: |-
        Defines whether the rule has been deleted.

        Possible values:
        - **true** - Rule has been deleted.
        - **false** - Rule has not been deleted.
      example: false
    schemas-originGroup:
      type: integer
      nullable: true
      description: >-
        ID of the origin group to which the rule is applied.


        If the origin group is not specified, the rule is applied to the origin
        group that the CDN resource is associated with.
      example: null
    rule:
      type: string
      maxLength: 300
      description: >-
        Path to the file or folder for which the rule will be applied.


        The rule is applied if the requested URI matches the rule path.


        We add a leading forward slash to any rule path. Specify a path without
        a forward slash.
      example: /folder/images/*.png
    ruleType:
      type: integer
      minimum: 0
      maximum: 1
      description: >-
        Rule type.


        Possible values:

        - **Type 0** - Regular expression. Must start with '^/' or '/'.

        - **Type 1** - Regular expression. Note that for this rule type we
        automatically add / to each rule pattern before your regular expression.
        This type is **legacy**, please use Type 0.
      example: 0
    weight:
      type: integer
      minimum: 1
      maximum: 2147483647
      description: >-
        Rule execution order: from lowest (1) to highest.


        If requested URI matches multiple rules, the one higher in the order of
        the rules will be applied.
      example: 1
    schemas-originProtocol:
      type: string
      readOnly: true
      enum:
        - HTTPS
        - HTTP
        - MATCH
      description: >-
        Protocol used by CDN servers to request content from an origin source.


        Possible values:

        - **HTTPS** - CDN servers connect to origin via HTTPS protocol.

        - **HTTP** - CDN servers connect to origin via HTTP protocol.

        - **MATCH** - Connection protocol is chosen automatically; in this case,
        content on origin source should be available for the CDN both through
        HTTP and HTTPS protocols.
      example: HTTPS
    overrideOriginProtocol:
      type: string
      nullable: true
      enum:
        - HTTPS
        - HTTP
        - MATCH
      description: >-
        Sets a protocol other than the one specified in the CDN resource
        settings to connect to the origin.


        Possible values:

        - **HTTPS** - CDN servers connect to origin via HTTPS protocol.

        - **HTTP** - CDN servers connect to origin via HTTP protocol.

        - **MATCH** - Connection protocol is chosen automatically; in this case,
        content on origin source should be available for the CDN both through
        HTTP and HTTPS protocols.

        - **null** - `originProtocol` setting is inherited from the CDN resource
        settings.
    schemas-preset_applied:
      type: boolean
      readOnly: true
      description: >-
        Defines whether the rule has an applied preset.


        Possible values:

        - **true** - Rule has a preset applied.

        - **false** - Rule does not have a preset applied.


        If a preset is applied to the rule, the options included in the preset
        cannot be edited for the rule.
      example: false
    primary_rule:
      type: integer
      readOnly: true
      nullable: true
      description: >-
        ID of the rule with which the current rule is synchronized within the
        CDN resource shared cache zone feature.
      example: null
    rule_options:
      type: object
      description: |-
        List of options that can be configured for the rule.

        In case of `null` value the option is not added to the rule.
        Option inherits its value from the CDN resource settings.
      properties:
        allowedHttpMethods:
          $ref: '#/components/schemas/allowedHttpMethods'
          x-stainless-terraform-configurability: computed_optional
        brotli_compression:
          $ref: '#/components/schemas/brotli_compression'
          x-stainless-terraform-configurability: computed_optional
        browser_cache_settings:
          $ref: '#/components/schemas/browser_cache_settings'
          x-stainless-terraform-configurability: computed_optional
        cache_http_headers:
          $ref: '#/components/schemas/cache_http_headers'
          x-stainless-terraform-configurability: computed_optional
        cors:
          $ref: '#/components/schemas/cors'
        country_acl:
          $ref: '#/components/schemas/country_acl'
          x-stainless-terraform-configurability: computed_optional
        disable_cache:
          $ref: '#/components/schemas/disable_cache'
          x-stainless-terraform-configurability: computed_optional
        disable_proxy_force_ranges:
          $ref: '#/components/schemas/disable_proxy_force_ranges'
          x-stainless-terraform-configurability: computed_optional
        edge_cache_settings:
          $ref: '#/components/schemas/edge_cache_settings'
          x-stainless-terraform-configurability: computed_optional
        fastedge:
          $ref: '#/components/schemas/fastedge'
        fetch_compressed:
          $ref: '#/components/schemas/fetch_compressed'
          x-stainless-terraform-configurability: computed_optional
        follow_origin_redirect:
          $ref: '#/components/schemas/follow_origin_redirect'
          x-stainless-terraform-configurability: computed_optional
        force_return:
          $ref: '#/components/schemas/force_return'
        forward_host_header:
          $ref: '#/components/schemas/forward_host_header'
          x-stainless-terraform-configurability: computed_optional
        gzipOn:
          $ref: '#/components/schemas/gzipOn'
          x-stainless-terraform-configurability: computed_optional
        hostHeader:
          $ref: '#/components/schemas/hostHeader'
          x-stainless-terraform-configurability: computed_optional
        ignore_cookie:
          $ref: '#/components/schemas/ignore_cookie'
          x-stainless-terraform-configurability: computed_optional
        ignoreQueryString:
          $ref: '#/components/schemas/ignoreQueryString'
          x-stainless-terraform-configurability: computed_optional
        image_stack:
          $ref: '#/components/schemas/image_stack'
        ip_address_acl:
          $ref: '#/components/schemas/ip_address_acl'
          x-stainless-terraform-configurability: computed_optional
        limit_bandwidth:
          $ref: '#/components/schemas/limit_bandwidth'
          x-stainless-terraform-configurability: computed_optional
        proxy_cache_key:
          $ref: '#/components/schemas/proxy_cache_key'
          x-stainless-terraform-configurability: computed_optional
        proxy_cache_methods_set:
          $ref: '#/components/schemas/proxy_cache_methods_set'
          x-stainless-terraform-configurability: computed_optional
        proxy_connect_timeout:
          $ref: '#/components/schemas/proxy_connect_timeout'
          x-stainless-terraform-configurability: computed_optional
        proxy_read_timeout:
          $ref: '#/components/schemas/proxy_read_timeout'
          x-stainless-terraform-configurability: computed_optional
        query_params_blacklist:
          $ref: '#/components/schemas/query_params_blacklist'
          x-stainless-terraform-configurability: computed_optional
        query_params_whitelist:
          $ref: '#/components/schemas/query_params_whitelist'
          x-stainless-terraform-configurability: computed_optional
        query_string_forwarding:
          $ref: '#/components/schemas/query_string_forwarding'
          x-stainless-terraform-configurability: computed_optional
        redirect_http_to_https:
          $ref: '#/components/schemas/redirect_http_to_https'
          x-stainless-terraform-configurability: computed_optional
        redirect_https_to_http:
          $ref: '#/components/schemas/redirect_https_to_http'
          x-stainless-terraform-configurability: computed_optional
        referrer_acl:
          $ref: '#/components/schemas/referrer_acl'
          x-stainless-terraform-configurability: computed_optional
        response_headers_hiding_policy:
          $ref: '#/components/schemas/response_headers_hiding_policy'
          x-stainless-terraform-configurability: computed_optional
        rewrite:
          $ref: '#/components/schemas/rewrite'
        secure_key:
          $ref: '#/components/schemas/secure_key'
        slice:
          $ref: '#/components/schemas/slice'
          x-stainless-terraform-configurability: computed_optional
        sni:
          $ref: '#/components/schemas/sni'
        stale:
          $ref: '#/components/schemas/stale'
          x-stainless-terraform-configurability: computed_optional
        static_response_headers:
          $ref: '#/components/schemas/static_response_headers'
          x-stainless-terraform-configurability: computed_optional
        staticHeaders:
          $ref: '#/components/schemas/staticHeaders'
          x-stainless-terraform-configurability: computed_optional
        staticRequestHeaders:
          $ref: '#/components/schemas/staticRequestHeaders'
          x-stainless-terraform-configurability: computed_optional
        user_agent_acl:
          $ref: '#/components/schemas/user_agent_acl'
          x-stainless-terraform-configurability: computed_optional
        waap:
          $ref: '#/components/schemas/waap'
          x-stainless-terraform-configurability: computed_optional
        websockets:
          $ref: '#/components/schemas/websockets'
          x-stainless-terraform-configurability: computed_optional
    allowedHttpMethods:
      type: object
      nullable: true
      description: HTTP methods allowed for content requests from the CDN.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - GET
              - HEAD
              - POST
              - PUT
              - PATCH
              - DELETE
              - OPTIONS
          x-stainless-collection-type: set
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - GET
          - POST
    brotli_compression:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          description: |-
            Allows to select the content types you want to compress.

            `text/html` is a mandatory content type.
          uniqueItems: true
          items:
            type: string
            enum:
              - application/javascript
              - application/json
              - application/vnd.ms-fontobject
              - application/wasm
              - application/x-font-ttf
              - application/x-javascript
              - application/xml
              - application/xml+rss
              - image/svg+xml
              - image/x-icon
              - text/css
              - text/html
              - text/javascript
              - text/plain
              - text/xml
          x-stainless-collection-type: set
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - text/html
          - text/plain
    browser_cache_settings:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: string
          description: |-
            Set the cache expiration time to '0s' to disable caching.

            The maximum duration is any equivalent to `1y`.
          format: nginx time
          pattern: ^\d+(ms|s|m|h|d|w|M|y)?$
      required:
        - enabled
        - value
      example:
        enabled: true
        value: 3600s
    cache_http_headers:
      type: object
      nullable: true
      deprecated: true
      description: >-
        **Legacy option**. Use the `response_headers_hiding_policy` option
        instead.


        HTTP Headers that must be included in the response.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          uniqueItems: true
          items:
            type: string
            maxLength: 1024
      required:
        - enabled
        - value
      example:
        enabled: false
        value:
          - vary
          - content-length
          - last-modified
          - connection
          - accept-ranges
          - content-type
          - content-encoding
          - etag
          - cache-control
          - expires
          - keep-alive
          - server
    cors:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          items:
            type: string
          description: >-
            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"]`
          x-stainless-collection-type: set
        always:
          type: boolean
          default: false
          description: >-
            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.
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - domain.com
          - domain2.com
        always: true
    country_acl:
      type: object
      nullable: true
      description: Enables control access to content for specified countries.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        policy_type:
          type: string
          enum:
            - allow
            - deny
          description: >-
            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:
          type: array
          uniqueItems: true
          maxItems: 600
          items:
            type: string
            maxLength: 255
            format: country-code
          description: |-
            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.
          x-stainless-collection-type: set
      required:
        - enabled
        - policy_type
        - excepted_values
      example:
        enabled: true
        policy_type: allow
        excepted_values:
          - GB
          - DE
    disable_cache:
      type: object
      nullable: true
      deprecated: true
      description: |-
        **Legacy option**. Use the `edge_cache_settings` option instead.

        Allows the complete disabling of content caching.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - content caching is disabled.
            - **false** - content caching is enabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: false
    disable_proxy_force_ranges:
      type: object
      nullable: true
      description: Allows 206 responses regardless of the settings of an origin source.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    edge_cache_settings:
      type: object
      nullable: true
      description: |-
        Cache expiration time for CDN servers.

        `value` and `default` fields cannot be used simultaneously.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: string
          description: >-
            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`.
          format: nginx time
          pattern: ^\d+(ms|s|m|h|d|w|M|y)?$
        custom_values:
          type: object
          additionalProperties:
            type: string
            format: nginx time
            pattern: ^\d+(ms|s|m|h|d|w|M|y)?$
          description: >-
            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.
          format: '{status_code or any}: {nginx time}'
          x-stainless-terraform-configurability: computed_optional
        default:
          type: string
          description: >-
            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`.
          format: nginx time
          pattern: ^\d+(ms|s|m|h|d|w|M|y)?$
      required:
        - enabled
      example:
        enabled: true
        value: 43200s
        custom_values:
          '100': 43200s
    fastedge:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        on_request_headers:
          allOf:
            - $ref: '#/components/schemas/FastEdgeTriggerSettings'
            - description: >-
                Allows to configure FastEdge application that will be called to
                handle request headers as soon as CDN receives incoming HTTP
                request, **before cache**.
        on_request_body:
          allOf:
            - $ref: '#/components/schemas/FastEdgeTriggerSettings'
            - description: >-
                Allows to configure FastEdge application that will be called to
                handle request body as soon as CDN receives incoming HTTP
                request.
        on_response_headers:
          allOf:
            - $ref: '#/components/schemas/FastEdgeTriggerSettings'
            - description: >-
                Allows to configure FastEdge application that will be called to
                handle response headers before CDN sends the HTTP response.
        on_response_body:
          allOf:
            - $ref: '#/components/schemas/FastEdgeTriggerSettings'
            - description: >-
                Allows to configure FastEdge application that will be called to
                handle response body before CDN sends the HTTP response.
      required:
        - enabled
      example:
        enabled: true
        on_request_headers:
          enabled: true
          app_id: '1001'
          interrupt_on_error: true
    fetch_compressed:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: false
    follow_origin_redirect:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        codes:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: integer
            enum:
              - 301
              - 302
              - 303
              - 307
              - 308
          description: >-
            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.
          x-stainless-collection-type: set
      required:
        - enabled
        - codes
      example:
        enabled: true
        codes:
          - 302
          - 308
    force_return:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        code:
          type: integer
          minimum: 100
          maximum: 599
          description: Status code value.
        body:
          type: string
          maxLength: 255
          description: URL for redirection or text.
        time_interval:
          type: object
          nullable: true
          description: >-
            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.
          required:
            - start_time
            - end_time
          properties:
            start_time:
              type: string
              example: '06:00'
              description: >-
                Time from which a custom HTTP response code should be applied.
                Indicated in 24-hour format.
            end_time:
              type: string
              example: '18:00'
              description: >-
                Time until which a custom HTTP response code should be applied.
                Indicated in 24-hour format.
            time_zone:
              type: string
              format: timezone
              default: UTC
              example: Europe/Luxembourg
              description: Time zone used to calculate time.
      required:
        - enabled
        - code
        - body
      example:
        enabled: true
        code: 301
        body: http://example.com/redirect_address
        time_interval:
          start_time: '09:00'
          end_time: '20:00'
          time_zone: CET
    forward_host_header:
      type: object
      nullable: true
      description: >-
        Forwards the Host header from a end-user request to an origin server.


        `hostHeader` and `forward_host_header` options cannot be enabled
        simultaneously.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: false
        value: false
    gzipOn:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    hostHeader:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: string
          maxLength: 2048
          pattern: ^[a-z0-9.\-_:]*$
          description: Host Header value.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: host.com
    ignore_cookie:
      type: object
      nullable: true
      description: >-
        Defines whether the files with the Set-Cookies header are cached as one
        file or as different ones.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: >-
            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.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    ignoreQueryString:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: false
    image_stack:
      type: object
      nullable: true
      description: >-
        Transforms JPG and PNG images (for example, resize or crop) and
        automatically converts them to WebP or AVIF format.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        avif_enabled:
          type: boolean
          default: false
          description: >-
            Enables or disables automatic conversion of JPEG and PNG images to
            AVI format.
        webp_enabled:
          type: boolean
          default: false
          description: >-
            Enables or disables automatic conversion of JPEG and PNG images to
            WebP format.
        quality:
          type: integer
          maximum: 100
          minimum: 1
          default: 95
          description: >-
            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:
          type: boolean
          default: false
          description: Enables or disables compression without quality loss for PNG format.
      required:
        - enabled
      example:
        enabled: true
        avif_enabled: true
        webp_enabled: false
        quality: 80
        png_lossless: true
    ip_address_acl:
      type: object
      nullable: true
      description: >-
        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)
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        policy_type:
          type: string
          enum:
            - allow
            - deny
          description: >-
            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:
          type: array
          uniqueItems: true
          maxItems: 600
          items:
            type: string
            maxLength: 255
            format: ipv4net or ipv6net
          description: |-
            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`
          x-stainless-collection-type: set
      required:
        - enabled
        - excepted_values
        - policy_type
      example:
        enabled: true
        policy_type: deny
        excepted_values:
          - 192.168.1.100/32
    limit_bandwidth:
      type: object
      nullable: true
      description: Allows to control the download speed per connection.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        limit_type:
          type: string
          enum:
            - static
            - dynamic
          description: >-
            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:
          type: integer
          minimum: 1
          maximum: 1000000000
          description: Maximum download speed per connection.
        buffer:
          type: integer
          minimum: 0
          maximum: 1000000000
          description: Amount of downloaded data after which the user will be rate limited.
      required:
        - enabled
        - limit_type
      example:
        enabled: true
        limit_type: static
        speed: 100
        buffer: 200
    proxy_cache_key:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: string
          maxLength: 255
          description: Key for caching.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: $scheme$uri
    proxy_cache_methods_set:
      type: object
      nullable: true
      description: Caching for POST requests along with default GET and HEAD.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: false
    proxy_connect_timeout:
      type: object
      nullable: true
      description: The time limit for establishing a connection with the origin.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: string
          description: |-
            Timeout value in seconds.

            Supported range: **1s - 5s**.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: 4s
    proxy_read_timeout:
      type: object
      nullable: true
      description: >-
        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).
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: string
          description: |-
            Timeout value in seconds.

            Supported range: **1s - 30s**.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: 10s
    query_params_blacklist:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          items:
            type: string
          description: List of query parameters.
          x-stainless-collection-type: set
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - some
          - blacklisted
          - query
    query_params_whitelist:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          items:
            type: string
          description: List of query parameters.
          x-stainless-collection-type: set
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - some
          - whitelisted
          - query
    query_string_forwarding:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        forward_from_file_types:
          type: array
          items:
            type: string
          description: >-
            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.
          x-stainless-collection-type: set
        forward_to_file_types:
          type: array
          items:
            type: string
          description: >-
            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.
          x-stainless-collection-type: set
        forward_only_keys:
          type: array
          items:
            type: string
          description: >-
            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.
          x-stainless-collection-type: set
        forward_except_keys:
          type: array
          items:
            type: string
          description: >-
            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.
          x-stainless-collection-type: set
      required:
        - enabled
        - forward_from_file_types
        - forward_to_file_types
      example:
        enabled: true
        forward_from_file_types:
          - m3u8
          - mpd
        forward_to_file_types:
          - ts
          - mp4
        forward_only_keys:
          - auth_token
          - session_id
        forward_except_keys:
          - debug_info
    redirect_http_to_https:
      type: object
      nullable: true
      description: >-
        Enables redirect from HTTP to HTTPS.


        `redirect_http_to_https` and `redirect_https_to_http` options cannot be
        enabled simultaneously.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    redirect_https_to_http:
      type: object
      nullable: true
      description: >-
        Enables redirect from HTTPS to HTTP.


        `redirect_http_to_https` and `redirect_https_to_http` options cannot be
        enabled simultaneously.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: false
        value: true
    referrer_acl:
      type: object
      nullable: true
      description: Controls access to the CDN resource content for specified domain names.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        policy_type:
          type: string
          enum:
            - allow
            - deny
          description: >-
            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:
          type: array
          uniqueItems: true
          maxItems: 600
          items:
            type: string
            maxLength: 255
            format: domain or wildcard
          description: >-
            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`
          x-stainless-collection-type: set
      required:
        - enabled
        - excepted_values
        - policy_type
      example:
        enabled: true
        policy_type: deny
        excepted_values:
          - example.com
          - '*.example.net'
    response_headers_hiding_policy:
      type: object
      nullable: true
      description: Hides HTTP headers from an origin server in the CDN response.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        mode:
          type: string
          enum:
            - hide
            - show
          description: >-
            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:
          type: array
          uniqueItems: true
          maxItems: 256
          items:
            type: string
            maxLength: 128
            format: http_header
          description: >-
            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`
          x-stainless-terraform-configurability: computed_optional
          x-stainless-collection-type: set
      required:
        - enabled
        - mode
        - excepted
      example:
        enabled: true
        mode: hide
        excepted:
          - my-header
    rewrite:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        flag:
          type: string
          enum:
            - break
            - last
            - redirect
            - permanent
          default: break
          description: >-
            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:
          type: string
          maxLength: 255
          description: |-
            Path for the Rewrite option.

            Example:
            - `/(.*) /media/$1`
      required:
        - enabled
        - body
      example:
        enabled: true
        body: /(.*) /additional_path/$1
        flag: break
    secure_key:
      type: object
      nullable: true
      description: >-
        Configures access with tokenized URLs. This makes impossible to access
        content without a valid (unexpired) token.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        key:
          type: string
          nullable: true
          maxLength: 255
          description: Key generated on your side that will be used for URL signing.
        type:
          type: integer
          enum:
            - 0
            - 2
          default: 0
          description: |-
            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.
      required:
        - enabled
        - key
      example:
        enabled: true
        key: secretkey
        type: 2
    slice:
      type: object
      nullable: true
      description: >-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    sni:
      type: object
      nullable: true
      description: >-
        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`.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        sni_type:
          type: string
          enum:
            - dynamic
            - custom
          default: dynamic
          description: >-
            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:
          type: string
          maxLength: 255
          format: domain
          description: |-
            Custom SNI hostname.

            It is required if `sni_type` is set to custom.
      required:
        - custom_hostname
        - enabled
      example:
        enabled: true
        sni_type: custom
        custom_hostname: custom.example.com
    stale:
      type: object
      nullable: true
      description: Serves stale cached content in case of origin unavailability.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - error
              - http_403
              - http_404
              - http_429
              - http_500
              - http_502
              - http_503
              - http_504
              - invalid_header
              - timeout
              - updating
          description: Defines list of errors for which "Always online" option is applied.
          x-stainless-collection-type: set
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - http_404
          - http_500
    static_response_headers:
      type: object
      nullable: true
      description: Custom HTTP Headers that a CDN server adds to a response.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: array
          maxItems: 50
          items:
            type: object
            properties:
              name:
                type: string
                maxLength: 128
                pattern: ^[A-Za-z0-9]+([_\-]*[A-Za-z0-9]+)*$
                description: >-
                  HTTP Header name.


                  Restrictions:

                  - Maximum 128 symbols.

                  - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and
                  underscores only.
              value:
                type: array
                uniqueItems: true
                maxLength: 512
                items:
                  type: string
                description: >-
                  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:
                type: boolean
                default: false
                description: >-
                  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.
            required:
              - name
              - value
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          - name: X-Example
            value:
              - Value_1
            always: true
          - name: X-Example-Multiple
            value:
              - Value_1
              - Value_2
              - Value_3
            always: false
    staticHeaders:
      type: object
      nullable: true
      deprecated: true
      description: >-
        **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.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: object
          description: >-
            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 {.
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          X-Example: Value_1
          X-Example-Multiple:
            - Value_2
            - Value_3
    staticRequestHeaders:
      type: object
      nullable: true
      description: >-
        Custom HTTP Headers for a CDN server to add to request. Up to fifty
        custom HTTP Headers can be specified.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: object
          description: >-
            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 {.
          additionalProperties:
            type: string
      required:
        - enabled
        - value
      example:
        enabled: true
        value:
          Header-One: Value 1
          Header-Two: Value 2
    user_agent_acl:
      type: object
      nullable: true
      description: Controls access to the content for specified User-Agents.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        policy_type:
          type: string
          enum:
            - allow
            - deny
          description: >-
            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:
          type: array
          uniqueItems: true
          maxItems: 600
          items:
            type: string
            maxLength: 255
            format: user_agent
          description: >-
            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.
          x-stainless-collection-type: set
      required:
        - enabled
        - excepted_values
        - policy_type
      example:
        enabled: true
        policy_type: allow
        excepted_values:
          - UserAgent Value
          - ~*.*bot.*
          - ''
    waap:
      type: object
      nullable: true
      description: Allows to enable WAAP (Web Application and API Protection).
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    websockets:
      type: object
      nullable: true
      description: Enables or disables WebSockets connections to an origin server.
      properties:
        enabled:
          $ref: '#/components/schemas/parameters-enabled'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
        - enabled
        - value
      example:
        enabled: true
        value: true
    parameters-enabled:
      type: boolean
      description: |-
        Controls the option state.

        Possible values:
        - **true** - Option is enabled.
        - **false** - Option is disabled.
    FastEdgeTriggerSettings:
      type: object
      properties:
        enabled:
          type: boolean
          example: true
          default: true
          description: >-
            Determines if the FastEdge application should be called whenever
            HTTP request headers are received.
        app_id:
          type: string
          example: '1001'
          description: The ID of the application in FastEdge.
        interrupt_on_error:
          type: boolean
          default: true
          example: true
          description: >-
            Determines if the request execution should be interrupted when an
            error occurs.
        execute_on_edge:
          type: boolean
          default: true
          example: true
          description: Determines if the request should be executed at the edge nodes.
        execute_on_shield:
          type: boolean
          default: false
          example: false
          description: Determines if the request should be executed at the shield nodes.
      required:
        - app_id
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````