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: e8ce2320eb58
servers:
- url: https://api.gcore.com
tags:
- name: CDN service
  description: Information about the current state of the CDN service in your account.
- name: CDN resources
- name: 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.
- name: Rule templates
- name: Presets
  description: |-
    A preset is a predefined set of CDN resource or rule settings that can be applied to an object in a single request.

    Once a preset is applied to an object, the options included in the preset cannot be edited on that object until the preset is unapplied.
- name: SSL certificates
- name: Let's Encrypt certificates
- name: CA certificates
- name: Aliases
  description: |-
    An alias is a hostname you own that is served with the settings of one of your CDN resources and with
    its own SSL certificate. Aliases must be enabled for your account.
- 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
- 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.
- 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.
- name: Tools
- name: 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.
- 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).
- name: Origin shielding
- name: IP addresses list
- name: Purge history
paths:
  /cdn/public-ip-list:
    get:
      operationId: get-cdn-servers-ip-addresses
      tags:
      - IP addresses list
      summary: Get CDN servers IP addresses
      description: |-
        Get all IP addresses of CDN servers that can be used to pull content from your origin.

        This list is updated periodically. If you want to use IP from this list to configure IP ACL in your origin, you need to independently monitor its relevance.
        We recommend using a script to automatically update IP ACL.

        This request does not require authorization.
      parameters:
      - $ref: '#/components/parameters/format'
      - $ref: '#/components/parameters/accept'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPublicIPList'
            text/plain:
              schema:
                type: string
                description: Plain text list of IP addresses, one per line.
              example: |
                198.51.100.10/32
                2001:db8::8/128
      security: []
      x-codeSamples:
      - lang: Python
        source: |-
          from gcore import Gcore

          client = Gcore()
          public_ip_list = client.cdn.ips.list()
          print(public_ip_list.addresses)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	publicIPList, err := client.CDN.IPs.List(context.TODO(), cdn.IPListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", publicIPList.Addresses)
          }
  /cdn/public-net-list:
    get:
      operationId: get-cdn-servers-networks
      tags:
      - IP addresses list
      summary: Get CDN servers networks
      description: |-
        Get all CDN networks that can be used to pull content from your origin.

        This list is updated periodically. If you want to use network from this list to configure IP ACL on your origin, you need to independently monitor its relevance.
        We recommend using a script for automatically update IP ACL.

        This request does not require authorization.
      parameters:
      - $ref: '#/components/parameters/format'
      - $ref: '#/components/parameters/accept'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPublicNetworkList'
            text/plain:
              schema:
                type: string
                description: Plain text list of networks, one per line.
              example: |
                203.0.113.0/24
                2001:db8:1::/112
      security: []
      x-codeSamples:
      - lang: Python
        source: |-
          from gcore import Gcore

          client = Gcore()
          public_network_list = client.cdn.ip_ranges.list()
          print(public_network_list.addresses)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	publicNetworkList, err := client.CDN.IPRanges.List(context.TODO(), cdn.IPRangeListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", publicNetworkList.Addresses)
          }
  /cdn/clients/me:
    get:
      operationId: get-cdn-service-details
      tags:
      - CDN service
      summary: Get CDN service details
      description: Get information about CDN service.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CDNServiceResponse'
      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_account = client.cdn.get_account_overview()
          print(cdn_account.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnAccount, err := client.CDN.GetAccountOverview(context.TODO())
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnAccount.ID)
          }
    put:
      operationId: change-cdn-service
      tags:
      - CDN service
      summary: Change CDN service
      description: Change information about CDN service.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeCDNService'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CDNServiceResponse'
        '400':
          description: Invalid value of "utilization_level" parameter is provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UtilizationLevelCDNServiceError'
    patch:
      operationId: patch-cdn-service
      tags:
      - CDN service
      summary: Change CDN service
      description: Change information about CDN service.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeCDNService'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CDNServiceResponse'
        '400':
          description: Invalid value of "utilization_level" parameter is provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UtilizationLevelCDNServiceError'
      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_account = client.cdn.update_account()
          print(cdn_account.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnAccount, err := client.CDN.UpdateAccount(context.TODO(), cdn.CDNUpdateAccountParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnAccount.ID)
          }
  /cdn/clients/me/features:
    get:
      operationId: get-cdn-features-details
      tags:
      - CDN service
      summary: Get CDN features details
      description: Get information about available CDN features.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientsMeFeaturesResponse'
      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_available_features = client.cdn.get_available_features()
          print(cdn_available_features.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnAvailableFeatures, err := client.CDN.GetAvailableFeatures(context.TODO())
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnAvailableFeatures.ID)
          }
  /cdn/clients/me/limits:
    get:
      operationId: get-cdn-limits-details
      tags:
      - CDN service
      summary: Get CDN limits details
      description: Get information about CDN service limits.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientsMeLimitsResponse'
      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_account_limits = client.cdn.get_account_limits()
          print(cdn_account_limits.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnAccountLimits, err := client.CDN.GetAccountLimits(context.TODO())
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnAccountLimits.ID)
          }
  /cdn/origin_groups:
    get:
      operationId: get-origin-groups-list
      tags:
      - Origins
      summary: Get origin groups list
      description: Get all origin groups and related origin sources.
      parameters:
      - in: query
        name: name
        schema:
          type: string
        description: Origin group name.
      - in: query
        name: sources
        schema:
          type: string
        description: Origin sources (IP addresses or domains) in the origin group.
      - in: query
        name: has_related_resources
        schema:
          type: boolean
        description: |-
          Defines whether the origin group has related CDN resources.

          Possible values:
          - **true** – Origin group has related CDN resources.
          - **false** – Origin group does not have related CDN resources.
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsListResponse'
        '403':
          $ref: '#/components/responses/NoPermissions'
      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
          )
          page = client.cdn.origin_groups.list()
          page = page.results[0]
          print(page)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.OriginGroups.List(context.TODO(), cdn.OriginGroupListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-origin-group
      description: Create an origin group with one or more origin sources.
      tags:
      - Origins
      summary: Create origin group
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOriginGroup'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsResponse'
        '400':
          description: Failed to create the origin group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOriginGroupValidationError'
        '403':
          description: Forbidden to create the origin group.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/NoPermissionsWithExample'
                - $ref: '#/components/schemas/LimitsForCreationOriginsGroup'
      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
          )
          origin_groups = client.cdn.origin_groups.create(
              name="YourOriginGroup",
              sources=[{
                  "source": "origin.example.com"
              }],
          )
          print(origin_groups)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	originGroups, err := client.CDN.OriginGroups.New(context.TODO(), cdn.OriginGroupNewParams{
          		OfNoneAuth: &cdn.OriginGroupNewParamsBodyNoneAuth{
          			Name: "YourOriginGroup",
          			Sources: []cdn.OriginGroupNewParamsBodyNoneAuthSourceUnion{{
          				OfHostSource: &cdn.OriginGroupNewParamsBodyNoneAuthSourceHostSource{
          					Source: "origin.example.com",
          				},
          			}},
          		},
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", originGroups)
          }
  /cdn/origin_groups/{origin_group_id}:
    get:
      operationId: get-origin-group-details
      tags:
      - Origins
      summary: Get origin group details
      parameters:
      - in: path
        name: origin_group_id
        description: Origin group ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsResponse'
        '403':
          $ref: '#/components/responses/NoPermissions'
        '404':
          $ref: '#/components/responses/OriginGroupNotFound'
      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
          )
          origin_groups = client.cdn.origin_groups.get(
              0,
          )
          print(origin_groups)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	originGroups, err := client.CDN.OriginGroups.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", originGroups)
          }
    put:
      operationId: change-origin-group
      tags:
      - Origins
      summary: Change origin group
      parameters:
      - in: path
        name: origin_group_id
        description: Origin group ID.
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeOriginGroupPut'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsResponse'
        '400':
          description: Failed to change the origin group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeOriginGroupPutValidationError'
        '403':
          $ref: '#/components/responses/NoPermissions'
        '404':
          $ref: '#/components/responses/OriginGroupNotFound'
      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
          )
          origin_groups = client.cdn.origin_groups.replace(
              origin_group_id=0,
              name="YourOriginGroup",
              sources=[{
                  "source": "origin.example.org"
              }],
              use_next=True,
          )
          print(origin_groups)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	originGroups, err := client.CDN.OriginGroups.Replace(
          		context.TODO(),
          		0,
          		cdn.OriginGroupReplaceParams{
          			OfNoneAuth: &cdn.OriginGroupReplaceParamsBodyNoneAuth{
          				Name: "YourOriginGroup",
          				Sources: []cdn.OriginGroupReplaceParamsBodyNoneAuthSourceUnion{{
          					OfHostSource: &cdn.OriginGroupReplaceParamsBodyNoneAuthSourceHostSource{
          						Source: "origin.example.org",
          					},
          				}},
          				UseNext: true,
          			},
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", originGroups)
          }
    patch:
      operationId: patch-origin-group
      tags:
      - Origins
      summary: Change origin group
      parameters:
      - in: path
        name: origin_group_id
        description: Origin group ID.
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeOriginGroup'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsResponse'
        '400':
          description: Failed to change the origin group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeOriginGroupValidationError'
        '403':
          $ref: '#/components/responses/NoPermissions'
        '404':
          $ref: '#/components/responses/OriginGroupNotFound'
      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
          )
          origin_groups = client.cdn.origin_groups.update(
              origin_group_id=0,
              name="YourOriginGroup",
          )
          print(origin_groups)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	originGroups, err := client.CDN.OriginGroups.Update(
          		context.TODO(),
          		0,
          		cdn.OriginGroupUpdateParams{
          			OfNoneAuth: &cdn.OriginGroupUpdateParamsBodyNoneAuth{
          				Name: "YourOriginGroup",
          			},
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", originGroups)
          }
    delete:
      operationId: delete-origin-group
      tags:
      - Origins
      summary: Delete origin group
      parameters:
      - in: path
        name: origin_group_id
        description: Origin group ID.
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successful.
        '400':
          description: Failed to delete the origin group.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/OriginGroupIsUsedByResourceError'
                - $ref: '#/components/schemas/OriginGroupIsUsedByRulesError'
        '403':
          $ref: '#/components/responses/NoPermissions'
        '404':
          $ref: '#/components/responses/OriginGroupNotFound'
      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
          )
          client.cdn.origin_groups.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.OriginGroups.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/resources:
    get:
      operationId: get-cdn-resources-list
      tags:
      - CDN resources
      summary: Get CDN resources list
      description: Get information about all CDN resources in your account.
      parameters:
      - $ref: '#/components/parameters/deleted'
      - $ref: '#/components/parameters/enabled'
      - $ref: '#/components/parameters/originGroup'
      - $ref: '#/components/parameters/originGroup__in'
      - $ref: '#/components/parameters/sslEnabled'
      - $ref: '#/components/parameters/sslData'
      - $ref: '#/components/parameters/sslData_in'
      - $ref: '#/components/parameters/min_created'
      - $ref: '#/components/parameters/max_created'
      - $ref: '#/components/parameters/cname'
      - $ref: '#/components/parameters/secondaryHostnames'
      - $ref: '#/components/parameters/vp_enabled'
      - $ref: '#/components/parameters/rules'
      - $ref: '#/components/parameters/shielded'
      - $ref: '#/components/parameters/shield_dc'
      - $ref: '#/components/parameters/suspend'
      - $ref: '#/components/parameters/status'
      - $ref: '#/components/parameters/active'
      - $ref: '#/components/parameters/name'
      - $ref: '#/components/parameters/originProtocol'
      - $ref: '#/components/parameters/suspended'
      - $ref: '#/components/parameters/is_primary'
      - $ref: '#/components/parameters/waap_domain_id__isnull'
      - $ref: '#/components/parameters/min_updated'
      - $ref: '#/components/parameters/max_updated'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceListResponse'
      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
          )
          page = client.cdn.cdn_resources.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.CDNResources.List(context.TODO(), cdn.CDNResourceListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-cdn-resource
      tags:
      - CDN resources
      summary: Create CDN resource
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResource'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceResponse'
        '400':
          description: Failed to create the CDN resource.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CnameAlreadyExistsError'
                - $ref: '#/components/schemas/SecondaryCnameAlreadyExistsError'
                - $ref: '#/components/schemas/JSONParseError'
                - $ref: '#/components/schemas/CommonValidationError'
      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 = client.cdn.cdn_resources.create(
              cname="cdn.example.com",
          )
          print(cdn_resource.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResource, err := client.CDN.CDNResources.New(context.TODO(), cdn.CDNResourceNewParams{
          		Cname: "cdn.example.com",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResource.ID)
          }
  /cdn/resources/{resource_id}:
    get:
      operationId: get-cdn-resource-details
      tags:
      - CDN resources
      summary: Get CDN resource details
      parameters:
      - $ref: '#/components/parameters/resource_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceResponse'
        '404':
          description: CDN resource is not found.
      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 = client.cdn.cdn_resources.get(
              0,
          )
          print(cdn_resource.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResource, err := client.CDN.CDNResources.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResource.ID)
          }
    put:
      operationId: change-cdn-resource
      tags:
      - CDN resources
      summary: Change CDN resource
      parameters:
      - $ref: '#/components/parameters/resource_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeResource'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceResponse'
        '400':
          description: Failed to change the CDN resource.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CannotLinkYourSSLCertificate'
        '404':
          description: CDN resource is not found.
      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 = client.cdn.cdn_resources.replace(
              resource_id=0,
              origin_group=132,
          )
          print(cdn_resource.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResource, err := client.CDN.CDNResources.Replace(
          		context.TODO(),
          		0,
          		cdn.CDNResourceReplaceParams{
          			OriginGroup: 132,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResource.ID)
          }
    patch:
      operationId: patch-cdn-resource
      tags:
      - CDN resources
      summary: Change CDN resource
      parameters:
      - $ref: '#/components/parameters/resource_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchResource'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceResponse'
        '404':
          description: CDN resource is not found.
      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 = client.cdn.cdn_resources.update(
              resource_id=0,
          )
          print(cdn_resource.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResource, err := client.CDN.CDNResources.Update(
          		context.TODO(),
          		0,
          		cdn.CDNResourceUpdateParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResource.ID)
          }
    delete:
      operationId: delete-cdn-resource
      tags:
      - CDN resources
      summary: Delete CDN resource
      description: |-
        Delete the CDN resource from the system permanently.

        Notes:
        - **Deactivation Requirement**: Set the `active` attribute to `false` before deletion.
        - **Statistics Availability**: Statistics will be available for **365 days** after deletion through the [statistics endpoints](/api-reference/cdn/cdn-statistics/cdn-resource-statistics).
        - **Irreversibility**: This action is irreversible. Once deleted, the CDN resource cannot be recovered.
      parameters:
      - $ref: '#/components/parameters/resource_id'
      responses:
        '204':
          description: Successful
        '400':
          description: Failed to delete the CDN resource.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PrimaryResourceDeletionFailed'
                - $ref: '#/components/schemas/StreamingResourceDeletionFailed'
                - $ref: '#/components/schemas/FullCustomResourceDeletionFailed'
                - $ref: '#/components/schemas/ActiveInstanceDeletionProhibited'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
      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
          )
          client.cdn.cdn_resources.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.CDNResources.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/activity_log/requests:
    get:
      operationId: get-activity-logs
      tags:
      - CDN activity logs
      summary: Get CDN activity logs
      description: Get information about all CDN activity logs records.
      parameters:
      - $ref: '#/components/parameters/path'
      - $ref: '#/components/parameters/user_id'
      - $ref: '#/components/parameters/token_id'
      - $ref: '#/components/parameters/client_id'
      - $ref: '#/components/parameters/method'
      - $ref: '#/components/parameters/min_requested_at'
      - $ref: '#/components/parameters/max_requested_at'
      - $ref: '#/components/parameters/remote_ip_address'
      - $ref: '#/components/parameters/status_code'
      - $ref: '#/components/parameters/limit-2'
      - $ref: '#/components/parameters/offset-2'
      responses:
        '200':
          $ref: '#/components/responses/List'
        '401':
          description: Authentication credentials were not provided or the given token is not valid for any token type.
      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
          )
          page = client.cdn.audit_logs.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.AuditLogs.List(context.TODO(), cdn.AuditLogListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/activity_log/requests/{log_id}:
    get:
      operationId: get-activity-logs-details
      tags:
      - CDN activity logs
      summary: Get CDN activity logs details
      description: Get information about CDN activity logs record.
      parameters:
      - $ref: '#/components/parameters/ID'
      responses:
        '200':
          $ref: '#/components/responses/Details'
        '401':
          description: Authentication credentials were not provided or the given token is not valid for any token type.
        '404':
          description: Activity logs record is not found.
      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_audit_log_entry = client.cdn.audit_logs.get(
              0,
          )
          print(cdn_audit_log_entry.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnAuditLogEntry, err := client.CDN.AuditLogs.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnAuditLogEntry.ID)
          }
  /cdn/advanced/v1/logs:
    get:
      operationId: get-cdn-logs
      tags:
      - Log viewer
      summary: Get CDN logs
      description: |-
        Get CDN logs for up to 3 days starting today.

        You can filter logs using query parameters by client IP, CDN resource, date, path and etc.

        To filter the CDN logs by 2xx status codes, use:
        - &`status__gte`=200&`status__lt`=300
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/offset-3'
      - $ref: '#/components/parameters/limit-3'
      - $ref: '#/components/parameters/ordering'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/method__eq'
      - $ref: '#/components/parameters/method__ne'
      - $ref: '#/components/parameters/method__in'
      - $ref: '#/components/parameters/method__not_in'
      - $ref: '#/components/parameters/client_ip__eq'
      - $ref: '#/components/parameters/client_ip__ne'
      - $ref: '#/components/parameters/client_ip__in'
      - $ref: '#/components/parameters/client_ip__not_in'
      - $ref: '#/components/parameters/status__gt'
      - $ref: '#/components/parameters/status__gte'
      - $ref: '#/components/parameters/status__lt'
      - $ref: '#/components/parameters/status__lte'
      - $ref: '#/components/parameters/status__eq'
      - $ref: '#/components/parameters/status__ne'
      - $ref: '#/components/parameters/status__in'
      - $ref: '#/components/parameters/status__not_in'
      - $ref: '#/components/parameters/size__gt'
      - $ref: '#/components/parameters/size__gte'
      - $ref: '#/components/parameters/size__lt'
      - $ref: '#/components/parameters/size__lte'
      - $ref: '#/components/parameters/size__eq'
      - $ref: '#/components/parameters/size__ne'
      - $ref: '#/components/parameters/size__in'
      - $ref: '#/components/parameters/size__not_in'
      - $ref: '#/components/parameters/cname__eq'
      - $ref: '#/components/parameters/cname__ne'
      - $ref: '#/components/parameters/cname__in'
      - $ref: '#/components/parameters/cname__not_in'
      - $ref: '#/components/parameters/cname__contains'
      - $ref: '#/components/parameters/resource_id__gt'
      - $ref: '#/components/parameters/resource_id__gte'
      - $ref: '#/components/parameters/resource_id__lt'
      - $ref: '#/components/parameters/resource_id__lte'
      - $ref: '#/components/parameters/resource_id__eq'
      - $ref: '#/components/parameters/resource_id__ne'
      - $ref: '#/components/parameters/resource_id__in'
      - $ref: '#/components/parameters/resource_id__not_in'
      - $ref: '#/components/parameters/cache_status__eq'
      - $ref: '#/components/parameters/cache_status__ne'
      - $ref: '#/components/parameters/cache_status__in'
      - $ref: '#/components/parameters/cache_status__not_in'
      - $ref: '#/components/parameters/datacenter__eq'
      - $ref: '#/components/parameters/datacenter__ne'
      - $ref: '#/components/parameters/datacenter__in'
      - $ref: '#/components/parameters/datacenter__not_in'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetLogsResponse'
      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
          )
          page = client.cdn.logs.list(
              from_="from",
              to="to",
          )
          page = page.data[0]
          print(page.resource_id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.Logs.List(context.TODO(), cdn.LogListParams{
          		From: "from",
          		To:   "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/advanced/v1/logs/download:
    get:
      operationId: download-cdn-logs
      tags:
      - Log viewer
      summary: Download CDN logs
      description: |-
        Download CDN logs for up to 3 days starting today.

        You can filter logs using query params by client IP, CDN resource, date, path and etc.
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/offset-3'
      - in: query
        name: limit
        schema:
          type: integer
          default: 10000
          maximum: 10000
        description: Maximum number of log records in the response.
      - $ref: '#/components/parameters/method__eq'
      - $ref: '#/components/parameters/method__ne'
      - $ref: '#/components/parameters/method__in'
      - $ref: '#/components/parameters/method__not_in'
      - $ref: '#/components/parameters/client_ip__eq'
      - $ref: '#/components/parameters/client_ip__ne'
      - $ref: '#/components/parameters/client_ip__in'
      - $ref: '#/components/parameters/client_ip__not_in'
      - $ref: '#/components/parameters/status__gt'
      - $ref: '#/components/parameters/status__gte'
      - $ref: '#/components/parameters/status__lt'
      - $ref: '#/components/parameters/status__lte'
      - $ref: '#/components/parameters/status__eq'
      - $ref: '#/components/parameters/status__ne'
      - $ref: '#/components/parameters/status__in'
      - $ref: '#/components/parameters/status__not_in'
      - $ref: '#/components/parameters/size__gt'
      - $ref: '#/components/parameters/size__gte'
      - $ref: '#/components/parameters/size__lt'
      - $ref: '#/components/parameters/size__lte'
      - $ref: '#/components/parameters/size__eq'
      - $ref: '#/components/parameters/size__ne'
      - $ref: '#/components/parameters/size__in'
      - $ref: '#/components/parameters/size__not_in'
      - $ref: '#/components/parameters/cname__eq'
      - $ref: '#/components/parameters/cname__ne'
      - $ref: '#/components/parameters/cname__in'
      - $ref: '#/components/parameters/cname__not_in'
      - $ref: '#/components/parameters/cname__contains'
      - $ref: '#/components/parameters/resource_id__gt'
      - $ref: '#/components/parameters/resource_id__gte'
      - $ref: '#/components/parameters/resource_id__lt'
      - $ref: '#/components/parameters/resource_id__lte'
      - $ref: '#/components/parameters/resource_id__eq'
      - $ref: '#/components/parameters/resource_id__ne'
      - $ref: '#/components/parameters/resource_id__in'
      - $ref: '#/components/parameters/resource_id__not_in'
      - $ref: '#/components/parameters/cache_status__eq'
      - $ref: '#/components/parameters/cache_status__ne'
      - $ref: '#/components/parameters/cache_status__in'
      - $ref: '#/components/parameters/cache_status__not_in'
      - $ref: '#/components/parameters/datacenter__eq'
      - $ref: '#/components/parameters/datacenter__ne'
      - $ref: '#/components/parameters/datacenter__in'
      - $ref: '#/components/parameters/datacenter__not_in'
      - in: query
        name: sort
        schema:
          type: string
        description: |-
          Sorting rules.

          Possible values:
          - **method** - Request HTTP method.
          - **`client_ip`** - IP address of the client who sent the request.
          - **status** - Status code in the response.
          - **size** - Response size in bytes.
          - **cname** - Custom domain of the requested resource.
          - **`resource_id`** - ID of the requested CDN resource.
          - **`cache_status`** - Caching status.
          - **datacenter** - Data center where request was processed.
          - **timestamp** - Date and time when the request was made.

          May include multiple values separated by a comma.

          Example:
            - &sort=-timestamp,status
      - in: query
        name: fields
        schema:
          type: string
          default: timestamp,path,method,referer,user_agent,client_ip,status,size,cname,resource_id,cache_status,datacenter
        description: |-
          A comma-separated list of returned fields.

          Supported fields are presented in the responses section.

          Example:
            - &fields=timestamp,path,status
      - in: query
        name: format
        schema:
          type: string
        required: true
        description: |-
          Output format.

          Possible values:
          - csv
          - tsv
      responses:
        '200':
          content:
            application/zip:
              schema:
                type: string
                format: binary
          description: Successful.
          headers:
            content-disposition:
              schema:
                type: string
                format: attachment; filename=<from>_<to>_<format>.zip
              description: |-
                Result file name.

                "From" and "to" will be formatted according to RFC 5545.

                Example:
                - `20210614T000000_20210615T000000_tsv`.zip
      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
          )
          response = client.cdn.logs.download(
              format="format",
              from_="from",
              to="to",
          )
          print(response)
          content = response.read()
          print(content)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	response, err := client.CDN.Logs.Download(context.TODO(), cdn.LogDownloadParams{
          		Format: "format",
          		From:   "from",
          		To:     "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", response)
          }
  /cdn/logs_uploader/policies:
    get:
      operationId: get-policies-list
      tags:
      - Logs uploader
      summary: Get policies list
      description: Get list of logs uploader policies.
      parameters:
      - in: query
        name: search
        schema:
          type: string
        description: Search by policy name or id.
      - in: query
        name: config_ids
        schema:
          type: array
          items:
            type: integer
        description: Filter by ids of related logs uploader configs that use given policy.
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderPolicyListResponse'
        '403':
          description: Feature is disabled for your account.
      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
          )
          page = client.cdn.logs_uploader.policies.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.LogsUploader.Policies.List(context.TODO(), cdn.LogsUploaderPolicyListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-policy
      tags:
      - Logs uploader
      summary: Create policy
      description: Create logs uploader policy.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLogsUploaderPolicy'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderPolicyResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
      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
          )
          logs_uploader_policy = client.cdn.logs_uploader.policies.create()
          print(logs_uploader_policy.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderPolicy, err := client.CDN.LogsUploader.Policies.New(context.TODO(), cdn.LogsUploaderPolicyNewParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderPolicy.ID)
          }
  /cdn/logs_uploader/policies/{id}:
    get:
      operationId: get-policy-details
      tags:
      - Logs uploader
      summary: Get policy details
      description: Get information about logs uploader policy.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderPolicyResponse'
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Policy do not exist or has been deleted.
      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
          )
          logs_uploader_policy = client.cdn.logs_uploader.policies.get(
              0,
          )
          print(logs_uploader_policy.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderPolicy, err := client.CDN.LogsUploader.Policies.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderPolicy.ID)
          }
    put:
      operationId: change-policy
      tags:
      - Logs uploader
      summary: Change policy
      description: Change logs uploader policy.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLogsUploaderPolicy'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderPolicyResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Policy do not exist or has been deleted.
      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
          )
          logs_uploader_policy = client.cdn.logs_uploader.policies.replace(
              id=0,
          )
          print(logs_uploader_policy.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderPolicy, err := client.CDN.LogsUploader.Policies.Replace(
          		context.TODO(),
          		0,
          		cdn.LogsUploaderPolicyReplaceParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderPolicy.ID)
          }
    patch:
      operationId: patch-policy
      tags:
      - Logs uploader
      summary: Change policy
      description: Change logs uploader policy partially.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchLogsUploaderPolicy'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderPolicyResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Policy do not exist or has been deleted.
      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
          )
          logs_uploader_policy = client.cdn.logs_uploader.policies.update(
              id=0,
          )
          print(logs_uploader_policy.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderPolicy, err := client.CDN.LogsUploader.Policies.Update(
          		context.TODO(),
          		0,
          		cdn.LogsUploaderPolicyUpdateParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderPolicy.ID)
          }
    delete:
      operationId: delete-policy
      tags:
      - Logs uploader
      summary: Delete policy
      description: |-
        Delete the logs uploader policy from the system permanently.

        Notes:
        - **Irreversibility**: This action is irreversible. Once deleted, the logs uploader policy cannot be recovered.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successful.
        '400':
          description: Policy cannot be deleted if it's assigned to any logs uploader config.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Policy do not exist or has been deleted.
      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
          )
          client.cdn.logs_uploader.policies.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.LogsUploader.Policies.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/logs_uploader/policies/fields:
    get:
      operationId: get-policy-fields
      tags:
      - Logs uploader
      summary: Get policy fields
      description: |-
        Get list of available fields for logs uploader policy.

        `/cdn/v2/logs_uploader/policies/fields` returns the same fields together with the conversion types each one permits.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '403':
          description: Feature is disabled for your account.
      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
          )
          response = client.cdn.logs_uploader.policies.list_fields()
          print(response)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	response, err := client.CDN.LogsUploader.Policies.ListFields(context.TODO())
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", response)
          }
  /cdn/v2/logs_uploader/policies/fields:
    get:
      operationId: get-policy-fields-v2
      tags:
      - Logs uploader
      summary: Get policy fields with allowed conversions
      description: |-
        Get the available fields for a logs uploader policy, each with the conversion types it permits in `field_conversions`.

        Supersedes `/cdn/logs_uploader/policies/fields`, which returns field names only.

        `-` is the placeholder for a skipped column: it may appear in `fields` and permits no conversion.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LogsUploaderPolicyField'
        '403':
          description: Feature is disabled for your account.
      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
          )
          logs_uploader_policy_fields = client.cdn.logs_uploader.policies.list_fields_allowed_conversions()
          print(logs_uploader_policy_fields)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderPolicyFields, err := client.CDN.LogsUploader.Policies.ListFieldsAllowedConversions(context.TODO())
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderPolicyFields)
          }
  /cdn/logs_uploader/targets:
    get:
      operationId: get-targets-list
      tags:
      - Logs uploader
      summary: Get targets list
      description: Get list of logs uploader targets.
      parameters:
      - in: query
        name: search
        schema:
          type: string
        description: Search by target name or id.
      - in: query
        name: config_ids
        schema:
          type: array
          items:
            type: integer
        description: Filter by ids of related logs uploader configs that use given target.
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderTargetListResponse'
        '403':
          description: Feature is disabled for your account.
      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
          )
          page = client.cdn.logs_uploader.targets.list()
          page = page.results[0]
          print(page)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.LogsUploader.Targets.List(context.TODO(), cdn.LogsUploaderTargetListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-target
      tags:
      - Logs uploader
      summary: Create target
      description: Create logs uploader target.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLogsUploaderTarget'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderTargetResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
      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
          )
          logs_uploader_target = client.cdn.logs_uploader.targets.create(
              config={},
              storage_type="s3_gcore",
          )
          print(logs_uploader_target)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderTarget, err := client.CDN.LogsUploader.Targets.New(context.TODO(), cdn.LogsUploaderTargetNewParams{
          		OfS3Gcore: &cdn.LogsUploaderTargetNewParamsBodyS3Gcore{
          			Config: cdn.LogsUploaderTargetNewParamsBodyS3GcoreConfigUnion{
          				OfS3GcoreConfig: &cdn.LogsUploaderTargetNewParamsBodyS3GcoreConfigS3GcoreConfig{},
          			},
          		},
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderTarget)
          }
  /cdn/logs_uploader/targets/{id}:
    get:
      operationId: get-target-details
      tags:
      - Logs uploader
      summary: Get target details
      description: Get information about logs uploader target.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderTargetResponse'
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader target do not exist or has been deleted.
      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
          )
          logs_uploader_target = client.cdn.logs_uploader.targets.get(
              0,
          )
          print(logs_uploader_target)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderTarget, err := client.CDN.LogsUploader.Targets.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderTarget)
          }
    put:
      operationId: change-target
      tags:
      - Logs uploader
      summary: Change target
      description: Change logs uploader target.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutLogsUploaderTarget'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderTargetResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader target do not exist or has been deleted.
      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
          )
          logs_uploader_target = client.cdn.logs_uploader.targets.replace(
              id=0,
              config={},
              storage_type="s3_gcore",
          )
          print(logs_uploader_target)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderTarget, err := client.CDN.LogsUploader.Targets.Replace(
          		context.TODO(),
          		0,
          		cdn.LogsUploaderTargetReplaceParams{
          			OfS3Gcore: &cdn.LogsUploaderTargetReplaceParamsBodyS3Gcore{
          				Config: cdn.LogsUploaderTargetReplaceParamsBodyS3GcoreConfigUnion{
          					OfS3GcoreConfig: &cdn.LogsUploaderTargetReplaceParamsBodyS3GcoreConfigS3GcoreConfig{},
          				},
          			},
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderTarget)
          }
    patch:
      operationId: patch-target
      tags:
      - Logs uploader
      summary: Change target
      description: Change logs uploader target partially.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchLogsUploaderTarget'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderTargetResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader target do not exist or has been deleted.
      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
          )
          logs_uploader_target = client.cdn.logs_uploader.targets.update(
              id=0,
          )
          print(logs_uploader_target)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderTarget, err := client.CDN.LogsUploader.Targets.Update(
          		context.TODO(),
          		0,
          		cdn.LogsUploaderTargetUpdateParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderTarget)
          }
    delete:
      operationId: delete-target
      tags:
      - Logs uploader
      summary: Delete target
      description: |-
        Delete the logs uploader target from the system permanently.

        Notes:
        - **Irreversibility**: This action is irreversible. Once deleted, the logs uploader target cannot be recovered.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successful.
        '400':
          description: Target cannot be deleted if it's assigned to any logs uploader config.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader target do not exist or has been deleted.
      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
          )
          client.cdn.logs_uploader.targets.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.LogsUploader.Targets.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/logs_uploader/targets/{id}/validate:
    post:
      operationId: validate-target
      tags:
      - Logs uploader
      summary: Validate target
      description: Validate logs uploader target.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderValidationResponse'
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader target do not exist or has been deleted.
      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
          )
          logs_uploader_validation = client.cdn.logs_uploader.targets.validate(
              0,
          )
          print(logs_uploader_validation.code)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderValidation, err := client.CDN.LogsUploader.Targets.Validate(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderValidation.Code)
          }
  /cdn/logs_uploader/configs:
    get:
      operationId: get-configs-list
      tags:
      - Logs uploader
      summary: Get configs list
      description: Get list of logs uploader configs.
      parameters:
      - in: query
        name: search
        schema:
          type: string
        description: Search by config name or id.
      - in: query
        name: resource_ids
        schema:
          type: array
          items:
            type: integer
        description: Filter by ids of CDN resources that are assigned to given config.
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderConfigListResponse'
        '403':
          description: Feature is disabled for your account.
      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
          )
          page = client.cdn.logs_uploader.configs.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.LogsUploader.Configs.List(context.TODO(), cdn.LogsUploaderConfigListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-config
      tags:
      - Logs uploader
      summary: Create config
      description: Create logs uploader config.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLogsUploaderConfig'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderConfigResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
      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
          )
          logs_uploader_config = client.cdn.logs_uploader.configs.create(
              name="name",
              policy=0,
              target=0,
          )
          print(logs_uploader_config.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderConfig, err := client.CDN.LogsUploader.Configs.New(context.TODO(), cdn.LogsUploaderConfigNewParams{
          		Name:   "name",
          		Policy: 0,
          		Target: 0,
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderConfig.ID)
          }
  /cdn/logs_uploader/configs/{id}:
    get:
      operationId: get-config-details
      tags:
      - Logs uploader
      summary: Get config details
      description: Get information about logs uploader config.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderConfigResponse'
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader config do not exist or has been deleted.
      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
          )
          logs_uploader_config = client.cdn.logs_uploader.configs.get(
              0,
          )
          print(logs_uploader_config.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderConfig, err := client.CDN.LogsUploader.Configs.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderConfig.ID)
          }
    put:
      operationId: change-config
      tags:
      - Logs uploader
      summary: Change config
      description: Change logs uploader config.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLogsUploaderConfig'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderConfigResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader config do not exist or has been deleted.
      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
          )
          logs_uploader_config = client.cdn.logs_uploader.configs.replace(
              id=0,
              name="name",
              policy=0,
              target=0,
          )
          print(logs_uploader_config.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderConfig, err := client.CDN.LogsUploader.Configs.Replace(
          		context.TODO(),
          		0,
          		cdn.LogsUploaderConfigReplaceParams{
          			Name:   "name",
          			Policy: 0,
          			Target: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderConfig.ID)
          }
    patch:
      operationId: patch-config
      tags:
      - Logs uploader
      summary: Change config
      description: Change logs uploader config partially.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchLogsUploaderConfig'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderConfigResponse'
        '400':
          description: You will receive an error with the invalid parameter mentioned.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader config do not exist or has been deleted.
      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
          )
          logs_uploader_config = client.cdn.logs_uploader.configs.update(
              id=0,
          )
          print(logs_uploader_config.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderConfig, err := client.CDN.LogsUploader.Configs.Update(
          		context.TODO(),
          		0,
          		cdn.LogsUploaderConfigUpdateParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderConfig.ID)
          }
    delete:
      operationId: delete-config
      tags:
      - Logs uploader
      summary: Delete config
      description: |-
        Delete the logs uploader config from the system permanently.

        Notes:
        - **Irreversibility**: This action is irreversible. Once deleted, the logs uploader config cannot be recovered.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successful.
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader config do not exist or has been deleted.
      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
          )
          client.cdn.logs_uploader.configs.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.LogsUploader.Configs.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/logs_uploader/configs/{id}/validate:
    post:
      operationId: validate-config
      tags:
      - Logs uploader
      summary: Validate config
      description: Validate logs uploader config.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsUploaderValidationResponse'
        '403':
          description: Feature is disabled for your account.
        '404':
          description: Logs uploader config do not exist or has been deleted.
      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
          )
          logs_uploader_validation = client.cdn.logs_uploader.configs.validate(
              0,
          )
          print(logs_uploader_validation.code)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsUploaderValidation, err := client.CDN.LogsUploader.Configs.Validate(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsUploaderValidation.Code)
          }
  /cdn/aws_regions:
    get:
      operationId: get-aws-regions-list
      tags:
      - Logs uploader
      summary: Get AWS regions list
      description: Get the list of Amazon AWS regions.
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAwsRegionsResponse'
      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
          )
          page = client.cdn.list_aws_regions()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.ListAwsRegions(context.TODO(), cdn.CDNListAwsRegionsParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/alibaba_regions:
    get:
      operationId: get-alibaba-regions-list
      tags:
      - Logs uploader
      summary: Get Alibaba regions list
      description: Get the list of Alibaba Cloud regions.
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAlibabaRegionsResponse'
      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
          )
          page = client.cdn.list_alibaba_regions()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.ListAlibabaRegions(context.TODO(), cdn.CDNListAlibabaRegionsParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/resources/{resource_id}/prefetch:
    post:
      operationId: prefetch-content
      tags:
      - Tools
      summary: Prefetch content
      description: |-
        Pre-populate files to a CDN cache before users requests. Prefetch is recommended only for files that **more than 200 MB** and **less than 5 GB**.

        You can make one prefetch request for a CDN resource per minute. One request for prefetch may content only up to 100 paths to files.

        The time of procedure depends on the number and size of the files.

        If you need to update files stored in the CDN, first purge these files and then prefetch.
      parameters:
      - $ref: '#/components/parameters/resource_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcePrefetch'
      responses:
        '201':
          description: Successful.
        '400':
          description: Prefetch request validation is failed.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/IncorrectPathsItemsPurgeOrPrefetchError'
                - $ref: '#/components/schemas/JSONParseError'
        '429':
          description: You have exceeded number of allowed prefetch requests for your CDN resource.
      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
          )
          client.cdn.cdn_resources.prefetch(
              resource_id=0,
              paths=["/test.jpg", "test1.jpg"],
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.CDNResources.Prefetch(
          		context.TODO(),
          		0,
          		cdn.CDNResourcePrefetchParams{
          			Paths: []string{"/test.jpg", "test1.jpg"},
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/resources/{resource_id}/purge:
    post:
      operationId: purge-cache
      tags:
      - Tools
      summary: Purge cache
      description: |-
        Delete cache from CDN servers. This is necessary to update CDN content.

        We have different limits for different purge types:
        - **Purge all cache** - One purge request for a CDN resource per minute.
        - **Purge by URL** - Two purge requests for a CDN resource per minute. One purge request is limited to 100 URLs.
        - **Purge by pattern** - One purge request for a CDN resource per minute. One purge request is limited to 10 patterns.
      parameters:
      - $ref: '#/components/parameters/resource_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcePurge'
      responses:
        '201':
          description: Successful.
        '400':
          description: Failed to purge the CDN resource cache.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PathsNotProvidedPurgeError'
                - $ref: '#/components/schemas/IncorrectPathsTypePurgeError'
                - $ref: '#/components/schemas/IncorrectPathsFormatPurgeError'
                - $ref: '#/components/schemas/IncorrectPathsItemsPurgeOrPrefetchError'
                - $ref: '#/components/schemas/JSONParseError'
        '429':
          description: You have exceeded number of allowed purge requests for your CDN resource.
      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
          )
          client.cdn.cdn_resources.purge(
              resource_id=0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.CDNResources.Purge(
          		context.TODO(),
          		0,
          		cdn.CDNResourcePurgeParams{
          			OfPurgeByURL: &cdn.CDNResourcePurgeParamsBodyPurgeByURL{},
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/resources/{resource_id}/rules:
    get:
      operationId: get-rules-list
      tags:
      - Rules
      summary: 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
          )
          page = client.cdn.cdn_resources.rules.list(
              resource_id=0,
          )
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.CDNResources.Rules.List(
          		context.TODO(),
          		0,
          		cdn.CDNResourceRuleListParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-rule
      tags:
      - Rules
      summary: Create rule
      parameters:
      - $ref: '#/components/parameters/resource_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRule'
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResponse'
        '400':
          description: Failed to create the rule.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/RuleNameAlreadyExistsError'
                - $ref: '#/components/schemas/RulePatternError'
                - $ref: '#/components/schemas/RulePatternAlreadyExistsError'
                - $ref: '#/components/schemas/JSONParseError'
                - $ref: '#/components/schemas/CommonValidationError'
      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 = client.cdn.cdn_resources.rules.create(
              resource_id=0,
              name="My first rule",
              rule="/folder/images/*.png",
              rule_type=0,
          )
          print(cdn_resource_rule.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResourceRule, err := client.CDN.CDNResources.Rules.New(
          		context.TODO(),
          		0,
          		cdn.CDNResourceRuleNewParams{
          			Name:     "My first rule",
          			Rule:     "/folder/images/*.png",
          			RuleType: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResourceRule.ID)
          }
  /cdn/resources/{resource_id}/rules/{rule_id}:
    get:
      operationId: get-rule-details
      tags:
      - Rules
      summary: Get rule details
      parameters:
      - $ref: '#/components/parameters/resource_id'
      - $ref: '#/components/parameters/rule_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResponse'
        '404':
          description: Rule is not found.
      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 = client.cdn.cdn_resources.rules.get(
              rule_id=0,
              resource_id=0,
          )
          print(cdn_resource_rule.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResourceRule, err := client.CDN.CDNResources.Rules.Get(
          		context.TODO(),
          		0,
          		cdn.CDNResourceRuleGetParams{
          			ResourceID: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResourceRule.ID)
          }
    put:
      operationId: change-rule
      tags:
      - Rules
      summary: Change rule
      parameters:
      - $ref: '#/components/parameters/resource_id'
      - $ref: '#/components/parameters/rule_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeRule'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResponse'
        '400':
          description: Filed to change the rule.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/RuleNameAlreadyExistsError'
                - $ref: '#/components/schemas/RulePatternError'
                - $ref: '#/components/schemas/RulePatternAlreadyExistsError'
                - $ref: '#/components/schemas/JSONParseError'
                - $ref: '#/components/schemas/CommonValidationError'
        '404':
          description: Rule is not found.
      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 = client.cdn.cdn_resources.rules.replace(
              rule_id=0,
              resource_id=0,
              rule="/folder/images/*.png",
              rule_type=0,
          )
          print(cdn_resource_rule.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResourceRule, err := client.CDN.CDNResources.Rules.Replace(
          		context.TODO(),
          		0,
          		cdn.CDNResourceRuleReplaceParams{
          			ResourceID: 0,
          			Rule:       "/folder/images/*.png",
          			RuleType:   0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResourceRule.ID)
          }
    patch:
      operationId: patch-rule
      tags:
      - Rules
      summary: Change rule
      parameters:
      - $ref: '#/components/parameters/resource_id'
      - $ref: '#/components/parameters/rule_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchRule'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResponse'
        '400':
          description: Filed to change the rule.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/RuleNameAlreadyExistsError'
                - $ref: '#/components/schemas/RulePatternError'
                - $ref: '#/components/schemas/RulePatternAlreadyExistsError'
                - $ref: '#/components/schemas/JSONParseError'
                - $ref: '#/components/schemas/CommonValidationError'
        '404':
          description: Rule is not found.
      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 = client.cdn.cdn_resources.rules.update(
              rule_id=0,
              resource_id=0,
          )
          print(cdn_resource_rule.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnResourceRule, err := client.CDN.CDNResources.Rules.Update(
          		context.TODO(),
          		0,
          		cdn.CDNResourceRuleUpdateParams{
          			ResourceID: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnResourceRule.ID)
          }
    delete:
      operationId: delete-rule
      tags:
      - Rules
      summary: Delete rule
      description: |-
        Delete the rule from the system permanently.

        Notes:
        - **Deactivation Requirement**: Set the `active` attribute to `false` before deletion.
        - **Irreversibility**: This action is irreversible. Once deleted, the rule cannot be recovered.
      parameters:
      - $ref: '#/components/parameters/resource_id'
      - $ref: '#/components/parameters/rule_id'
      responses:
        '204':
          description: Successful.
        '400':
          description: Failed to delete the rule.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ActiveInstanceDeletionProhibited'
        '404':
          description: Rule is not found.
      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
          )
          client.cdn.cdn_resources.rules.delete(
              rule_id=0,
              resource_id=0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.CDNResources.Rules.Delete(
          		context.TODO(),
          		0,
          		cdn.CDNResourceRuleDeleteParams{
          			ResourceID: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/resources/rule_templates:
    get:
      operationId: get-rule-templates-list
      tags:
      - Rule templates
      summary: Get rule templates list
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleTemplateListResponse'
      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
          )
          page = client.cdn.rule_templates.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.RuleTemplates.List(context.TODO(), cdn.RuleTemplateListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-rule-template
      tags:
      - Rule templates
      summary: Create rule template
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRuleTemplate'
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleTemplateResponse'
      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
          )
          rule_template = client.cdn.rule_templates.create(
              rule="/folder/images/*.png",
              rule_type=0,
          )
          print(rule_template.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	ruleTemplate, err := client.CDN.RuleTemplates.New(context.TODO(), cdn.RuleTemplateNewParams{
          		Rule:     "/folder/images/*.png",
          		RuleType: 0,
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", ruleTemplate.ID)
          }
  /cdn/resources/rule_templates/{rule_template_id}:
    get:
      operationId: get-rule-template-details
      tags:
      - Rule templates
      summary: Get rule template details
      parameters:
      - $ref: '#/components/parameters/rule_template_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleTemplateResponse'
      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
          )
          rule_template = client.cdn.rule_templates.get(
              0,
          )
          print(rule_template.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	ruleTemplate, err := client.CDN.RuleTemplates.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", ruleTemplate.ID)
          }
    put:
      operationId: change-rule-template
      tags:
      - Rule templates
      summary: Change rule template
      parameters:
      - $ref: '#/components/parameters/rule_template_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeRuleTemplate'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleTemplateResponse'
      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
          )
          rule_template = client.cdn.rule_templates.replace(
              rule_template_id=0,
              rule="/folder/images/*.png",
              rule_type=0,
          )
          print(rule_template.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	ruleTemplate, err := client.CDN.RuleTemplates.Replace(
          		context.TODO(),
          		0,
          		cdn.RuleTemplateReplaceParams{
          			Rule:     "/folder/images/*.png",
          			RuleType: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", ruleTemplate.ID)
          }
    patch:
      operationId: patch-rule-template
      tags:
      - Rule templates
      summary: Change rule template
      parameters:
      - $ref: '#/components/parameters/rule_template_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchRuleTemplate'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleTemplateResponse'
      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
          )
          rule_template = client.cdn.rule_templates.update(
              rule_template_id=0,
          )
          print(rule_template.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	ruleTemplate, err := client.CDN.RuleTemplates.Update(
          		context.TODO(),
          		0,
          		cdn.RuleTemplateUpdateParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", ruleTemplate.ID)
          }
    delete:
      operationId: delete-rule-template
      tags:
      - Rule templates
      summary: Delete rule template
      parameters:
      - $ref: '#/components/parameters/rule_template_id'
      responses:
        '204':
          description: Successful.
      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
          )
          client.cdn.rule_templates.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.RuleTemplates.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/presets:
    get:
      operationId: get-presets-list
      tags:
      - Presets
      summary: Get presets list
      description: |-
        Get the list of presets available to your account.

        A preset is a predefined set of CDN resource or rule settings that can be applied to an object in one request.
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresetListResponse'
      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
          )
          page = client.cdn.presets.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.Presets.List(context.TODO(), cdn.PresetListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/presets/{preset_id}:
    get:
      operationId: get-preset-details
      tags:
      - Presets
      summary: Get preset details
      description: Get information about a preset.
      parameters:
      - $ref: '#/components/parameters/preset_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresetResponse'
        '404':
          description: Preset does not exist.
      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
          )
          preset_detail = client.cdn.presets.get(
              0,
          )
          print(preset_detail.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	presetDetail, err := client.CDN.Presets.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", presetDetail.ID)
          }
  /cdn/presets/{preset_id}/applied:
    get:
      operationId: get-applied-preset
      tags:
      - Presets
      summary: Get applied preset objects
      description: Get the list of objects the preset is currently applied to.
      parameters:
      - $ref: '#/components/parameters/preset_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPresetResponse'
        '404':
          description: Preset does not exist.
      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
          )
          applied_preset = client.cdn.presets.applied.get_objects(
              0,
          )
          print(applied_preset.object_ids)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	appliedPreset, err := client.CDN.Presets.Applied.GetObjects(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", appliedPreset.ObjectIDs)
          }
    post:
      operationId: apply-preset
      tags:
      - Presets
      summary: Apply preset
      description: |-
        Apply the preset to an object (CDN resource or rule, according to the preset `object_type`).

        The preset settings are applied to the object, and the options included in the preset can no longer be edited on the object until the preset is unapplied.
      parameters:
      - $ref: '#/components/parameters/preset_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyPresetRequest'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplyPresetResponse'
        '400':
          description: |-
            You will receive an error with the invalid parameter mentioned. Possible reasons:
            - The object does not exist.
            - The object already has an applied preset.
            - The preset requires the Streaming service, which is not available on your tariff plan.
        '404':
          description: Preset does not exist.
      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
          )
          applied_preset_created = client.cdn.presets.applied.apply(
              preset_id=0,
              object_id=7531,
          )
          print(applied_preset_created.object_id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	appliedPresetCreated, err := client.CDN.Presets.Applied.Apply(
          		context.TODO(),
          		0,
          		cdn.PresetAppliedApplyParams{
          			ObjectID: 7531,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", appliedPresetCreated.ObjectID)
          }
  /cdn/presets/{preset_id}/applied/{object_id}:
    get:
      operationId: get-applied-preset-object
      tags:
      - Presets
      summary: Get applied preset object
      description: |-
        Get a single object the preset is applied to.

        Returns `404` if the preset is not applied to the object, so you can use this endpoint to check
        whether the relationship exists.
      parameters:
      - $ref: '#/components/parameters/preset_id'
      - $ref: '#/components/parameters/object_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPresetObjectResponse'
        '404':
          description: Preset does not exist, or the preset is not applied to the object.
      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
          )
          applied_preset_object = client.cdn.presets.applied.get(
              object_id=0,
              preset_id=0,
          )
          print(applied_preset_object.object_id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	appliedPresetObject, err := client.CDN.Presets.Applied.Get(
          		context.TODO(),
          		0,
          		cdn.PresetAppliedGetParams{
          			PresetID: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", appliedPresetObject.ObjectID)
          }
    delete:
      operationId: unapply-preset
      tags:
      - Presets
      summary: Unapply preset
      description: Unapply the preset from the object. The options managed by the preset are removed from the object.
      parameters:
      - $ref: '#/components/parameters/preset_id'
      - $ref: '#/components/parameters/object_id'
      responses:
        '204':
          description: Successful.
        '400':
          description: |-
            You will receive an error with one of the following reasons:
            - The applied preset cannot be removed until the preset settings have been applied to all its objects.
            - Unapplying would delete the `tls_versions` option while the `tls_ciphers` option is active on the resource.
        '404':
          description: Preset or applied object does not exist.
      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
          )
          client.cdn.presets.applied.unapply(
              object_id=0,
              preset_id=0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.Presets.Applied.Unapply(
          		context.TODO(),
          		0,
          		cdn.PresetAppliedUnapplyParams{
          			PresetID: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/resources/{resource_id}/preset:
    get:
      operationId: get-resource-applied-preset-fields
      tags:
      - Presets
      summary: Get CDN resource applied preset fields
      description: Get the preset applied to a CDN resource and the list of resource fields managed by the preset.
      parameters:
      - $ref: '#/components/parameters/resource_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPresetFieldsResponse'
        '404':
          description: CDN resource does not exist or has no applied preset.
      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
          )
          applied_preset_fields = client.cdn.presets.applied.get_resource_preset(
              0,
          )
          print(applied_preset_fields.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	appliedPresetFields, err := client.CDN.Presets.Applied.GetResourcePreset(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", appliedPresetFields.ID)
          }
  /cdn/resources/{resource_id}/rules/{rule_id}/preset:
    get:
      operationId: get-rule-applied-preset-fields
      tags:
      - Presets
      summary: Get rule applied preset fields
      description: Get the preset applied to a rule and the list of rule fields managed by the preset.
      parameters:
      - $ref: '#/components/parameters/resource_id'
      - $ref: '#/components/parameters/rule_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPresetFieldsResponse'
        '404':
          description: Rule does not exist or has no applied preset.
      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
          )
          applied_preset_fields = client.cdn.presets.applied.get_rule_preset(
              rule_id=0,
              resource_id=0,
          )
          print(applied_preset_fields.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	appliedPresetFields, err := client.CDN.Presets.Applied.GetRulePreset(
          		context.TODO(),
          		0,
          		cdn.PresetAppliedGetRulePresetParams{
          			ResourceID: 0,
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", appliedPresetFields.ID)
          }
  /cdn/purge_statuses:
    get:
      tags:
      - Purge history
      operationId: get-purge-status-list
      summary: Get purges history list
      description: Get purges history.
      parameters:
      - in: query
        name: cname
        schema:
          type: string
        description: |-
          Purges associated with a specific resource CNAME.

          Example:
            - &cname=example.com
      - in: query
        name: status
        schema:
          type: string
          description: |-
            Purge with a certain status.

            Possible values:
            - **In progress**
            - **Successful**
            - **Failed**
            - **Status report disabled**
      - in: query
        name: purge_type
        schema:
          type: string
          description: |-
            Purge requests with a certain purge type.

            Possible values:
            - **`purge_by_pattern`** - Purge by Pattern.
            - **`purge_by_url`** - Purge by URL.
            - **`purge_all`** - Purge All.
      - in: query
        name: from_created
        schema:
          type: string
        description: |-
          Start date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)

          Examples:
            - &`from_created`=2021-06-14T00:00:00Z
            - &`from_created`=2021-06-14T00:00:00.000Z
      - in: query
        name: to_created
        schema:
          type: string
        description: |-
          End date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)

          Examples:
            - &`to_created`=2021-06-15T00:00:00Z
            - &`to_created`=2021-06-15T00:00:00.000Z
      - in: query
        name: offset
        schema:
          type: integer
          default: 0
        description: Number of purge requests in the response to skip starting from the beginning of the requested period.
      - in: query
        name: limit
        schema:
          type: integer
          default: 100
          maximum: 100
        description: Maximum number of purges in the response.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurgeStatusesListResponse'
      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
          )
          page = client.cdn.list_purge_statuses()
          page = page.results[0]
          print(page.purge_id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.ListPurgeStatuses(context.TODO(), cdn.CDNListPurgeStatusesParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/aliases:
    get:
      operationId: get-aliases-list
      tags:
      - Aliases
      summary: Get aliases list
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Get information about aliases.

        The response is always paginated.
      parameters:
      - in: query
        name: resource_id
        schema:
          type: integer
        description: CDN resource ID. Only aliases of this CDN resource are returned.
      - in: query
        name: resource_id__in
        schema:
          type: string
        description: Comma-separated list of CDN resource IDs.
        example: 4567,4568
      - in: query
        name: status
        schema:
          $ref: '#/components/schemas/AliasStatus'
      - in: query
        name: status__in
        schema:
          type: string
        description: Comma-separated list of alias statuses.
        example: http_only,active
      - in: query
        name: ssl_status
        schema:
          $ref: '#/components/schemas/AliasSslStatus'
      - in: query
        name: ssl_status__in
        schema:
          type: string
        description: Comma-separated list of certificate outcomes.
        example: pending,issued
      - in: query
        name: ssl_validity_not_after_lte
        schema:
          type: string
        description: Only aliases whose served certificate expires at or before this date and time (ISO 8601/RFC 3339 format, UTC).
        example: '2027-01-01T00:00:00Z'
      - in: query
        name: ssl_validity_not_after_gte
        schema:
          type: string
        description: Only aliases whose served certificate expires at or after this date and time (ISO 8601/RFC 3339 format, UTC).
        example: '2027-01-01T00:00:00Z'
      - in: query
        name: automated
        schema:
          type: boolean
        description: |-
          How the alias certificate is managed.

          Possible values:
          - `true` – A Let's Encrypt certificate is issued and renewed automatically.
          - `false` – The certificate was added by you.
      - in: query
        name: ssl_id
        schema:
          type: integer
        description: SSL certificate ID. Only aliases linked to this certificate are returned.
      - in: query
        name: cname
        schema:
          type: string
        description: Hostname substring, case-insensitive.
      - in: query
        name: cname_startswith
        schema:
          type: string
        description: Hostname prefix, case-insensitive.
      - in: query
        name: cname_endswith
        schema:
          type: string
        description: Hostname suffix, case-insensitive.
      - in: query
        name: search
        schema:
          type: string
        description: Search by alias ID or hostname.
      - in: query
        name: ordering
        schema:
          type: string
        description: |-
          Field to sort by. Prefix with `-` for descending order.

          Possible values: `id`, `cname`, `status`, `created`, `updated`, `resource_id`.
        example: -created
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasListResponse'
        '403':
          description: Aliases are not enabled for your account.
      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
          )
          page = client.cdn.aliases.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.Aliases.List(context.TODO(), cdn.AliasListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: create-alias
      tags:
      - Aliases
      summary: Create alias
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Create an alias: a hostname you own that is served with the settings of one of your CDN resources and with its own SSL certificate.

        By default, a Let's Encrypt certificate is issued for the alias automatically. Choose how its domain is validated with `challenge_type`.

        To use your own certificate instead, pass its ID in `ssl_id`. The certificate must cover the alias hostname; a Let's Encrypt certificate issued for one of your CDN resources cannot be used.

        The hostname must be unique across all CDN resources, additional CNAMEs and aliases.

        The DNS record the hostname needs for Let's Encrypt domain validation is returned in `ssl_provisioning` of the alias details.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAlias'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Alias'
        '400':
          description: Validation failed, or the aliases limit of your account is reached.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CommonValidationError'
                - $ref: '#/components/schemas/AliasesLimitError'
        '403':
          description: Aliases are not enabled for your account.
      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
          )
          alias = client.cdn.aliases.create(
              cname="shop.example.com",
              resource_id=4567,
          )
          print(alias.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	alias, err := client.CDN.Aliases.New(context.TODO(), cdn.AliasNewParams{
          		Cname:      "shop.example.com",
          		ResourceID: 4567,
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", alias.ID)
          }
  /cdn/aliases/add:
    post:
      operationId: add-aliases
      tags:
      - Aliases
      summary: Add aliases in bulk
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Create up to 1000 aliases for one CDN resource in a single request.

        The request is atomic: if any item is invalid, nothing is created and the errors are returned per item, in the same order as the request items. An item whose hostname is already an alias of the same CDN resource is reported in `exists` and left unchanged.

        The aliases limit of your account is checked against the items that would be created.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AliasesAddPayload'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasesAddResponse'
        '400':
          description: Validation failed, or the aliases limit of your account is reached.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/AliasesAddError'
                - $ref: '#/components/schemas/AliasesLimitError'
        '403':
          description: Aliases are not enabled for your account.
      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
          )
          response = client.cdn.aliases.create_multiple(
              items=[{
                  "cname": "shop.example.com"
              }],
              resource_id=4567,
          )
          print(response.created)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	response, err := client.CDN.Aliases.NewMultiple(context.TODO(), cdn.AliasNewMultipleParams{
          		Items: []cdn.AliasNewMultipleParamsItem{{
          			Cname: "shop.example.com",
          		}},
          		ResourceID: 4567,
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", response.Created)
          }
  /cdn/aliases/remove:
    post:
      operationId: remove-aliases
      tags:
      - Aliases
      summary: Remove aliases in bulk
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Delete up to 1000 aliases in a single request, selected either by ID or by hostname.

        Aliases that are not found are reported in `not_found` and do not fail the request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AliasesRemovePayload'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasesRemoveResponse'
        '400':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonValidationError'
        '403':
          description: Aliases are not enabled for your account.
      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
          )
          response = client.cdn.aliases.delete_multiple()
          print(response.not_found)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	response, err := client.CDN.Aliases.DeleteMultiple(context.TODO(), cdn.AliasDeleteMultipleParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", response.NotFound)
          }
  /cdn/aliases/{alias_id}:
    get:
      operationId: get-alias-details
      tags:
      - Aliases
      summary: Get alias details
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      parameters:
      - $ref: '#/components/parameters/alias_id_parameter'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasDetail'
        '403':
          description: Aliases are not enabled for your account.
        '404':
          description: The alias does not exist.
      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
          )
          alias_detail = client.cdn.aliases.get(
              0,
          )
          print(alias_detail)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	aliasDetail, err := client.CDN.Aliases.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", aliasDetail)
          }
    patch:
      operationId: change-alias
      tags:
      - Aliases
      summary: Change alias
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Change an alias. The hostname and the CDN resource of an alias cannot be changed; delete the alias and create a new one instead.

        Set `active` to `false` to stop serving the alias; certificate issuance stops, though an attempt already being processed completes. Set it back to `true` to resume. Resuming an alias without a valid Let's Encrypt certificate starts a new issuance attempt, which is rate-limited, so it cannot be combined with `automated` in one request. A renewal stopped by the pause is started again by the scheduled renewal after the alias is resumed.

        For an alias with your own certificate, pass a new certificate ID in `ssl_id` to replace it. The new certificate must cover the alias hostname.

        Pass `automated` to switch how the certificate is managed. Switching to your own certificate takes effect at once and the Let's Encrypt certificate issued for the alias is removed. Switching to a Let's Encrypt certificate starts an issuance attempt while your certificate keeps being served, and the alias starts serving the new certificate once it is issued; if the attempt fails, `ssl_status` becomes `failed` and your certificate keeps being served. The certificate mode cannot be changed while the alias is paused — resume it first.

        Pass `challenge_type` to change how the Let's Encrypt certificate's domain is validated. It cannot be changed while the alias is paused, or together with `active`. While no valid certificate is served, the change cancels the running issuance attempt and starts a new one; this is rate-limited like resuming, and is refused while that attempt is being processed. Otherwise the new method is used from the next attempt.
      parameters:
      - $ref: '#/components/parameters/alias_id_parameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeAlias'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasDetail'
        '400':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonValidationError'
        '403':
          description: Aliases are not enabled for your account.
        '404':
          description: The alias does not exist.
        '429':
          description: Too many certificate issuance attempts have been started for the alias.
      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
          )
          alias_detail = client.cdn.aliases.update(
              alias_id=0,
          )
          print(alias_detail)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	aliasDetail, err := client.CDN.Aliases.Update(
          		context.TODO(),
          		0,
          		cdn.AliasUpdateParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", aliasDetail)
          }
    delete:
      operationId: delete-alias
      tags:
      - Aliases
      summary: Delete alias
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: Delete an alias. The hostname stops being served and can be used again. A certificate you added yourself is not affected.
      parameters:
      - $ref: '#/components/parameters/alias_id_parameter'
      responses:
        '204':
          description: Successful.
        '403':
          description: Aliases are not enabled for your account.
        '404':
          description: The alias does not exist.
      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
          )
          client.cdn.aliases.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.Aliases.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/aliases/{alias_id}/retry:
    post:
      operationId: retry-alias-certificate
      tags:
      - Aliases
      summary: Retry alias certificate issuance
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Start a new Let's Encrypt certificate issuance attempt for an alias that has none running. Use it after an attempt has failed and `ssl_status` is `failed`.

        The number of attempts you can start per hour is limited.
      parameters:
      - $ref: '#/components/parameters/alias_id_parameter'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasDetail'
        '400':
          description: Issuance cannot be started. The alias serves a certificate you added yourself, is paused, already has a valid certificate, or an attempt is already running.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonValidationError'
        '403':
          description: Aliases are not enabled for your account.
        '404':
          description: The alias does not exist.
        '429':
          description: Too many certificate issuance attempts have been started for the alias.
      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
          )
          alias_detail = client.cdn.aliases.retry_certificate(
              0,
          )
          print(alias_detail)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	aliasDetail, err := client.CDN.Aliases.RetryCertificate(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", aliasDetail)
          }
  /cdn/aliases/{alias_id}/status:
    get:
      operationId: get-alias-certificate-issuing-details
      tags:
      - Aliases
      summary: Get alias certificate issuing details
      x-mint:
        metadata:
          tag: BETA
        content: |
          <Info>
          This endpoint is in beta. <Badge color="blue">BETA</Badge>
          </Info>
      description: |-
        Get details about the latest Let's Encrypt certificate issuance attempt for an alias, including the CNAME records to create for domain validation and the state of each domain validation challenge. Returns attempts in all statuses.

        While the alias is switching to a Let's Encrypt certificate, the attempt for the new certificate is returned.
      parameters:
      - $ref: '#/components/parameters/alias_id_parameter'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasCertificateStatus'
        '400':
          description: The alias serves a certificate you added yourself, or issuance has not started for it yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonValidationError'
        '403':
          description: Aliases are not enabled for your account.
        '404':
          description: The alias does not exist.
      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
          )
          alias_certificate_status = client.cdn.aliases.get_certificate_status(
              0,
          )
          print(alias_certificate_status.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	aliasCertificateStatus, err := client.CDN.Aliases.GetCertificateStatus(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", aliasCertificateStatus.ID)
          }
  /cdn/sslData:
    get:
      operationId: get-ssl-certificates-list
      tags:
      - SSL certificates
      summary: Get SSL certificates list
      description: Get information about SSL certificates.
      parameters:
      - in: query
        name: automated
        schema:
          type: boolean
        description: |-
          How the SSL certificate was issued.

          Possible values:
          - **true** – Certificate was issued automatically.
          - **false** – Certificate was added by a user.
      - in: query
        name: validity_not_after_lte
        schema:
          type: string
        description: |-
          Date and time when the certificate become untrusted (ISO 8601/RFC 3339 format, UTC.)

          Response will contain only certificates valid until the specified time.
      - in: query
        name: resource_id
        schema:
          type: integer
        description: CDN resource ID for which certificates are requested.
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSSLAnswerList'
      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
          )
          page = client.cdn.certificates.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.Certificates.List(context.TODO(), cdn.CertificateListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: add-ssl-certificate
      tags:
      - SSL certificates
      summary: Add SSL certificate
      description: |-
        Add an SSL certificate for content delivery over HTTPS protocol.

        Enter all strings of the certificate(s) and the private key into one string parameter.
        Each certificate and the private key in chain should be separated by the "\n" symbol, as shown in the example.

        Additionally, you can add a Let's Encrypt certificate. In this case, certificate and private key will be generated automatically after attaching this certificate to your CDN resource.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddSSL'
      responses:
        '201':
          description: Successful.
      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
          )
          client.cdn.certificates.create(
              name="New certificate",
              ssl_certificate="-----BEGIN CERTIFICATE-----\nMIIFWzCCBEOgAwIBAgISBK6qoNitg//89H/YJamujpWlMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODExMTMxMjQwMDJaFw0x\nOTAyMTExMjQwMDJaMBwxGjAYBgNVBAMTEWNkbjIudG50LWNsdWIuY29tMIIBIjAN\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzaHExDEXNSf6ELS0WUR7qq8gs9cc\nxx99sM2zs3Jld0twPmuldkVNe5xte/Hj03r4SesfOBczR7pn+t60YujPvUQDN8lx\nWYpvRuetOneyf4gNPatwzR/W1GWGlahet1xPVYGrttqL4gCJeShIXvU4aCyzW941\nPt0wCs+bg9u+59fXFkigWrWJPkwbR7bJ14XTStYynMbYLfCg+VPeGWj3d8wOhQcf\nAD86o8TLTbVfK2BDXwS5S8Dgf5u8g+WvmVHYDIkYKCxcLj0jP61Y7uHoFbSg41oN\nA9yPOa+0cYxA7U702V2WjxbfIeATYtNLZvH17lk+DYlQl8q3MLwguqZdgwIDAQAB\niIqI2xquGONtHFDOKJvy1O2qYTVRtNRVZqhc1ol+mw==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\nSjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT\nGkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF\nq6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8\nSMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0\nKOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n-----END CERTIFICATE-----\n",
              ssl_private_key="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDZcNCZiNNHfX2O\ndZpf12mv2rAZwqGZBAdpox0wntEPK3JciQ7ZRloLJeHuCNIJs9MidnH7Xk8zveju\nmab6HmfIzvMJAAm88OYWMFQRiYe1ggJEHMe7yYPQbtXwTqWDYdWmjPPma3Ujqqmb\nhmVX2rsYILD7cUjS+e0Ucfqx3QODQj/aujTt1rS0gFhJ0soY5m+C6VimPCx4Bjyw\n5rhtskJDRrfXxrIhVXOvSPFRyxDSfjt3win8vjhhZ3oFPWgrl9lVhn0zaB5hjDsd\n-----END PRIVATE KEY-----\n",
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.Certificates.New(context.TODO(), cdn.CertificateNewParams{
          		OfOwnCertificate: &cdn.CertificateNewParamsBodyOwnCertificate{
          			Name:           "New certificate",
          			SslCertificate: "-----BEGIN CERTIFICATE-----\nMIIFWzCCBEOgAwIBAgISBK6qoNitg//89H/YJamujpWlMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODExMTMxMjQwMDJaFw0x\nOTAyMTExMjQwMDJaMBwxGjAYBgNVBAMTEWNkbjIudG50LWNsdWIuY29tMIIBIjAN\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzaHExDEXNSf6ELS0WUR7qq8gs9cc\nxx99sM2zs3Jld0twPmuldkVNe5xte/Hj03r4SesfOBczR7pn+t60YujPvUQDN8lx\nWYpvRuetOneyf4gNPatwzR/W1GWGlahet1xPVYGrttqL4gCJeShIXvU4aCyzW941\nPt0wCs+bg9u+59fXFkigWrWJPkwbR7bJ14XTStYynMbYLfCg+VPeGWj3d8wOhQcf\nAD86o8TLTbVfK2BDXwS5S8Dgf5u8g+WvmVHYDIkYKCxcLj0jP61Y7uHoFbSg41oN\nA9yPOa+0cYxA7U702V2WjxbfIeATYtNLZvH17lk+DYlQl8q3MLwguqZdgwIDAQAB\niIqI2xquGONtHFDOKJvy1O2qYTVRtNRVZqhc1ol+mw==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\nSjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT\nGkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF\nq6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8\nSMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0\nKOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n-----END CERTIFICATE-----\n",
          			SslPrivateKey:  "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDZcNCZiNNHfX2O\ndZpf12mv2rAZwqGZBAdpox0wntEPK3JciQ7ZRloLJeHuCNIJs9MidnH7Xk8zveju\nmab6HmfIzvMJAAm88OYWMFQRiYe1ggJEHMe7yYPQbtXwTqWDYdWmjPPma3Ujqqmb\nhmVX2rsYILD7cUjS+e0Ucfqx3QODQj/aujTt1rS0gFhJ0soY5m+C6VimPCx4Bjyw\n5rhtskJDRrfXxrIhVXOvSPFRyxDSfjt3win8vjhhZ3oFPWgrl9lVhn0zaB5hjDsd\n-----END PRIVATE KEY-----\n",
          		},
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/sslData/{ssl_id}:
    get:
      operationId: get-ssl-certificate-details
      tags:
      - SSL certificates
      summary: Get SSL certificate details
      parameters:
      - in: path
        name: ssl_id
        description: SSL certificate ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSSLAnswer'
      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
          )
          ssl_detail = client.cdn.certificates.get(
              0,
          )
          print(ssl_detail.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	sslDetail, err := client.CDN.Certificates.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", sslDetail.ID)
          }
    put:
      operationId: change-ssl-certificate
      tags:
      - SSL certificates
      summary: Change SSL certificate
      parameters:
      - in: path
        name: ssl_id
        description: SSL certificate ID.
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSSlPayload'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSSLAnswer'
      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
          )
          ssl_detail = client.cdn.certificates.replace(
              ssl_id=0,
              name="New certificate",
              ssl_certificate="-----BEGIN CERTIFICATE-----\nMIIFWzCCBEOgAwIBAgISBK6qoNitg//89H/YJamujpWlMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODExMTMxMjQwMDJaFw0x\nOTAyMTExMjQwMDJaMBwxGjAYBgNVBAMTEWNkbjIudG50LWNsdWIuY29tMIIBIjAN\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzaHExDEXNSf6ELS0WUR7qq8gs9cc\nxx99sM2zs3Jld0twPmuldkVNe5xte/Hj03r4SesfOBczR7pn+t60YujPvUQDN8lx\nWYpvRuetOneyf4gNPatwzR/W1GWGlahet1xPVYGrttqL4gCJeShIXvU4aCyzW941\nPt0wCs+bg9u+59fXFkigWrWJPkwbR7bJ14XTStYynMbYLfCg+VPeGWj3d8wOhQcf\nAD86o8TLTbVfK2BDXwS5S8Dgf5u8g+WvmVHYDIkYKCxcLj0jP61Y7uHoFbSg41oN\nA9yPOa+0cYxA7U702V2WjxbfIeATYtNLZvH17lk+DYlQl8q3MLwguqZdgwIDAQAB\niIqI2xquGONtHFDOKJvy1O2qYTVRtNRVZqhc1ol+mw==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\nSjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT\nGkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF\nq6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8\nSMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0\nKOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n-----END CERTIFICATE-----\n",
              ssl_private_key="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDZcNCZiNNHfX2O\ndZpf12mv2rAZwqGZBAdpox0wntEPK3JciQ7ZRloLJeHuCNIJs9MidnH7Xk8zveju\nmab6HmfIzvMJAAm88OYWMFQRiYe1ggJEHMe7yYPQbtXwTqWDYdWmjPPma3Ujqqmb\nhmVX2rsYILD7cUjS+e0Ucfqx3QODQj/aujTt1rS0gFhJ0soY5m+C6VimPCx4Bjyw\n5rhtskJDRrfXxrIhVXOvSPFRyxDSfjt3win8vjhhZ3oFPWgrl9lVhn0zaB5hjDsd\n-----END PRIVATE KEY-----\n",
          )
          print(ssl_detail.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	sslDetail, err := client.CDN.Certificates.Replace(
          		context.TODO(),
          		0,
          		cdn.CertificateReplaceParams{
          			Name:           "New certificate",
          			SslCertificate: "-----BEGIN CERTIFICATE-----\nMIIFWzCCBEOgAwIBAgISBK6qoNitg//89H/YJamujpWlMA0GCSqGSIb3DQEBCwUA\nMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD\nExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODExMTMxMjQwMDJaFw0x\nOTAyMTExMjQwMDJaMBwxGjAYBgNVBAMTEWNkbjIudG50LWNsdWIuY29tMIIBIjAN\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzaHExDEXNSf6ELS0WUR7qq8gs9cc\nxx99sM2zs3Jld0twPmuldkVNe5xte/Hj03r4SesfOBczR7pn+t60YujPvUQDN8lx\nWYpvRuetOneyf4gNPatwzR/W1GWGlahet1xPVYGrttqL4gCJeShIXvU4aCyzW941\nPt0wCs+bg9u+59fXFkigWrWJPkwbR7bJ14XTStYynMbYLfCg+VPeGWj3d8wOhQcf\nAD86o8TLTbVfK2BDXwS5S8Dgf5u8g+WvmVHYDIkYKCxcLj0jP61Y7uHoFbSg41oN\nA9yPOa+0cYxA7U702V2WjxbfIeATYtNLZvH17lk+DYlQl8q3MLwguqZdgwIDAQAB\niIqI2xquGONtHFDOKJvy1O2qYTVRtNRVZqhc1ol+mw==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\nDkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\nSjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT\nGkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF\nq6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8\nSMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0\nKOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n-----END CERTIFICATE-----\n",
          			SslPrivateKey:  "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDZcNCZiNNHfX2O\ndZpf12mv2rAZwqGZBAdpox0wntEPK3JciQ7ZRloLJeHuCNIJs9MidnH7Xk8zveju\nmab6HmfIzvMJAAm88OYWMFQRiYe1ggJEHMe7yYPQbtXwTqWDYdWmjPPma3Ujqqmb\nhmVX2rsYILD7cUjS+e0Ucfqx3QODQj/aujTt1rS0gFhJ0soY5m+C6VimPCx4Bjyw\n5rhtskJDRrfXxrIhVXOvSPFRyxDSfjt3win8vjhhZ3oFPWgrl9lVhn0zaB5hjDsd\n-----END PRIVATE KEY-----\n",
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", sslDetail.ID)
          }
    delete:
      operationId: delete-ssl-certificate
      tags:
      - SSL certificates
      summary: Delete SSL certificate
      parameters:
      - in: path
        name: ssl_id
        description: SSL certificate ID
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successful.
      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
          )
          client.cdn.certificates.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.Certificates.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/sslCertificates:
    get:
      operationId: get-trusted-ca-certificates-list
      tags:
      - CA certificates
      summary: Get trusted CA certificates list
      description: Get list of trusted CA certificates used to verify an origin.
      parameters:
      - in: query
        name: automated
        schema:
          type: boolean
        description: |-
          How the certificate was issued.

          Possible values:
          - **true** – Certificate was issued automatically.
          - **false** – Certificate was added by a user.
      - in: query
        name: validity_not_after_lte
        schema:
          type: string
        description: |-
          Date and time when the certificate become untrusted (ISO 8601/RFC 3339 format, UTC.)

          Response will contain certificates valid until the specified time.
      - in: query
        name: resource_id
        schema:
          type: integer
        description: CDN resource ID for which the certificates are requested.
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ssl_ca_list_response'
      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
          )
          page = client.cdn.trusted_ca_certificates.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.TrustedCaCertificates.List(context.TODO(), cdn.TrustedCaCertificateListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
    post:
      operationId: add-trusted-ca-certificate
      tags:
      - CA certificates
      summary: Add trusted CA certificate
      description: |-
        Add a trusted CA certificate to verify an origin.

        Enter all strings of the certificate in one string parameter. Each string should be separated by the "\n" symbol.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ssl_ca_add'
      responses:
        '201':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ssl_ca_response'
      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
          )
          ca_certificate = client.cdn.trusted_ca_certificates.create(
              name="Example CA cert",
              ssl_certificate="-----BEGIN CERTIFICATE-----\nMIIC0zCCAbugAwIBAgICA+gwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwLZXhh\nbXBsZS5jb20wHhcNMjAwNjI2MTIwMzUzWhcNMjEwNjI2MTIwMzUzWjAWMRQwEgYD\nVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\nAN4nnSfTsMEnfPgL7rkbImxZAQoND+bpPoX8q16iXZz3fFfqdRk+uEIpU3Brleeg\np0zrrT2eI3+c2h/PRod0Fam4TO6EcfwuboUFzV3j6yw6aWdfBjWZsWBR/FoqWLYq\nb3UejN7yiTYNSiIy3zVpi9pnFM8N8qT+VGBrRDGef2v9JCzhsSSU7wAYM5HKZTp+\nWHojjiyB2hOYqft7A2WlTEDmHFa5UcPHMRZKATUYI1T2TRVqLlSiE2mJ3dFRXGM2\nZAS33J0NVUjkx3w8RmJ7DNflEFJt/6IXdfaokVgfza7LFarrQFQP/YURXEeJT7jm\nDvKpZ/a8wu3ve6N4ykC+CBsCAwEAAaMrMCkwDwYDVR0TBAgwBgEB/wIBADAWBgNV\nHREEDzANggtleGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAovxY5lm89Eod\nL8CH3dZzIH7nv8MXtwgpv2vth4PDq2btLS8xrqm2SsA/cV+DsbDjh5CxQLoDX+8V\ng8NtY+ipOE0hdJAUo7UVlsxuAY4frkmLL1/RwpjZg+Z2NAxpR7xGWgoMn7CH481w\nAOBypAuCxcfcyyAOttdS+YMRJnpL6z8/C3W0LGkNOs26Qhu1/U8lfz1f9F4XummD\nu2SCmJsAd1PrL1shsyh4HtmFjuY698aTjYUDUleAnx7ytrGlZuLOIeoQi7tcsLJJ\nTPMbxTLgGN2HEkdJerFRBNViuWvqioEyYlzZ3MshOCR2wsL4wrXrCF0Y3cNOYcIh\nZ8z+wUAP2g==\n-----END CERTIFICATE-----\n",
          )
          print(ca_certificate.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	caCertificate, err := client.CDN.TrustedCaCertificates.New(context.TODO(), cdn.TrustedCaCertificateNewParams{
          		Name:           "Example CA cert",
          		SslCertificate: "-----BEGIN CERTIFICATE-----\nMIIC0zCCAbugAwIBAgICA+gwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwLZXhh\nbXBsZS5jb20wHhcNMjAwNjI2MTIwMzUzWhcNMjEwNjI2MTIwMzUzWjAWMRQwEgYD\nVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\nAN4nnSfTsMEnfPgL7rkbImxZAQoND+bpPoX8q16iXZz3fFfqdRk+uEIpU3Brleeg\np0zrrT2eI3+c2h/PRod0Fam4TO6EcfwuboUFzV3j6yw6aWdfBjWZsWBR/FoqWLYq\nb3UejN7yiTYNSiIy3zVpi9pnFM8N8qT+VGBrRDGef2v9JCzhsSSU7wAYM5HKZTp+\nWHojjiyB2hOYqft7A2WlTEDmHFa5UcPHMRZKATUYI1T2TRVqLlSiE2mJ3dFRXGM2\nZAS33J0NVUjkx3w8RmJ7DNflEFJt/6IXdfaokVgfza7LFarrQFQP/YURXEeJT7jm\nDvKpZ/a8wu3ve6N4ykC+CBsCAwEAAaMrMCkwDwYDVR0TBAgwBgEB/wIBADAWBgNV\nHREEDzANggtleGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAovxY5lm89Eod\nL8CH3dZzIH7nv8MXtwgpv2vth4PDq2btLS8xrqm2SsA/cV+DsbDjh5CxQLoDX+8V\ng8NtY+ipOE0hdJAUo7UVlsxuAY4frkmLL1/RwpjZg+Z2NAxpR7xGWgoMn7CH481w\nAOBypAuCxcfcyyAOttdS+YMRJnpL6z8/C3W0LGkNOs26Qhu1/U8lfz1f9F4XummD\nu2SCmJsAd1PrL1shsyh4HtmFjuY698aTjYUDUleAnx7ytrGlZuLOIeoQi7tcsLJJ\nTPMbxTLgGN2HEkdJerFRBNViuWvqioEyYlzZ3MshOCR2wsL4wrXrCF0Y3cNOYcIh\nZ8z+wUAP2g==\n-----END CERTIFICATE-----\n",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", caCertificate.ID)
          }
  /cdn/sslCertificates/{id}:
    get:
      operationId: get-trusted-ca-certificate-details
      tags:
      - CA certificates
      summary: Get trusted CA certificate details
      parameters:
      - name: id
        in: path
        description: CA certificate ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ssl_ca_response'
      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
          )
          ca_certificate = client.cdn.trusted_ca_certificates.get(
              0,
          )
          print(ca_certificate.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	caCertificate, err := client.CDN.TrustedCaCertificates.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", caCertificate.ID)
          }
    put:
      operationId: change-trusted-ca-certificate
      tags:
      - CA certificates
      summary: Change trusted CA certificate
      parameters:
      - name: id
        in: path
        description: CA certificate ID.
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ssl_ca_change'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ssl_ca_response'
      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
          )
          ca_certificate = client.cdn.trusted_ca_certificates.replace(
              id=0,
              name="Example CA cert 2",
          )
          print(ca_certificate.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	caCertificate, err := client.CDN.TrustedCaCertificates.Replace(
          		context.TODO(),
          		0,
          		cdn.TrustedCaCertificateReplaceParams{
          			Name: "Example CA cert 2",
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", caCertificate.ID)
          }
    delete:
      operationId: delete-trusted-ca-certificate
      tags:
      - CA certificates
      summary: Delete trusted CA certificate
      parameters:
      - name: id
        in: path
        description: CA certificate ID.
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successful.
      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
          )
          client.cdn.trusted_ca_certificates.delete(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.TrustedCaCertificates.Delete(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/statistics/series:
    get:
      operationId: cdn-resource-statistics
      tags:
      - Statistics
      summary: CDN resource statistics
      description: Get CDN resources statistics for up to 365 days starting today.
      parameters:
      - $ref: '#/components/parameters/service'
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/granularity'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/group_by'
      - $ref: '#/components/parameters/countries'
      - $ref: '#/components/parameters/regions'
      - $ref: '#/components/parameters/resource'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSeriesResponse'
        '204':
          description: There is no data for the requested time period.
        '400':
          description: Bad Request. Required parameter is missing.
        '401':
          description: Unauthorized. Provided credentials are invalid or your API token has expired.
        '403':
          description: Forbidden. Access denied. You do not have enough rights.
        '500':
          description: Server errors. Something is wrong on our side.
      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
          )
          resource_usage_stats = client.cdn.statistics.get_resource_usage_series(
              from_="from",
              granularity="granularity",
              metrics="metrics",
              service="service",
              to="to",
          )
          print(resource_usage_stats._1_example)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	resourceUsageStats, err := client.CDN.Statistics.GetResourceUsageSeries(context.TODO(), cdn.StatisticGetResourceUsageSeriesParams{
          		From:        "from",
          		Granularity: "granularity",
          		Metrics:     "metrics",
          		Service:     "service",
          		To:          "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", resourceUsageStats.Number1Example)
          }
  /cdn/statistics/aggregate/stats:
    get:
      operationId: aggregated-statistics
      tags:
      - Statistics
      summary: Aggregated statistics
      description: |-
        Get aggregated CDN resources statistics.

        Request URL parameters should be added as a query string after the endpoint.

        Aggregated data does not include data for the last two hours.
      parameters:
      - $ref: '#/components/parameters/service'
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/metrics_aggregated'
      - $ref: '#/components/parameters/group_by'
      - $ref: '#/components/parameters/regions'
      - $ref: '#/components/parameters/countries'
      - $ref: '#/components/parameters/resource'
      - $ref: '#/components/parameters/flat'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAggregatedCDNStatisticsResponse'
        '204':
          description: There is no data for the requested time period.
        '400':
          description: Bad Request. Required parameter is missing.
        '401':
          description: Unauthorized. Provided credentials are invalid or your API token has expired.
        '403':
          description: Forbidden. Access denied. You do not have enough rights.
        '500':
          description: Server errors. Something is wrong on our side.
      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
          )
          resource_aggregated_stats = client.cdn.statistics.get_resource_usage_aggregated(
              from_="from",
              metrics="metrics",
              service="service",
              to="to",
          )
          print(resource_aggregated_stats.max_bandwidth)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	resourceAggregatedStats, err := client.CDN.Statistics.GetResourceUsageAggregated(context.TODO(), cdn.StatisticGetResourceUsageAggregatedParams{
          		From:    "from",
          		Metrics: "metrics",
          		Service: "service",
          		To:      "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", resourceAggregatedStats.MaxBandwidth)
          }
  /cdn/statistics/shield_usage/series:
    get:
      operationId: origin-shielding-usage-statistics
      tags:
      - Statistics
      summary: Origin shielding usage statistics
      description: |-
        Get origin shielding usage statistics for up to 365 days starting from today.

        Request URL parameters should be added as a query string after the endpoint.
      parameters:
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/resource'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaidFeaturesSeriesStat'
      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
          )
          usage_series_stats = client.cdn.statistics.get_shield_usage_series(
              from_="from",
              to="to",
          )
          print(usage_series_stats)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	usageSeriesStats, err := client.CDN.Statistics.GetShieldUsageSeries(context.TODO(), cdn.StatisticGetShieldUsageSeriesParams{
          		From: "from",
          		To:   "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", usageSeriesStats)
          }
  /cdn/statistics/shield_usage/aggregated:
    get:
      operationId: aggregated-origin-shielding-usage-statistics
      tags:
      - Statistics
      summary: Aggregated origin shielding usage statistics
      description: |-
        The number of CDN resources that use origin shielding.

        Request URL parameters should be added as a query string after the endpoint.
      parameters:
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/group_by_aggregated'
      - $ref: '#/components/parameters/resource'
      - $ref: '#/components/parameters/flat'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetShieldUsageAggregatedStat'
        '204':
          description: There is no data for the requested time period.
      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
          )
          shield_aggregated_stats = client.cdn.statistics.get_shield_usage_aggregated(
              from_="from",
              to="to",
          )
          print(shield_aggregated_stats._1_example)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	shieldAggregatedStats, err := client.CDN.Statistics.GetShieldUsageAggregated(context.TODO(), cdn.StatisticGetShieldUsageAggregatedParams{
          		From: "from",
          		To:   "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", shieldAggregatedStats.Number1Example)
          }
  /cdn/statistics/raw_logs_usage/series:
    get:
      operationId: raw-logs-usage-statistics
      tags:
      - Statistics
      summary: Logs uploader usage statistics
      description: |-
        Get Logs uploader usage statistics for up to 90 days starting today.

        Request URL parameters should be added as a query string after the endpoint.
      parameters:
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/resource'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaidFeaturesSeriesStat'
      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
          )
          usage_series_stats = client.cdn.statistics.get_logs_usage_series(
              from_="from",
              to="to",
          )
          print(usage_series_stats)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	usageSeriesStats, err := client.CDN.Statistics.GetLogsUsageSeries(context.TODO(), cdn.StatisticGetLogsUsageSeriesParams{
          		From: "from",
          		To:   "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", usageSeriesStats)
          }
  /cdn/statistics/raw_logs_usage/aggregated:
    get:
      operationId: aggregated-raw-logs-usage-statistics
      tags:
      - Statistics
      summary: Aggregated Logs uploader usage statistics
      description: |-
        Get the number of CDN resources that used Logs uploader.

        Request URL parameters should be added as a query string after the endpoint.
      parameters:
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/group_by_aggregated'
      - $ref: '#/components/parameters/resource'
      - $ref: '#/components/parameters/flat'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRawLogsAggregatedStat'
        '204':
          description: There is no data for the requested time period.
      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
          )
          logs_aggregated_stats = client.cdn.statistics.get_logs_usage_aggregated(
              from_="from",
              to="to",
          )
          print(logs_aggregated_stats._1_example)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	logsAggregatedStats, err := client.CDN.Statistics.GetLogsUsageAggregated(context.TODO(), cdn.StatisticGetLogsUsageAggregatedParams{
          		From: "from",
          		To:   "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", logsAggregatedStats.Number1Example)
          }
  /cdn/statistics/aliases_usage/aggregated:
    get:
      operationId: aggregated-aliases-usage-statistics
      tags:
      - Statistics
      summary: Aggregated alias usage statistics
      description: |-
        Get the number of aliases in use.

        Request URL parameters should be added as a query string after the endpoint.

        The requested period is always expanded to whole calendar months, so a request for part of a
        month returns the count for its entire containing month.
      parameters:
      - $ref: '#/components/parameters/from-2'
      - $ref: '#/components/parameters/to-2'
      - $ref: '#/components/parameters/group_by_aggregated'
      - $ref: '#/components/parameters/resource'
      - $ref: '#/components/parameters/flat'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAliasUsageAggregatedStat'
        '204':
          description: There is no data for the requested time period.
      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
          )
          alias_aggregated_stats = client.cdn.statistics.get_alias_usage_aggregated(
              from_="from",
              to="to",
          )
          print(alias_aggregated_stats._1_example)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	aliasAggregatedStats, err := client.CDN.Statistics.GetAliasUsageAggregated(context.TODO(), cdn.StatisticGetAliasUsageAggregatedParams{
          		From: "from",
          		To:   "to",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", aliasAggregatedStats.Number1Example)
          }
  /cdn/advanced/v1/capacity:
    get:
      operationId: get-network-capacity
      tags:
      - Statistics
      summary: Get network capacity
      description: Get network capacity per country.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetNetworkCapacity'
      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
          )
          network_capacity = client.cdn.network_capacity.list()
          print(network_capacity)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	networkCapacity, err := client.CDN.NetworkCapacity.List(context.TODO())
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", networkCapacity)
          }
  /cdn/advanced/v1/metrics:
    post:
      operationId: get-cdn-metrics
      tags:
      - Statistics
      summary: Get CDN metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedMetricsRequest'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedMetricsResponse'
        '400':
          description: Request body contains invalid parameters or values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedMetricsErrBadResponse'
        '500':
          description: Failed to get CDN metrics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedMetricsErrResponse'
      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_metrics = client.cdn.metrics.list(
              from_="2021-06-14T00:00:00Z",
              metrics=["edge_status_2xx", "edge_status_3xx", "edge_status_4xx", "edge_status_5xx"],
              to="2021-06-15T00:00:00Z",
          )
          print(cdn_metrics.data)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	cdnMetrics, err := client.CDN.Metrics.List(context.TODO(), cdn.MetricListParams{
          		From:    "2021-06-14T00:00:00Z",
          		Metrics: []string{"edge_status_2xx", "edge_status_3xx", "edge_status_4xx", "edge_status_5xx"},
          		To:      "2021-06-15T00:00:00Z",
          	})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", cdnMetrics.Data)
          }
  /cdn/advanced/v2/query:
    post:
      operationId: playground
      tags:
      - Advanced analytics
      summary: Playground
      description: |-
        You can explore the advanced analytics API via playground available at https://api.gcore.com/cdn/advanced/v2.

        With the playground you can:
        - Test your queries.
        - Check API schema (by expanding the Documentation Explorer in the left sidebar).

        Before using the playground, make sure that you are authenticated correctly by providing the Authorization
        header with a valid token into the Headers section of the playground.
        For more information about authentication, see the [Authentication](/api-reference/overview#authentication) section.
      responses:
        '200':
          description: Successful.
          content:
            text/html:
              schema:
                type: string
  /cdn/resources/{resource_id}/shielding_v2:
    get:
      operationId: get-origin-shielding-details
      tags:
      - Origin shielding
      summary: Get origin shielding details
      description: Get information about origin shielding.
      parameters:
      - in: path
        name: resource_id
        description: CDN resource ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginShielding'
      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
          )
          origin_shielding = client.cdn.cdn_resources.shield.get(
              0,
          )
          print(origin_shielding.shielding_pop)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	originShielding, err := client.CDN.CDNResources.Shield.Get(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", originShielding.ShieldingPop)
          }
    put:
      operationId: change-origin-shielding
      tags:
      - Origin shielding
      summary: Change origin shielding
      description: Change origin shielding settings or disabled origin shielding.
      parameters:
      - in: path
        name: resource_id
        description: CDN resource ID.
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OriginShielding'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeOriginShieldingResponse'
        '400':
          description: Failed to change the origin shielding.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ShieldingPopNotExistsError'
                - $ref: '#/components/schemas/JSONParseError'
      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
          )
          origin_shielding_replaced = client.cdn.cdn_resources.shield.replace(
              resource_id=0,
          )
          print(origin_shielding_replaced)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	originShieldingReplaced, err := client.CDN.CDNResources.Shield.Replace(
          		context.TODO(),
          		0,
          		cdn.CDNResourceShieldReplaceParams{
          			OriginShielding: cdn.OriginShieldingParam{},
          		},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", originShieldingReplaced)
          }
  /cdn/shieldingpop_v2:
    get:
      operationId: get-origin-shielding-locations
      tags:
      - Origin shielding
      summary: Get origin shielding locations
      description: Get information about all origin shielding locations available in the account.
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetShieldingPOPV2'
      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
          )
          page = client.cdn.shielding_location.list()
          page = page.results[0]
          print(page.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	page, err := client.CDN.ShieldingLocation.List(context.TODO(), cdn.ShieldingLocationListParams{})
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", page)
          }
  /cdn/resources/{resource_id}/ssl/le/pre-validate:
    post:
      operationId: pre-validate-cdn-resources-before-issuing-lets-encrypt-certificate
      tags:
      - Let's Encrypt certificates
      summary: Pre-validate CDN resource before issuing Let's Encrypt certificate
      description: Check whether a Let's Encrypt certificate can be issued for the CDN resource.
      parameters:
      - in: path
        name: resource_id
        description: CDN resource ID.
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: Successful.
        '400':
          description: Failed to validate the CDN resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LECertificatePreValidationError'
      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
          )
          client.cdn.cdn_resources.prevalidate_ssl_le_certificate(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.CDNResources.PrevalidateSslLeCertificate(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/sslData/{cert_id}/force-retry:
    post:
      operationId: force-retry-issuance-of-lets-encrypt-certificate
      tags:
      - Let's Encrypt certificates
      summary: Force retry issuance of Let's Encrypt certificate
      description: Force retry issuance of Let's Encrypt certificate if the previous attempt was failed.
      parameters:
      - in: path
        name: cert_id
        description: Let's Encrypt certificate ID.
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: Successful. Issuing process has been started.
        '400':
          description: Failed to start issuance process.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/LECertificateIsNotAttachedToResourceError'
                - $ref: '#/components/schemas/NotLECertificateForceRetryError'
                - $ref: '#/components/schemas/LECertificateIssuingInProgressForceRetryError'
                - $ref: '#/components/schemas/NotActiveLECertificateIssueRequestForceRetryError'
        '429':
          description: You have exceeded number of allowed force retry requests for your certificate.
      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
          )
          client.cdn.certificates.force_retry(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.Certificates.ForceRetry(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/sslData/{cert_id}/renew:
    post:
      operationId: renew-lets-encrypt-certificate
      tags:
      - Let's Encrypt certificates
      summary: Renew Let's Encrypt certificate
      description: Renew free Let's Encrypt certificate for the CDN resource. It can take up to fifteen minutes.
      parameters:
      - in: path
        name: cert_id
        description: Let's Encrypt certificate ID.
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: Successful. Renewal process has been started.
        '400':
          description: Failed to renew Let's Encrypt certificate.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/LECertificateIsNotAttachedToResourceError'
                - $ref: '#/components/schemas/NotLECertificateSelectedError'
                - $ref: '#/components/schemas/LECertificateIsIssuingError'
      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
          )
          client.cdn.certificates.renew(
              0,
          )
      - lang: Go
        source: |
          package main

          import (
          	"context"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	err := client.CDN.Certificates.Renew(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          }
  /cdn/sslData/{cert_id}/status:
    get:
      operationId: get-lets-encrypt-certificate-issuing-details
      tags:
      - Let's Encrypt certificates
      summary: Get Let's Encrypt certificate issuing details
      description: Get details about the latest Let's Encrypt certificate issuing attempt for the CDN resource. Returns attempts in all statuses.
      parameters:
      - in: path
        name: cert_id
        description: Let's Encrypt certificate ID.
        required: true
        schema:
          type: integer
      - in: query
        name: exclude
        description: Listed fields will be excluded from the response.
        required: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LERequestStatusV2'
        '400':
          description: Failed to provide Let's encrypt certificate issuing details.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/LECertificateIsNotAttachedToResourceError'
                - $ref: '#/components/schemas/LECertificateIssuingNotStartedYetError'
                - $ref: '#/components/schemas/NotLECertificateStatusError'
      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
          )
          ssl_request_status = client.cdn.certificates.get_status(
              cert_id=0,
          )
          print(ssl_request_status.id)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/cdn"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	sslRequestStatus, err := client.CDN.Certificates.GetStatus(
          		context.TODO(),
          		0,
          		cdn.CertificateGetStatusParams{},
          	)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", sslRequestStatus.ID)
          }
  /cdn/sslData/{cert_id}/usage:
    get:
      operationId: get-ssl-certificate-usage
      tags:
      - SSL certificates
      summary: Get SSL certificate usage
      description: |-
        Get list of CDN resources and aliases that are using this SSL certificate.

        This endpoint is useful to check which resources and aliases depend on a certificate
        before renewing, modifying, or deleting it.
      parameters:
      - in: path
        name: cert_id
        description: SSL certificate ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSLCertificateUsage'
              example:
                resources:
                - id: 101
                  cname: api.example.com
                  status: active
                - id: 102
                  cname: app.example.com
                  status: active
                aliases:
                - id: 201
                  cname: shop.example.com
                  status: active
        '404':
          description: Certificate not found.
      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
          )
          ssl_certificate_usage = client.cdn.certificates.get_usage(
              0,
          )
          print(ssl_certificate_usage.aliases)
      - lang: Go
        source: |
          package main

          import (
          	"context"
          	"fmt"

          	"github.com/G-Core/gcore-go"
          	"github.com/G-Core/gcore-go/option"
          )

          func main() {
          	client := gcore.NewClient(
          		option.WithAPIKey("My API Key"),
          	)
          	sslCertificateUsage, err := client.CDN.Certificates.GetUsage(context.TODO(), 0)
          	if err != nil {
          		panic(err.Error())
          	}
          	fmt.Printf("%+v\n", sslCertificateUsage.Aliases)
          }
  /cdn/resources/{id}:
    patch:
      operationId: issue-lets-encrypt-certificate
      tags:
      - Let's Encrypt certificates
      summary: Issue Let's Encrypt certificate
      parameters:
      - in: path
        name: id
        description: CDN resource ID.
        required: true
        schema:
          type: integer
      description: |-
        Issue free Let's Encrypt certificate for the CDN resource.

        Before issuing the certificate, you need to:
        - Delegate your domain to our name servers, if the CDN resource accelerates the entire site.
        - Specify all CNAMEs in the personal zone, if the CDN resource accelerates only static resources.
        - Create a Let's Encrypt certificate as described [here](/api-reference/cdn/ssl-certificates/add-ssl-certificate).

        Let's Encrypt certificates will be issued for all CNAMEs of the CDN resource.
        Certificate issuing can take up to fifteen minutes.

        By default, we issue an ECDSA Let's Encrypt certificate.
        If you need a **RSA** certificate, you can [enable](/api-reference/cdn/cdn-resources/change-cdn-resource) the "use_rsa_le_cert" option for your CDN resource.

        **Notes:**

        - When a certificate is issued, it will be applied to the CDN resource and HTTPS will be enabled automatically.
        - Let's Encrypt certificate will be automatically renewed before the expiration date.
        - Let's Encrypt certificate will be automatically updated and applied when deleting or adding additional CNAMEs of the CDN resource.

        **Challenge types:**

        By default, we issue Let's Encrypt certificates using the **HTTP-01** challenge.

        If you prefer to use **DNS-01** challenge, you can enable the "use_dns01_le_challenge" option for your CDN resource.
        Read more about [challenge types][1].

        To issue Let's Encrypt certificate using the **DNS-01** challenge the steps below should be done before request issuance:
        1. The DNS service is activated.
        2. `use_dns01_le_challenge` [option](/api-reference/cdn/cdn-resources/change-cdn-resource) is enabled.
        3. `_acme-challenge` subdomain or resource's domain is delegated to our nameservers.
        To find out the nameservers for your account, use the GET request `/dns/v2/platform/info`.
        Use retrieved `name_server_1` and `name_server_2` values from the settings object to create NS records.

          [1]: https://letsencrypt.org/docs/challenge-types/
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachLECert'
      responses:
        '200':
          description: Successful.
        '400':
          description: Failed to issue the Let's Encrypt certificate.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/LetsEncryptCertificateAlreadyAttached'
                - $ref: '#/components/schemas/WildcardResourceCnameSSLLEError'
  /cdn/resources/{res_id}:
    patch:
      operationId: revoke-lets-encrypt-certificate
      tags:
      - Let's Encrypt certificates
      summary: Revoke Let's Encrypt certificate
      description: |-
        Revoke Let's Encrypt certificate for the CDN resource.

        A revoked certificate can be reused for a this or another CDN resource.
      parameters:
      - in: path
        name: res_id
        description: CDN resource ID.
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeLECert'
      responses:
        '200':
          description: Successful.
components:
  parameters:
    ID:
      name: log_id
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/ID'
    accept:
      name: Accept
      in: header
      description: |-
        Content negotiation header.
        Defaults to `application/json` if not provided.
      required: false
      schema:
        type: string
        enum:
        - application/json
        - text/plain
    active:
      in: query
      name: active
      schema:
        type: boolean
      description: |-
        Defines whether a CDN resource is activated.

        Possible values:
        - **true** - CDN resource is activated.
        - **false** - CDN resource is deactivated.
    alias_id_parameter:
      in: path
      name: alias_id
      description: Alias ID.
      required: true
      schema:
        type: integer
    cache_status__eq:
      in: query
      name: cache_status__eq
      schema:
        type: string
      description: 'Caching status. Possible values: ''MISS'', ''BYPASS'', ''EXPIRED'', ''STALE'', ''PENDING'', ''UPDATING'', ''REVALIDATED'', ''HIT'', ''-''.'
    cache_status__in:
      in: query
      name: cache_status__in
      schema:
        type: string
      description: 'List of caching statuses. Possible values: ''MISS'', ''BYPASS'', ''EXPIRED'', ''STALE'', ''PENDING'', ''UPDATING'', ''REVALIDATED'', ''HIT'', ''-''. Values should be separated by a comma.'
    cache_status__ne:
      in: query
      name: cache_status__ne
      schema:
        type: string
      description: 'Caching status not equal to the specified value. Possible values: ''MISS'', ''BYPASS'', ''EXPIRED'', ''STALE'', ''PENDING'', ''UPDATING'', ''REVALIDATED'', ''HIT'', ''-''.'
    cache_status__not_in:
      in: query
      name: cache_status__not_in
      schema:
        type: string
      description: 'List of caching statuses not equal to the specified values. Possible values: ''MISS'', ''BYPASS'', ''EXPIRED'', ''STALE'', ''PENDING'', ''UPDATING'', ''REVALIDATED'', ''HIT'', ''-''. Values should be separated by a comma.'
    client_id:
      name: client_id
      in: query
      schema:
        type: integer
      description: Client ID.
    client_ip__eq:
      in: query
      name: client_ip__eq
      schema:
        type: string
      description: IP address of the client who sent the request.
    client_ip__in:
      in: query
      name: client_ip__in
      schema:
        type: string
      description: List of IP addresses of the clients who sent the request.
    client_ip__ne:
      in: query
      name: client_ip__ne
      schema:
        type: string
      description: IP address of the client who did not send the request.
    client_ip__not_in:
      in: query
      name: client_ip__not_in
      schema:
        type: string
      description: List of IP addresses of the clients who did not send the request.
    cname:
      in: query
      name: cname
      schema:
        type: string
      description: Delivery domain (CNAME) of the CDN resource.
    cname__contains:
      in: query
      name: cname__contains
      schema:
        type: string
      description: Part of the custom domain of the requested CDN resource. Minimum length is 3 characters.
    cname__eq:
      in: query
      name: cname__eq
      schema:
        type: string
      description: Custom domain of the requested CDN resource.
    cname__in:
      in: query
      name: cname__in
      schema:
        type: string
      description: List of custom domains of the requested CDN resource. Values should be separated by a comma.
    cname__ne:
      in: query
      name: cname__ne
      schema:
        type: string
      description: Custom domain of the requested CDN resource not equal to the specified value.
    cname__not_in:
      in: query
      name: cname__not_in
      schema:
        type: string
      description: List of custom domains of the requested CDN resource not equal to the specified values. Values should be separated by a comma.
    countries:
      in: query
      name: countries
      schema:
        type: string
      description: |-
        Names of countries for which data should be displayed.
        English short name from [ISO 3166 standard][1] without the definite article ("the") should be used.

          [1]: https://www.iso.org/obp/ui/#search/code/

        To request multiple values, use:
        - &countries=france&countries=denmark
    datacenter__eq:
      in: query
      name: datacenter__eq
      schema:
        type: string
      description: Data center where request was processed.
    datacenter__in:
      in: query
      name: datacenter__in
      schema:
        type: string
      description: List of data centers where request was processed. Values should be separated by a comma.
    datacenter__ne:
      in: query
      name: datacenter__ne
      schema:
        type: string
      description: Data center where request was not processed.
    datacenter__not_in:
      in: query
      name: datacenter__not_in
      schema:
        type: string
      description: List of data centers where request was not processed. Values should be separated by a comma.
    deleted:
      in: query
      name: deleted
      schema:
        type: boolean
      description: |-
        Defines whether a CDN resource has been deleted.

        Possible values:
        - **true** - CDN resource has been deleted.
        - **false** - CDN resource has not been deleted.
    enabled:
      in: query
      name: enabled
      schema:
        type: boolean
      description: |-
        Enables or disables a CDN resource change by a user.

        Possible values:
        - **true** - CDN resource is enabled.
        - **false** - CDN resource is disabled.
    fields:
      in: query
      name: fields
      schema:
        type: string
        default: timestamp,path,method,referer,user_agent,client_ip,status,size,cname,resource_id,cache_status,datacenter,sent_http_content_type,tcpinfo_rtt
      description: |-
        A comma-separated list of returned fields.

        Supported fields are presented in the responses section.

        Example:
          - &fields=timestamp,path,status
    flat:
      in: query
      name: flat
      schema:
        type: boolean
      description: |-
        The way the parameters are arranged in the response.

        Possible values:
        - **true** – Flat structure is used.
        - **false** – Embedded structure is used (default.)
    format:
      name: format
      in: query
      description: |-
        Optional format override.
        When set, this takes precedence over the `Accept` header.
      required: false
      schema:
        type: string
        enum:
        - json
        - plain
    from:
      in: query
      name: from
      schema:
        type: string
      required: true
      description: |-
        Start date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)

        Difference between "from" and "to" cannot exceed 6 hours.

        Examples:
          - &from=2021-06-14T00:00:00Z
          - &from=2021-06-14T00:00:00.000Z
    from-2:
      in: query
      name: from
      schema:
        type: string
      required: true
      description: Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)
    granularity:
      in: query
      name: granularity
      schema:
        type: string
      required: true
      description: |-
        Duration of the time blocks into which the data will be divided.

        Possible values:
        - **1m** - available only for up to 1 month in the past.
        - **5m**
        - **15m**
        - **1h**
        - **1d**
    group_by:
      in: query
      name: group_by
      schema:
        type: string
      description: |-
        Output data grouping.

        Possible values:
        - **resource** – Data is grouped by CDN resources IDs.
        - **region** – Data is grouped by regions of CDN edge servers.
        - **country** – Data is grouped by countries of CDN edge servers.
        - **vhost** – Data is grouped by resources CNAMEs.
        - **`client_country`** - Data is grouped by countries, based on end-users' location.
        - **protocol** - Data is grouped by http protocol version.

        To request multiple values, use:
        - &`group_by`=region&`group_by`=resource
    group_by_aggregated:
      in: query
      name: group_by
      schema:
        type: string
      description: |-
        Output data grouping.

        Possible value:
        - **resource** - Data is grouped by CDN resources.
    is_primary:
      in: query
      name: is_primary
      schema:
        type: boolean
      description: |-
        Filters CDN resources by their primary/alternate relationship. Standalone
        resources — those not linked to another resource, which is the default —
        match neither value and are returned by neither `true` nor `false`.

        Possible values:
        - **true** - CDN resource is a primary resource for one or more alternate resources.
        - **false** - CDN resource is an alternate resource linked to a primary resource.
    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.
    limit-2:
      name: limit
      in: query
      schema:
        type: integer
      description: Maximum number of items in response.
    limit-3:
      in: query
      name: limit
      schema:
        type: integer
        default: 100
        minimum: 1
        maximum: 1000
      description: Maximum number of log records in the response.
    max_created:
      in: query
      name: max_created
      schema:
        type: string
      description: Most recent date of CDN resource creation for which CDN resources should be returned (ISO 8601/RFC 3339 format, UTC.)
    max_requested_at:
      name: max_requested_at
      in: query
      schema:
        type: string
      description: |-
        End of the requested time period (ISO 8601/RFC 3339 format, UTC.)

        You can specify a date with a time separated by a space, or just a date.

        Examples:
        - &`max_requested_at`=2021-05-05 12:00:00
        - &`max_requested_at`=2021-05-05
    max_updated:
      in: query
      name: max_updated
      schema:
        type: string
      description: Most recent date of CDN resource update for which CDN resources should be returned (ISO 8601/RFC 3339 format, UTC.)
    method:
      name: method
      in: query
      schema:
        type: string
      description: |-
        HTTP method type of requests.

        Use upper case only.

        Example:
        - ?method=DELETE
    method__eq:
      in: query
      name: method__eq
      schema:
        type: string
      description: 'Request HTTP method. Possible values: ''CONNECT'', ''DELETE'', ''GET'', ''HEAD'', ''OPTIONS'', ''PATCH'', ''POST'', ''PUT'', ''TRACE''.'
    method__in:
      in: query
      name: method__in
      schema:
        type: string
      description: 'Request HTTP method. Possible values: ''CONNECT'', ''DELETE'', ''GET'', ''HEAD'', ''OPTIONS'', ''PATCH'', ''POST'', ''PUT'', ''TRACE''. Values should be separated by a comma.'
    method__ne:
      in: query
      name: method__ne
      schema:
        type: string
      description: 'Request HTTP method. Possible values: ''CONNECT'', ''DELETE'', ''GET'', ''HEAD'', ''OPTIONS'', ''PATCH'', ''POST'', ''PUT'', ''TRACE''.'
    method__not_in:
      in: query
      name: method__not_in
      schema:
        type: string
      description: 'Request HTTP method. Possible values: ''CONNECT'', ''DELETE'', ''GET'', ''HEAD'', ''OPTIONS'', ''PATCH'', ''POST'', ''PUT'', ''TRACE''. Values should be separated by a comma.'
    metrics:
      in: query
      name: metrics
      schema:
        type: string
      required: true
      description: |-
        Types of statistics data.

        Possible values:
        - **`upstream_bytes`** – Traffic in bytes from an origin server to CDN servers or to origin shielding when used.
        - **`sent_bytes`** – Traffic in bytes from CDN servers to clients.
        - **`shield_bytes`** – Traffic in bytes from origin shielding to CDN servers.
        - **`backblaze_bytes`** - Traffic in bytes from Backblaze origin.
        - **`total_bytes`** – `shield_bytes`, `upstream_bytes` and `sent_bytes` combined.
        - **`cdn_bytes`** – `sent_bytes` and `shield_bytes` combined.
        - **requests** – Number of requests to edge servers.
        - **`responses_2xx`** – Number of 2xx response codes.
        - **`responses_3xx`** – Number of 3xx response codes.
        - **`responses_4xx`** – Number of 4xx response codes.
        - **`responses_5xx`** – Number of 5xx response codes.
        - **`responses_hit`** – Number of responses with the header Cache: HIT.
        - **`responses_miss`** – Number of responses with the header Cache: MISS.
        - **`response_types`** – Statistics by content type. It returns a number of responses for content with different MIME types.
        - **`cache_hit_traffic_ratio`** – Formula: 1 - `upstream_bytes` / `sent_bytes`. We deduct the non-cached traffic from the total traffic amount.
        - **`cache_hit_requests_ratio`** – Formula: `responses_hit` / requests. The share of sending cached content.
        - **`shield_traffic_ratio`** – Formula: (`shield_bytes` - `upstream_bytes`) / `shield_bytes`. The efficiency of the Origin Shielding: how much more traffic is sent from the Origin Shielding than from the origin.
        - **`image_processed`** - Number of images transformed on the Image optimization service.
        - **`request_time`** - Time elapsed between the first bytes of a request were processed and logging after the last bytes were sent to a user.
        - **`upstream_response_time`** - Number of milliseconds it took to receive a response from an origin. If upstream `response_time_` contains several indications for one request (in case of more than 1 origin), we summarize them. In case of aggregating several queries, the average of this amount is calculated.

        Metrics **`upstream_response_time`** and **`request_time`** should be requested separately from other metrics
    metrics_aggregated:
      in: query
      name: metrics
      schema:
        type: string
      required: true
      description: |-
        Types of statistics data.

        Possible values:
        - **`upstream_bytes`** – Traffic in bytes from an origin server to CDN servers or to origin shielding when used.
        - **`sent_bytes`** – Traffic in bytes from CDN servers to clients.
        - **`shield_bytes`** – Traffic in bytes from origin shielding to CDN servers.
        - **`backblaze_bytes`** - Traffic in bytes from Backblaze origin.
        - **`total_bytes`** – `shield_bytes`, `upstream_bytes` and `sent_bytes` combined.
        - **`cdn_bytes`** – `sent_bytes` and `shield_bytes` combined.
        - **requests** – Number of requests to edge servers.
        - **`responses_2xx`** – Number of 2xx response codes.
        - **`responses_3xx`** – Number of 3xx response codes.
        - **`responses_4xx`** – Number of 4xx response codes.
        - **`responses_5xx`** – Number of 5xx response codes.
        - **`responses_hit`** – Number of responses with the header Cache: HIT.
        - **`responses_miss`** – Number of responses with the header Cache: MISS.
        - **`response_types`** – Statistics by content type. It returns a number of responses for content with different MIME types.
        - **`cache_hit_traffic_ratio`** – Formula: 1 - `upstream_bytes` / `sent_bytes`. We deduct the non-cached traffic from the total traffic amount.
        - **`cache_hit_requests_ratio`** – Formula: `responses_hit` / requests. The share of sending cached content.
        - **`shield_traffic_ratio`** – Formula: (`shield_bytes` - `upstream_bytes`) / `shield_bytes`. The efficiency of the Origin Shielding: how much more traffic is sent from the Origin Shielding than from the origin.
        - **`image_processed`** - Number of images transformed on the Image optimization service.
        - **`request_time`** - Time elapsed between the first bytes of a request were processed and logging after the last bytes were sent to a user.
        - **`upstream_response_time`** - Number of milliseconds it took to receive a response from an origin. If upstream `response_time_` contains several indications for one request (in case of more than 1 origin), we summarize them. In case of aggregating several queries, the average of this amount is calculated.
        - **`95_percentile`** - Represents the 95th percentile of network bandwidth usage in bytes per second. This means that 95% of the time, the network resource usage was below this value.
        - **`max_bandwidth`** - The maximum network bandwidth that was used during the selected time represented in bytes per second.
        - **`min_bandwidth`** - The minimum network bandwidth that was used during the selected time represented in bytes per second.

        Metrics **`upstream_response_time`** and **`request_time`** should be requested separately from other metrics
    min_created:
      in: query
      name: min_created
      schema:
        type: string
      description: Earliest date of CDN resource creation for which CDN resources should be returned (ISO 8601/RFC 3339 format, UTC.)
    min_requested_at:
      name: min_requested_at
      in: query
      schema:
        type: string
      description: |-
        Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)

        You can specify a date with a time separated by a space, or just a date.

        Examples:
        - &`min_requested_at`=2021-05-05 12:00:00
        - &`min_requested_at`=2021-05-05
    min_updated:
      in: query
      name: min_updated
      schema:
        type: string
      description: Earliest date of CDN resource update for which CDN resources should be returned (ISO 8601/RFC 3339 format, UTC.)
    name:
      in: query
      name: name
      schema:
        type: string
      description: Name of the CDN resource. Matches partially and is case-insensitive.
    object_id:
      in: path
      name: object_id
      description: ID of the object (CDN resource or rule) the preset is applied to.
      required: true
      schema:
        type: integer
    offset:
      in: query
      name: offset
      schema:
        type: integer
        minimum: 0
      description: Number of items to skip from the beginning of the list.
    offset-2:
      name: offset
      in: query
      schema:
        type: integer
      description: Offset relative to the beginning of activity logs.
    offset-3:
      in: query
      name: offset
      schema:
        type: integer
        default: 0
      description: Number of log records to skip starting from the beginning of the requested period.
    ordering:
      in: query
      name: ordering
      schema:
        type: string
      description: |-
        Sorting rules.

        Possible values:
        - **method** - Request HTTP method.
        - **`client_ip`** - IP address of the client who sent the request.
        - **status** - Status code in the response.
        - **size** - Response size in bytes.
        - **cname** - Custom domain of the requested resource.
        - **`resource_id`** - ID of the requested CDN resource.
        - **`cache_status`** - Caching status.
        - **datacenter** - Data center where request was processed.
        - **timestamp** - Date and time when the request was made.

        Parameter may have multiple values separated by a comma.

        By default, ascending sorting is applied. To sort in descending order, add '-' prefix.

        Example:
          - &ordering=-timestamp,status
    originGroup:
      in: query
      name: originGroup
      schema:
        type: integer
      description: Origin group ID.
    originGroup__in:
      in: query
      name: originGroup__in
      schema:
        type: string
      description: |-
        Origin group IDs. Values should be separated by a comma.

        Example:
        - ?`originGroup__in`=1,2,3
    originProtocol:
      in: query
      name: originProtocol
      schema:
        type: string
        enum:
        - HTTP
        - HTTPS
        - MATCH
      description: Protocol used by CDN servers to request content from an origin source.
    path:
      name: path
      in: query
      schema:
        type: string
      description: Exact URL path.
    preset_id:
      in: path
      name: preset_id
      description: Preset ID.
      required: true
      schema:
        type: integer
    regions:
      in: query
      name: regions
      schema:
        type: string
      description: |-
        Regions for which data is displayed.

        Possible values:
        - **na** – North America
        - **eu** – Europe
        - **cis** – Commonwealth of Independent States
        - **asia** – Asia
        - **au** – Australia
        - **latam** – Latin America
        - **me** – Middle East
        - **africa** - Africa
        - **sa** - South America
    remote_ip_address:
      name: remote_ip_address
      in: query
      schema:
        type: string
      description: Exact IP address from which requests are sent.
    resource:
      in: query
      name: resource
      schema:
        type: integer
      description: |-
        CDN resources IDs by that statistics data is grouped.

        To request multiple values, use:
        - &resource=1&resource=2

        If CDN resource ID is not specified, data related to all CDN resources is returned.
    resource_id:
      in: path
      name: resource_id
      description: CDN resource ID.
      required: true
      schema:
        type: integer
    resource_id__eq:
      in: query
      name: resource_id__eq
      schema:
        type: integer
      description: ID of the requested CDN resource equal to the specified value.
    resource_id__gt:
      in: query
      name: resource_id__gt
      schema:
        type: integer
      description: ID of the requested CDN resource greater than the specified value.
    resource_id__gte:
      in: query
      name: resource_id__gte
      schema:
        type: integer
      description: ID of the requested CDN resource greater than or equal to the specified value.
    resource_id__in:
      in: query
      name: resource_id__in
      schema:
        type: string
      description: List of IDs of the requested CDN resource. Values should be separated by a comma.
    resource_id__lt:
      in: query
      name: resource_id__lt
      schema:
        type: integer
      description: ID of the requested CDN resource less than the specified value.
    resource_id__lte:
      in: query
      name: resource_id__lte
      schema:
        type: integer
      description: ID of the requested CDN resource less than or equal to the specified value.
    resource_id__ne:
      in: query
      name: resource_id__ne
      schema:
        type: integer
      description: ID of the requested CDN resource not equal to the specified value.
    resource_id__not_in:
      in: query
      name: resource_id__not_in
      schema:
        type: string
      description: List of IDs of the requested CDN resource not equal to the specified values. Values should be separated by a comma.
    rule_id:
      in: path
      name: rule_id
      description: Rule ID.
      required: true
      schema:
        type: integer
    rule_template_id:
      in: path
      name: rule_template_id
      description: Rule template ID.
      required: true
      schema:
        type: integer
    rules:
      in: query
      name: rules
      schema:
        type: string
      description: Rule name or pattern.
    secondaryHostnames:
      in: query
      name: secondaryHostnames
      schema:
        type: string
      description: Additional delivery domains (CNAMEs) of the CDN resource.
    service:
      in: query
      name: service
      schema:
        type: string
      required: true
      description: |-
        Service name.

        Possible value:
        - CDN
    shield_dc:
      in: query
      name: shield_dc
      schema:
        type: string
      description: Name of the origin shielding data center location.
    shielded:
      in: query
      name: shielded
      schema:
        type: boolean
      description: |-
        Defines whether origin shielding is enabled for the CDN resource.

        Possible values:
        - **true** - Origin shielding is enabled for the CDN resource.
        - **false** - Origin shielding is disabled for the CDN resource.
    size__eq:
      in: query
      name: size__eq
      schema:
        type: integer
      description: Response size in bytes equal to the specified value.
    size__gt:
      in: query
      name: size__gt
      schema:
        type: integer
      description: Response size in bytes greater than the specified value.
    size__gte:
      in: query
      name: size__gte
      schema:
        type: integer
      description: Response size in bytes greater than or equal to the specified value.
    size__in:
      in: query
      name: size__in
      schema:
        type: string
      description: List of response sizes in bytes. Values should be separated by a comma.
    size__lt:
      in: query
      name: size__lt
      schema:
        type: integer
      description: Response size in bytes less than the specified value.
    size__lte:
      in: query
      name: size__lte
      schema:
        type: integer
      description: Response size in bytes less than or equal to the specified value.
    size__ne:
      in: query
      name: size__ne
      schema:
        type: integer
      description: Response size in bytes not equal to the specified value.
    size__not_in:
      in: query
      name: size__not_in
      schema:
        type: string
      description: List of response sizes in bytes not equal to the specified values. Values should be separated by
    sslData:
      in: query
      name: sslData
      schema:
        type: integer
      description: SSL certificate ID.
    sslData_in:
      in: query
      name: sslData_in
      schema:
        type: integer
      description: |-
        SSL certificates IDs.

        Example:
        - ?`sslData_in`=1643,1644,1652
    sslEnabled:
      in: query
      name: sslEnabled
      schema:
        type: boolean
      description: |-
        Defines whether the HTTPS protocol is enabled for content delivery.

        Possible values:
        - **true** - HTTPS protocol is enabled for CDN resource.
        - **false** - HTTPS protocol is disabled for CDN resource.
    status:
      in: query
      name: status
      schema:
        type: string
        enum:
        - active
        - processed
        - suspended
        - deleted
      description: CDN resource status.
    status__eq:
      in: query
      name: status__eq
      schema:
        type: integer
      description: Status code in the response equal to the specified value.
    status__gt:
      in: query
      name: status__gt
      schema:
        type: integer
      description: Status code in the response greater than the specified value.
    status__gte:
      in: query
      name: status__gte
      schema:
        type: integer
      description: Status code in the response greater than or equal to the specified value.
    status__in:
      in: query
      name: status__in
      schema:
        type: string
      description: List of status codes in the response. Values should be separated by a comma.
    status__lt:
      in: query
      name: status__lt
      schema:
        type: integer
      description: Status code in the response less than the specified value.
    status__lte:
      in: query
      name: status__lte
      schema:
        type: integer
      description: Status code in the response less than or equal to the specified value.
    status__ne:
      in: query
      name: status__ne
      schema:
        type: integer
      description: Status code in the response not equal to the specified value.
    status__not_in:
      in: query
      name: status__not_in
      schema:
        type: string
      description: List of status codes not in the response. Values should be separated by a comma.
    status_code:
      name: status_code
      in: query
      schema:
        type: integer
      description: |-
        Status code returned in the response.

        Specify the first numbers of a status code to get requests for a group of status codes.

        To filter the activity logs by 4xx codes, use:
        - &`status_code`=4 -
    suspend:
      in: query
      name: suspend
      schema:
        type: boolean
      description: |-
        Defines whether the CDN resource was automatically suspended by the system.

        Possible values:
        - **true** - CDN resource is selected for automatic suspension in the next 7 days.
        - **false** - CDN resource is not selected for automatic suspension.
    suspended:
      in: query
      name: suspended
      schema:
        type: boolean
      description: |-
        Defines whether a CDN resource is currently suspended. This reflects the
        resource's suspended state, unlike the `suspend` parameter, which selects
        resources that have a scheduled automatic suspension date.

        Possible values:
        - **true** - CDN resource is currently suspended.
        - **false** - CDN resource is not suspended.
    to:
      in: query
      name: to
      schema:
        type: string
      required: true
      description: |-
        End date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)

        Difference between "from" and "to" cannot exceed 6 hours.

        Examples:
          - &to=2021-06-15T00:00:00Z
          - &to=2021-06-15T00:00:00.000Z
    to-2:
      in: query
      name: to
      schema:
        type: string
      required: true
      description: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
    token_id:
      name: token_id
      in: query
      schema:
        type: integer
      description: Permanent API token ID. Requests made with this token should be displayed.
    user_id:
      name: user_id
      in: query
      schema:
        type: integer
      description: User ID.
    vp_enabled:
      in: query
      name: vp_enabled
      schema:
        type: boolean
      description: |-
        Defines whether the CDN resource is integrated with the Streaming platform.

        Possible values:
        - **true** - CDN resource is used for Streaming platform.
        - **false** - CDN resource is not used for Streaming platform.
    waap_domain_id__isnull:
      in: query
      name: waap_domain_id__isnull
      schema:
        type: boolean
      description: |-
        Filters CDN resources by whether they are linked to a WAAP domain. A CDN
        resource stays linked when WAAP is turned off on it.

        Possible values:
        - **true** - CDN resource is not linked to a WAAP domain.
        - **false** - CDN resource is linked to a WAAP domain.
  schemas:
    ActionType:
      type: string
      description: |-
        Type of change.

        Possible values:
        - **D** - Object is deleted.
        - **C** - Object is created.
        - **U** - Object is updated.
    Actions:
      type: array
      description: State of a requested object before and after the request.
      items:
        type: object
        properties:
          action_type:
            $ref: '#/components/schemas/ActionType'
          state_before_request:
            $ref: '#/components/schemas/StateBeforeRequest'
          state_after_request:
            $ref: '#/components/schemas/StateAfterRequest'
    ActiveInstanceDeletionProhibited:
      title: Cannot delete an active instance.
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: Deletion of an active instance is prohibited. Please deactivate it before attempting deletion.
          example:
          - Deletion of this instance is currently not possible as it is in an active state. Please deactivate it before attempting the deletion request again.
    ActivityLogsDetails:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ID'
        user_id:
          $ref: '#/components/schemas/UserID'
        token_id:
          $ref: '#/components/schemas/TokenID'
        client_id:
          $ref: '#/components/schemas/ClientID'
        requested_at:
          $ref: '#/components/schemas/RequestedAt'
        path:
          $ref: '#/components/schemas/Path'
        remote_ip_address:
          $ref: '#/components/schemas/RemoteIPAddress'
        host:
          $ref: '#/components/schemas/Host'
        method:
          $ref: '#/components/schemas/Method'
        query_params:
          $ref: '#/components/schemas/QueryParams'
        data:
          $ref: '#/components/schemas/Data'
        status_code:
          $ref: '#/components/schemas/StatusCode'
        actions:
          $ref: '#/components/schemas/Actions'
    ActivityLogsPaginatedList:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/Count'
        next:
          $ref: '#/components/schemas/Next'
        previous:
          $ref: '#/components/schemas/Previous'
        results:
          $ref: '#/components/schemas/Results'
    AddSSL:
      oneOf:
      - type: object
        title: Own Certificate
        $ref: '#/components/schemas/CreateSSlPayload'
      - type: object
        title: Let's Encrypt Certificate
        properties:
          name:
            type: string
            description: SSL certificate name. It must be unique.
            example: New Let's Encrypt certificate
          automated:
            type: boolean
            description: Must be **true** to issue certificate automatically.
            example: true
        required:
        - name
        - automated
    AdvancedMetricsErrBadResponse:
      properties:
        status:
          type: integer
          description: Contains HTTP status code.
        message:
          type: string
          description: This message describes error if body in your request is invalid.
      example:
        status: 400
        message: validation failure list:\ngroup_by.0 in body should be one of [resource cname]
    AdvancedMetricsErrResponse:
      properties:
        status:
          type: integer
          description: Contains HTTP status code.
        message:
          type: string
          description: This message describes error.
      example:
        status: 500
        message: Internal Server Error
    AdvancedMetricsRequest:
      type: object
      required:
      - metrics
      - from
      - to
      minProperties: 1
      properties:
        metrics:
          type: array
          minLength: 1
          example:
          - edge_status_2xx
          - edge_status_3xx
          - edge_status_4xx
          - edge_status_5xx
          items:
            type: string
          description: |-
            Possible values:
            - **`edge_bandwidth`** - Bandwidth from client to CDN (bit/s.)
            - **`edge_requests`** - Number of requests per interval (requests/s.)
            - **`edge_requests_total`** - Total number of requests per interval.
            - **`edge_status_1xx`** - Number of 1xx status codes from edge.
            - **`edge_status_200`** - Number of 200 status codes from edge.
            - **`edge_status_204`** - Number of 204 status codes from edge.
            - **`edge_status_206`** - Number of 206 status codes from edge.
            - **`edge_status_2xx`** - Number of 2xx status codes from edge.
            - **`edge_status_301`** - Number of 301 status codes from edge.
            - **`edge_status_302`** - Number of 302 status codes from edge.
            - **`edge_status_304`** - Number of 304 status codes from edge.
            - **`edge_status_3xx`** - Number of 3xx status codes from edge.
            - **`edge_status_400`** - Number of 400 status codes from edge.
            - **`edge_status_401`** - Number of 401 status codes from edge.
            - **`edge_status_403`** - Number of 403 status codes from edge.
            - **`edge_status_404`** - Number of 404 status codes from edge.
            - **`edge_status_416`** - Number of 416 status codes from edge.
            - **`edge_status_429`** - Number of 429 status codes from edge.
            - **`edge_status_4xx`** - Number of 4xx status codes from edge.
            - **`edge_status_500`** - Number of 500 status codes from edge.
            - **`edge_status_501`** - Number of 501 status codes from edge.
            - **`edge_status_502`** - Number of 502 status codes from edge.
            - **`edge_status_503`** - Number of 503 status codes from edge.
            - **`edge_status_504`** - Number of 504 status codes from edge.
            - **`edge_status_505`** - Number of 505 status codes from edge.
            - **`edge_status_5xx`** - Number of 5xx status codes from edge.
            - **`edge_hit_ratio`** - Percent of cache hits (0.0 - 1.0).
            - **`edge_hit_bytes`** - Number of bytes sent back when cache hits.
            - **`origin_bandwidth`** - Bandwidth from CDN to Origin (bit/s.)
            - **`origin_requests`** - Number of requests per interval (requests/s.)
            - **`origin_status_1xx`** - Number of 1xx status from origin.
            - **`origin_status_200`** - Number of 200 status from origin.
            - **`origin_status_204`** - Number of 204 status from origin.
            - **`origin_status_206`** - Number of 206 status from origin.
            - **`origin_status_2xx`** - Number of 2xx status from origin.
            - **`origin_status_301`** - Number of 301 status from origin.
            - **`origin_status_302`** - Number of 302 status from origin.
            - **`origin_status_304`** - Number of 304 status from origin.
            - **`origin_status_3xx`** - Number of 3xx status from origin.
            - **`origin_status_400`** - Number of 400 status from origin.
            - **`origin_status_401`** - Number of 401 status from origin.
            - **`origin_status_403`** - Number of 403 status from origin.
            - **`origin_status_404`** - Number of 404 status from origin.
            - **`origin_status_416`** - Number of 416 status from origin.
            - **`origin_status_429`** - Number of 426 status from origin.
            - **`origin_status_4xx`** - Number of 4xx status from origin.
            - **`origin_status_500`** - Number of 500 status from origin.
            - **`origin_status_501`** - Number of 501 status from origin.
            - **`origin_status_502`** - Number of 502 status from origin.
            - **`origin_status_503`** - Number of 503 status from origin.
            - **`origin_status_504`** - Number of 504 status from origin.
            - **`origin_status_505`** - Number of 505 status from origin.
            - **`origin_status_5xx`** - Number of 5xx status from origin.
            - **`edge_download_speed`** - Download speed from edge in KB/s (includes only requests that status was in the range [200, 300].)
            - **`origin_download_speed`** - Download speed from origin in KB/s (includes only requests that status was in the range [200, 300].)
        from:
          type: string
          example: '2021-06-14T00:00:00Z'
          description: |-
            Beginning period to fetch metrics (ISO 8601/RFC 3339 format, UTC.)

            Examples:
            - 2021-06-14T00:00:00Z
            - 2021-06-14T00:00:00.000Z

            The total number of points, which is determined as the difference between "from" and "to" divided by "granularity", cannot exceed 1440.
            Exception: "speed" metrics are limited to 72 points.
        to:
          type: string
          example: '2021-06-15T00:00:00Z'
          description: |-
            Specifies ending period to fetch metrics (ISO 8601/RFC 3339 format, UTC)

            Examples:
            - 2021-06-15T00:00:00Z
            - 2021-06-15T00:00:00.000Z

            The total number of points, which is determined as the difference between "from" and "to" divided by "granularity", cannot exceed 1440.
            Exception: "speed" metrics are limited to 72 points.
        group_by:
          type: array
          example:
          - cname
          items:
            type: string
          description: |-
            Output data grouping.

            Possible values:
            - **resource** - Data is grouped by CDN resource.
            - **cname** - Data is grouped by common names.
            - **region** – Data is grouped by regions (continents.) Available for "speed" metrics only.
            - **isp** - Data is grouped by ISP names. Available for "speed" metrics only.
        granularity:
          type: string
          default: PT1M
          format: P(n)Y(n)M(n)DT(n)H(n)M)
          example: P1D
          description: |-
            Duration of the time blocks into which the data is divided. The value must correspond to the ISO 8601 period format.

            Examples:
            - P1D
            - PT5M

            Notes:
            - The total number of points, which is determined as the difference between "from" and "to" divided by "granularity", cannot exceed 1440.
            Exception: "speed" metrics are limited to 72 points.
            - For "speed" metrics the value must be a multiple of 5.
        filter_by:
          type: array
          description: Each item represents one filter statement.
          items:
            type: object
            required:
            - field
            - op
            - values
            properties:
              field:
                type: string
                example: resource
                description: |-
                  Defines the parameters by that data can be filtered.

                  Possible values:
                  - **resource** - Data is filtered by CDN resource ID.
                  - **cname** - Data is filtered by common name.
                  - **region** - Data is filtered by region (continent.) Available for "speed" metrics only.
                  - **isp** - Data is filtered by ISP name. Available for "speed" metrics only.
              op:
                type: string
                example: eq
                description: |-
                  Comparison operator to be applied.

                  Possible values:
                  - **in** - 'IN' operator.
                  - **`not_in`** - 'NOT IN' operator.
                  - **gt** - '>' operator.
                  - **gte** - '>=' operator.
                  - **lt** - '<' operator.
                  - **lte** - '<=' operator.
                  - **eq** - '==' operator.
                  - **ne** - '!=' operator.
                  - **like** - 'LIKE' operator.
                  - **`not_like`** - 'NOT LIKE' operator.
              values:
                type: array
                minLength: 1
                description: Contains one or more values to be compared against.
                example:
                - 1234
                items:
                  oneOf:
                  - type: number
                  - type: string
    AdvancedMetricsResponse:
      properties:
        data:
          oneOf:
          - $ref: '#/components/schemas/AdvancedMetricsResponseValues'
          - $ref: '#/components/schemas/AdvancedMetricsResponseGroups'
          description: |-
            If no grouping was requested then "data" holds an array of metric values.
            If at least one field is specified in "group_by" then "data" is an object whose properties are groups, which may include other groups;
            the last group will hold array of metrics values.
      example:
        data:
        - edge_status_2xx: 21095299
          timestamp: 1623159320
        - edge_download_speed:
            0_250k: '0'
            250k_500k: '0'
            500k_750k: '0'
            750k_1M: '0'
            1M_2M: '0.09091'
            2M_3M: '0.1818'
            3M_4M: '0.1818'
            4M+: '0.5455'
          timestamp: 1623159380
    AdvancedMetricsResponseGroupNode:
      description: |-
        Grouped metrics in accordance to "group_by" parameter. Holds either the
        array of metric values for the innermost group, or a nested group object
        when "group_by" specifies more than one field.
      oneOf:
      - $ref: '#/components/schemas/AdvancedMetricsResponseValues'
      - $ref: '#/components/schemas/AdvancedMetricsResponseGroups'
    AdvancedMetricsResponseGroups:
      type: object
      minProperties: 1
      additionalProperties:
        $ref: '#/components/schemas/AdvancedMetricsResponseGroupNode'
      example:
        cdn.example.com:
        - edge_status_2xx: 21095299
          timestamp: 1623159320
        - edge_status_2xx: 62616980
          timestamp: 1623159380
    AdvancedMetricsResponseValues:
      type: array
      description: List of requested metrics sorted by timestamp in ascending order.
      items:
        type: object
        minProperties: 2
        properties:
          timestamp:
            type: integer
            format: int64
            description: Start timestamp of interval.
        additionalProperties:
          description: |-
            Metric value keyed by the requested metric name. A scalar for simple
            metrics, or an object of bucketed values for distribution metrics.
          oneOf:
          - type: number
          - type: object
            additionalProperties:
              type: string
      example:
      - edge_status_2xx: 21095299
        timestamp: 1623159320
      - edge_status_2xx: 62616980
        timestamp: 1623159380
    Alias:
      type: object
      properties:
        id:
          type: integer
          description: Alias ID.
          example: 123
        cname:
          type: string
          description: Alias hostname. Cannot be changed after creation.
          example: shop.example.com
        resource_id:
          type: integer
          description: ID of the CDN resource whose settings the alias is served with. Cannot be changed after creation.
          example: 4567
        automated:
          type: boolean
          description: |-
            How the alias certificate is managed. Can be changed while the alias is served.

            Possible values:
            - `true` – A Let's Encrypt certificate is issued and renewed automatically.
            - `false` – The certificate referenced by `ssl_id`, if any, was added by you.
          example: true
        challenge_type:
          type: string
          nullable: true
          allOf:
          - $ref: '#/components/schemas/AliasChallengeType'
          description: Domain validation method used to issue the Let's Encrypt certificate for the alias. `null` when `automated` is `false`.
        ssl_id:
          type: integer
          nullable: true
          description: ID of the SSL certificate served for the alias.
          example: 890
        active:
          type: boolean
          description: |-
            Whether you have enabled the alias.

            Possible values:
            - `true` – The alias is enabled.
            - `false` – The alias is paused and is not served.
          example: true
        enabled:
          type: boolean
          description: |-
            Whether the alias is enabled by the system. Follows the state of the CDN resource.

            Possible values:
            - `true` – The alias can be served.
            - `false` – The alias is not served because its CDN resource is not active.
          example: true
        status:
          $ref: '#/components/schemas/AliasStatus'
        ssl_status:
          $ref: '#/components/schemas/AliasSslStatus'
        ssl_validity_not_after:
          type: string
          nullable: true
          description: Date and time when the served certificate expires (ISO 8601/RFC 3339 format, UTC). `null` while no certificate is served.
          example: '2027-01-01T10:00:00Z'
        created:
          type: string
          description: Date and time when the alias was created (ISO 8601/RFC 3339 format, UTC).
          example: '2026-09-01T10:00:00Z'
        updated:
          type: string
          description: Date and time when the alias was last changed (ISO 8601/RFC 3339 format, UTC).
          example: '2026-09-01T10:05:00Z'
    AliasBulkItem:
      type: object
      required:
      - cname
      properties:
        cname:
          type: string
          description: Alias hostname.
          example: shop.example.com
        ssl_id:
          type: integer
          nullable: true
          description: ID of your own SSL certificate to serve for the alias. A Let's Encrypt certificate issued for one of your CDN resources cannot be used. Omit it to have a Let's Encrypt certificate issued automatically.
          example: 890
        automated:
          type: boolean
          description: How the alias certificate is managed. Defaults to `true` when `ssl_id` is omitted and to `false` when `ssl_id` is passed.
          example: false
        challenge_type:
          allOf:
          - $ref: '#/components/schemas/AliasChallengeType'
          description: Domain validation method used to issue the Let's Encrypt certificate. Defaults to `dns_01`. Can be passed only when `automated` is `true`.
    AliasBulkItemResult:
      type: object
      properties:
        id:
          type: integer
          description: Alias ID.
          example: 123
        cname:
          type: string
          description: Alias hostname.
          example: shop.example.com
        status:
          $ref: '#/components/schemas/AliasStatus'
        ssl_status:
          $ref: '#/components/schemas/AliasSslStatus'
    AliasCertificateStatus:
      allOf:
      - $ref: '#/components/schemas/LERequestStatusBase'
      - $ref: '#/components/schemas/StandaloneLERequestEvidence'
      - type: object
        properties:
          validation_state:
            type: string
            description: |-
              State of the domain validation for this attempt.

              Possible values:
              - `PENDING` – Validation has not started yet.
              - `AWAITING_CNAME` – Waiting for the CNAME records below to be created.
              - `VALIDATING` – Validation is in progress.
              - `COMPLETED` – Validation succeeded.
              - `FAILED` – Validation did not succeed.
            example: AWAITING_CNAME
          resource:
            type: integer
            nullable: true
            description: Always `null` for an alias.
            example: null
          cname_records:
            type: array
            description: CNAME records to create so Let's Encrypt domain validation can complete for the alias hostname. Empty when the attempt uses `http_01`.
            items:
              $ref: '#/components/schemas/AliasCnameRecord'
    AliasChallengeType:
      type: string
      description: |-
        Domain validation method used to issue the Let's Encrypt certificate for the alias.

        Possible values:
        - `dns_01` – Validation via a CNAME record for `_acme-challenge.<alias hostname>`, shown in `ssl_provisioning.acme_delegation`.
        - `http_01` – Validation via an HTTP request to the alias hostname. The alias hostname must point to your CDN CNAME, shown in `ssl_provisioning.http_validation`. The request is served with the settings of the alias's CDN resource, so they must not block or redirect `/.well-known/acme-challenge/`.
      enum:
      - dns_01
      - http_01
      example: http_01
    AliasCnameRecord:
      type: object
      properties:
        cname_name:
          type: string
          description: Hostname to create the CNAME record for.
          example: _acme-challenge.shop.example.com
        cname_target:
          type: string
          description: Value the CNAME record must point to.
          example: 0a1b2c3d4e5f6789.le-challenges.example.net
    AliasDetail:
      allOf:
      - $ref: '#/components/schemas/Alias'
      - type: object
        properties:
          ssl_provisioning:
            type: object
            nullable: true
            description: DNS record needed for Let's Encrypt domain validation of the alias hostname. It is `null` when `automated` is `false`, and when `challenge_type` is `dns_01` until a delegation record has been prepared for the hostname.
            properties:
              acme_delegation:
                allOf:
                - $ref: '#/components/schemas/AliasCnameRecord'
                description: CNAME record to create so validation can be completed for the hostname. Returned when `challenge_type` is `dns_01`.
              http_validation:
                type: object
                nullable: true
                allOf:
                - $ref: '#/components/schemas/AliasCnameRecord'
                description: CNAME record pointing the alias hostname to your CDN CNAME. Returned when `challenge_type` is `http_01`; `null` until a CDN CNAME is assigned to your account.
                example:
                  cname_name: shop.example.com
                  cname_target: cl-1a2b3c.cdn.example.net
    AliasIdentifier:
      oneOf:
      - type: integer
      - type: string
    AliasListResponse:
      allOf:
      - $ref: '#/components/schemas/PaginatedResponse'
      - type: object
        properties:
          results:
            type: array
            items:
              $ref: '#/components/schemas/Alias'
      example:
        count: 1
        next: null
        previous: null
        results:
        - id: 123
          cname: shop.example.com
          resource_id: 4567
          automated: true
          challenge_type: http_01
          ssl_id: null
          active: true
          enabled: true
          status: http_only
          ssl_status: pending
          ssl_validity_not_after: null
          created: '2026-09-01T10:00:00Z'
          updated: '2026-09-01T10:00:00Z'
    AliasRemoved:
      type: object
      properties:
        id:
          type: integer
          example: 1
        cname:
          type: string
          example: shop.example.com
    AliasSslStatus:
      type: string
      nullable: true
      description: |-
        Outcome of the certificate we manage for the alias.

        Possible values:
        - `pending` – A certificate attempt is in progress, or was stopped by pausing the alias and starts again after it is resumed.
        - `issued` – The latest attempt succeeded.
        - `failed` – The latest attempt ended without a certificate.
        - `null` – No certificate is managed for the alias: the alias uses a certificate you provided, or is automated and has never opened an attempt.
      enum:
      - pending
      - issued
      - failed
      example: issued
    AliasStatus:
      type: string
      description: |-
        Alias status.

        Possible values:
        - `inactive` – The alias or its CDN resource is disabled; the alias is not served.
        - `pending` – The alias configuration has not reached the CDN yet.
        - `http_only` – The alias is served over HTTP only.
        - `active` – The alias is served over HTTP and HTTPS.
      enum:
      - inactive
      - pending
      - http_only
      - active
      example: active
    AliasesAddError:
      title: Bulk validation error
      type: object
      properties:
        errors:
          type: object
          description: Error descriptions per field of the request. `items` holds one object per request item, in request order; an empty object means the item is valid.
          properties:
            resource_id:
              type: array
              items:
                type: string
            items:
              type: array
              items:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
      example:
        errors:
          items:
          - {}
          - cname:
            - Hostname www.example.com already exists.
    AliasesAddPayload:
      type: object
      required:
      - resource_id
      - items
      properties:
        resource_id:
          type: integer
          description: ID of the CDN resource whose settings the aliases are served with.
          example: 4567
        items:
          type: array
          minItems: 1
          maxItems: 1000
          description: Aliases to create.
          items:
            $ref: '#/components/schemas/AliasBulkItem'
    AliasesAddResponse:
      type: object
      properties:
        created:
          type: array
          description: Aliases created by this request.
          items:
            $ref: '#/components/schemas/AliasBulkItemResult'
        exists:
          type: array
          description: Items whose hostname was already an alias of the CDN resource. Nothing was changed for them.
          items:
            $ref: '#/components/schemas/AliasBulkItemResult'
      example:
        created:
        - id: 1
          cname: shop.example.com
          status: pending
          ssl_status: pending
        exists:
        - id: 7
          cname: www.example.com
          status: active
          ssl_status: issued
    AliasesLimitError:
      title: Aliases limit exceeded
      type: object
      properties:
        errors:
          type: array
          description: The aliases limit of your account does not allow the requested number of new aliases.
          items:
            type: string
          example:
          - 'Aliases limit exceeded: limit=100, current=98, requested_new=3.'
    AliasesRemovePayload:
      type: object
      description: Pass exactly one of `ids` or `cnames`.
      properties:
        ids:
          type: array
          minItems: 1
          maxItems: 1000
          description: IDs of the aliases to delete.
          items:
            type: integer
          example:
          - 1
          - 2
          - 3
        cnames:
          type: array
          minItems: 1
          maxItems: 1000
          description: Hostnames of the aliases to delete.
          items:
            type: string
          example:
          - shop.example.com
          - www.example.com
    AliasesRemoveResponse:
      type: object
      properties:
        removed:
          type: array
          description: Aliases deleted by this request.
          items:
            $ref: '#/components/schemas/AliasRemoved'
        not_found:
          type: array
          description: Requested IDs or hostnames that did not match an alias.
          items:
            $ref: '#/components/schemas/AliasIdentifier'
      example:
        removed:
        - id: 1
          cname: shop.example.com
        not_found:
        - www.example.com
    AlibabaRegionItem:
      type: object
      properties:
        id:
          type: integer
          description: Region ID.
        code:
          type: string
          description: Region code.
        name:
          type: string
          description: Region name.
    AppliedPresetFieldsResponse:
      type: object
      description: Preset applied to the object and the list of object fields that are managed by the preset.
      properties:
        id:
          type: integer
          description: ID of the applied preset.
          example: 42
        name:
          type: string
          description: Name of the applied preset.
          example: Static content acceleration
        deletable:
          type: boolean
          description: Defines whether the applied preset can be unapplied from the object by the current user.
          example: true
        fields:
          type: array
          items:
            type: string
          description: Object fields managed by the preset. Option fields are prefixed with `options.`.
          example:
          - options.gzipOn
          - options.browser_cache_settings
    AppliedPresetObjectResponse:
      type: object
      description: A single object the preset is applied to.
      properties:
        preset_id:
          $ref: '#/components/schemas/applied_preset_id'
        object_id:
          $ref: '#/components/schemas/applied_object_id'
      required:
      - preset_id
      - object_id
    AppliedPresetResponse:
      type: object
      properties:
        object_type:
          type: string
          description: Type of objects the preset is applied to.
          example: CDNResource
        object_ids:
          type: array
          items:
            type: integer
          description: IDs of the objects the preset is currently applied to. Empty when the preset is not applied to anything.
          example:
          - 7531
          - 7532
        message:
          type: string
          deprecated: true
          description: |-
            Deprecated. Present only when `object_ids` is empty. Check `object_ids` instead. This field is kept
            for backward compatibility and will be removed in a future version.
          example: You have no presets applied
      required:
      - object_type
      - object_ids
    ApplyPresetRequest:
      type: object
      properties:
        object_id:
          type: integer
          description: ID of the object (CDN resource or rule, according to the preset `object_type`) to apply the preset to.
          example: 7531
      required:
      - object_id
    ApplyPresetResponse:
      type: object
      properties:
        preset_id:
          $ref: '#/components/schemas/applied_preset_id'
        object_id:
          $ref: '#/components/schemas/applied_object_id'
        message:
          type: string
          deprecated: true
          description: |-
            Deprecated. Use `preset_id` and `object_id` instead. This field is kept for backward compatibility
            and will be removed in a future version.
          example: Preset successfully applied
      required:
      - preset_id
      - object_id
    AttachLECert:
      type: object
      properties:
        sslData:
          type: integer
          description: |-
            ID of Let's Encrypt certificate obtained [here](/api-reference/cdn/ssl-certificates/add-ssl-certificate).

            It can be used only with "sslEnabled": true.
          example: 192
        sslEnabled:
          type: boolean
          description: |-
            Defines whether the HTTPS protocol is enabled for CDN resource.

            Possible values:
            - **true** — HTTPS is enabled for the CDN resource. Certificate can be linked.
            - **false** — HTTPS is disabled for the CDN resource. Certificate cannot be linked.
          example: true
      required:
      - sslData
      - sslEnabled
    AuthInvalidValueError:
      title: Auth must be a dictionary
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: array
              items:
                type: string
              description: Auth must be a dictionary.
              example:
              - Invalid data. Expected a dictionary, but got list.
    AuthInvalidWithNoneAuthTypeValueError:
      title: Origin Group has not to auth with "none" auth type
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: array
              items:
                type: string
              description: Origin Group has not to auth with "none" auth type.
              example:
              - 'Origin Group hasn`t to auth with auth type: `none`.'
    AuthRequiredWithAwsSignatureV4ValueError:
      title: Origin Group has to have auth with "awsSignatureV4" auth type
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: array
              items:
                type: string
              description: Origin Group has to have auth with "awsSignatureV4" auth type.
              example:
              - Origin Group has to have auth with `awsSignatureV4` auth type.
    AuthS3AccessKeyIdIsInvalidError:
      title: Auth must have a s3 access key id with 20-25 alpha-numeric characters
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_access_key_id:
                  type: array
                  items:
                    type: string
                  description: The specified s3 access key id is less than 20 characters. Please lengthen the name and try again.
                  example:
                  - Only 20-25 alpha-numeric characters are allowed.
    AuthS3AccessKeyIdIsRequiredError:
      title: Auth must have a s3 access key id
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_access_key_id:
                  type: array
                  items:
                    type: string
                  description: S3 access key id is a mandatory field. Please specify it.
                  example:
                  - This field is required.
    AuthS3AmazonSecretAccessKeyIsInvalidError:
      title: Auth must have a s3 secret access key with 40 alpha-numeric-plus-slash characters
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_secret_access_key:
                  type: array
                  items:
                    type: string
                  description: The specified s3 access key id is not equal 40 characters. Please lengthen the name and try again.
                  example:
                  - Only 40 alpha-numeric-plus-slash characters are allowed.
    AuthS3BucketNameIsRequiredError:
      title: Auth must have a s3 bucket name
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_bucket_name:
                  type: array
                  items:
                    type: string
                  description: S3 bucket name is a mandatory field. Please specify it.
                  example:
                  - This field is required.
    AuthS3OtherSecretAccessKeyIsInvalidError:
      title: Auth must have a s3 secret access key with 20-50 alpha-numeric-plus-slash characters
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_secret_access_key:
                  type: array
                  items:
                    type: string
                  description: The specified s3 access key id is less 20-50 characters. Please lengthen the name and try again.
                  example:
                  - Only 20-50 alpha-numeric-plus-slash characters are allowed.
    AuthS3RegionIsInvalidError:
      title: Auth must have a known s3 region
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_region:
                  type: array
                  items:
                    type: string
                  description: The specified s3 region is not supported. Please use other region and try again.
                  example:
                  - Not support {s3 region}
    AuthS3RegionIsRequiredError:
      title: Auth must have a s3 region
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_region:
                  type: array
                  items:
                    type: string
                  description: S3 secret access key is a mandatory field. Please specify it.
                  example:
                  - This field is required.
    AuthS3SecretAccessKeyIsRequiredError:
      title: Auth must have a s3 secret access key
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_secret_access_key:
                  type: array
                  items:
                    type: string
                  description: S3 secret access key is a mandatory field. Please specify it.
                  example:
                  - This field is required.
    AuthS3StorageHostnameIsRequiredError:
      title: Auth must have a s3 storage hostname
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_storage_hostname:
                  type: array
                  items:
                    type: string
                  description: S3 storage hostname is a mandatory field. Please specify it.
                  example:
                  - This field is required.
    AuthS3TypeIsRequiredError:
      title: Auth must have a s3 type
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_type:
                  type: array
                  items:
                    type: string
                  description: S3 type is a mandatory field. Please specify it.
                  example:
                  - This field is required.
    AuthTypeInvalidValueError:
      title: Auth type must be "none" or "awsSignatureV4"
      type: object
      properties:
        errors:
          type: object
          properties:
            auth_type:
              type: array
              items:
                type: string
              description: Auth type must be "none" or "awsSignatureV4".
              example:
              - 'Invalid value, should be in: [''none'', ''awsSignatureV4'']'
    AwsRegionItem:
      type: object
      properties:
        id:
          type: integer
          description: Region ID.
        code:
          type: string
          description: Region code.
        name:
          type: string
          description: Region name.
    AzureBlobAuthConfig:
      type: object
      properties:
        type:
          type: string
          enum:
          - shared_key
          - sas_token
          description: Authentication type.
        config:
          type: object
          description: Authentication credentials.
          oneOf:
          - type: object
            properties:
              account_key:
                type: string
                description: Azure Blob Storage account key.
                maxLength: 512
            required:
            - account_key
          - type: object
            properties:
              token:
                type: string
                description: Azure Blob Storage SAS token.
                maxLength: 512
            required:
            - token
      required:
      - type
      - config
    AzureBlobAuthConfigResponse:
      type: object
      properties:
        type:
          type: string
          enum:
          - shared_key
          - sas_token
          description: Authentication type.
        config:
          type: object
          description: Authentication credentials. Secret fields are masked with '*****'.
          oneOf:
          - type: object
            properties:
              account_key:
                type: string
                description: Masked secret value.
                example: '*****'
            required:
            - account_key
          - type: object
            properties:
              token:
                type: string
                description: Masked secret value.
                example: '*****'
            required:
            - token
      required:
      - type
      - config
    AzureBlobConfig:
      title: Azure Blob Config
      allOf:
      - $ref: '#/components/schemas/BaseAzureBlobConfig'
      - type: object
        properties:
          auth:
            $ref: '#/components/schemas/AzureBlobAuthConfig'
      required:
      - container_name
      - account_name
      - auth
    AzureBlobConfigResponse:
      title: Azure Blob Config
      allOf:
      - $ref: '#/components/schemas/BaseAzureBlobConfig'
      - type: object
        properties:
          auth:
            $ref: '#/components/schemas/AzureBlobAuthConfigResponse'
    BaseAzureBlobConfig:
      type: object
      properties:
        container_name:
          type: string
          description: Azure Blob Storage container name.
          maxLength: 512
        account_name:
          type: string
          description: Azure Blob Storage account name.
          maxLength: 512
        endpoint:
          type: string
          description: Custom Azure Blob Storage endpoint URL.
          nullable: true
        directory:
          type: string
          description: Directory path within the container.
          nullable: true
          maxLength: 512
    BaseFTPConfig:
      type: object
      properties:
        user:
          type: string
        hostname:
          type: string
        timeout_seconds:
          type: integer
          minimum: 0
          maximum: 300
        directory:
          type: string
          nullable: true
    BaseHTTPAction:
      title: HTTP Action
      type: object
      nullable: true
      properties:
        method:
          type: string
          enum:
          - POST
          - PUT
          default: POST
        url:
          type: string
        headers:
          type: object
          additionalProperties:
            type: string
        timeout_seconds:
          type: integer
          default: 30
        use_compression:
          type: boolean
        response_actions:
          type: array
          items:
            type: object
            properties:
              match_status_code:
                type: integer
              match_payload:
                type: string
              description:
                type: string
              action:
                type: string
                enum:
                - drop
                - retry
                - append
    BaseHTTPAuth:
      title: HTTP Auth
      type: object
      nullable: true
      properties:
        type:
          type: string
          enum:
          - token
        config:
          type: object
          oneOf:
          - $ref: '#/components/schemas/BaseHTTPAuthTokenConfig'
    BaseHTTPAuthTokenConfig:
      title: HTTP Auth Token Config
      type: object
      properties:
        header_name:
          type: string
        token:
          type: string
    BaseS3Config:
      type: object
      properties:
        access_key_id:
          type: string
        secret_access_key:
          type: string
        region:
          type: string
        bucket_name:
          type: string
        directory:
          type: string
          nullable: true
    BaseSLSConfig:
      type: object
      properties:
        endpoint:
          type: string
          description: SLS endpoint. Optional — derived from the region as `{region}.log.aliyuncs.com` when omitted.
          nullable: true
          maxLength: 253
        region:
          type: string
          description: SLS region (e.g. `eu-central-1`).
          maxLength: 255
        project:
          type: string
          description: SLS project name. 3-63 characters; lowercase letters, digits, and hyphens.
        log_store:
          type: string
          description: SLS logstore name. 3-36 characters; lowercase letters, digits, hyphens, and underscores.
        topic:
          type: string
          description: Optional SLS topic (0-128 characters).
          nullable: true
          maxLength: 128
    CDNServiceResponse:
      type: object
      properties:
        id:
          type: integer
          description: Account ID.
          example: 174
        created:
          type: string
          description: Date of the first synchronization with the Platform (ISO 8601/RFC 3339 format, UTC.)
        updated:
          type: string
          description: Date of the last update of information about CDN service (ISO 8601/RFC 3339 format, UTC.)
          example: '2021-06-24T01:57:01.416157Z'
        service:
          $ref: '#/components/schemas/service'
        utilization_level:
          $ref: '#/components/schemas/utilization_level'
        cname:
          type: string
          description: Domain zone to which a CNAME record of your CDN resources should be pointed.
          example: cl-174-example.cdn.example.net
        use_balancer:
          type: boolean
          description: |-
            Defines whether custom balancing is used for content delivery.

            Possible values:
            - **true** - Custom balancing is used for content delivery.
            - **false** - Custom balancing is not used for content delivery.
          example: true
        auto_suspend_enabled:
          type: boolean
          description: |-
            Defines whether resources will be deactivated automatically by inactivity.

            Possible values:
            - **true** - Resources will be deactivated.
            - **false** - Resources will not be deactivated.
          example: true
        cdn_resources_rules_max_count:
          type: integer
          description: Limit on the number of rules for each CDN resource.
          example: 10
    CannotLinkYourSSLCertificate:
      title: Cannot link your SSL certificate
      type: object
      properties:
        errors:
          type: object
          properties:
            sslData:
              type: array
              items:
                type: string
              description: |-
                You cannot link your SSL certificate because a Let's Encrypt certificate issuing attempt is in progress.
                Please wait until the attempt is completed and try again.
              example:
              - You cannot add a certificate because the current issuing attempt is in progress. Please wait until the attempt is completed and try again.
    ChangeAlias:
      type: object
      properties:
        active:
          type: boolean
          description: |-
            Whether the alias is enabled.

            Possible values:
            - `true` – The alias is enabled.
            - `false` – The alias is paused and is not served. Certificate issuance stops, though an attempt already being processed completes.
          example: false
        automated:
          type: boolean
          description: |-
            How the alias certificate is managed. Change it to switch the alias between a Let's Encrypt certificate and your own. Cannot be changed while the alias is paused.

            Possible values:
            - `true` – Switch to a Let's Encrypt certificate. `ssl_id` must be omitted. The current certificate keeps being served until the new one is issued.
            - `false` – Switch to your own certificate. `ssl_id` is required and is served immediately.
          example: true
        challenge_type:
          allOf:
          - $ref: '#/components/schemas/AliasChallengeType'
          description: |-
            Domain validation method used to issue the Let's Encrypt certificate. Available for an alias with `automated` set to `true`, and together with `automated` set to `true` to switch to a Let's Encrypt certificate. Cannot be changed while the alias is paused, or together with `active`.

            While no valid certificate is served, the running issuance attempt is cancelled and a new one is started with the new method. Otherwise the new method is used from the next attempt.
        ssl_id:
          type: integer
          description: ID of your own SSL certificate to serve for the alias instead of the current one. The certificate must cover the alias hostname; a Let's Encrypt certificate issued for one of your CDN resources cannot be used. Available for an alias with `automated` set to `false`, and together with `automated` set to `false` to switch to your own certificate.
          example: 891
    ChangeCDNService:
      type: object
      properties:
        utilization_level:
          $ref: '#/components/schemas/utilization_level'
    ChangeFastedgeSource:
      type: object
      title: FastEdge Source
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/FastedgeConfig'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
      required:
      - origin_type
      - config
    ChangeHostSource:
      type: object
      title: Host Source
      properties:
        source:
          $ref: '#/components/schemas/source'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
      required:
      - source
    ChangeOriginGroup:
      oneOf:
      - type: object
        title: None Auth
        properties:
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_none'
          sources:
            type: array
            items:
              $ref: '#/components/schemas/ChangeSource'
            example:
            - enabled: true
              source: origin.example.org
              backup: false
          path:
            $ref: '#/components/schemas/path'
        required:
        - name
      - type: object
        title: AWS Signature V4
        deprecated: true
        description: '**Deprecated.** To create S3 origins, configure them directly in sources with `origin_type` and `config` instead.'
        properties:
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_aws'
          auth:
            $ref: '#/components/schemas/auth'
          path:
            $ref: '#/components/schemas/path'
    ChangeOriginGroupPut:
      oneOf:
      - type: object
        title: None Auth
        properties:
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_none'
          sources:
            type: array
            items:
              $ref: '#/components/schemas/ChangeSource'
            example:
            - enabled: true
              source: origin.example.org
              backup: false
          path:
            $ref: '#/components/schemas/path'
        required:
        - name
        - use_next
        - sources
      - type: object
        title: AWS Signature V4
        deprecated: true
        description: '**Deprecated.** To create S3 origins, configure them directly in sources with `origin_type` and `config` instead.'
        properties:
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_aws'
          auth:
            $ref: '#/components/schemas/auth'
          path:
            $ref: '#/components/schemas/path'
        required:
        - name
        - use_next
        - auth_type
        - auth
    ChangeOriginGroupPutValidationError:
      oneOf:
      - $ref: '#/components/schemas/OriginGroupNameNotUniqueError'
      - $ref: '#/components/schemas/OriginGroupNameMore255Error'
      - $ref: '#/components/schemas/OriginGroupIsEmptyError'
      - $ref: '#/components/schemas/OriginSourceIsRequiredError'
      - $ref: '#/components/schemas/OriginGroupSourcesLimitEditError'
      - $ref: '#/components/schemas/OriginSourceWithoutSchemaError'
      - $ref: '#/components/schemas/OriginSourceWithoutPathError'
      - $ref: '#/components/schemas/OriginSourceMustBeUniqueError'
      - $ref: '#/components/schemas/OriginSourceForbiddenError'
      - $ref: '#/components/schemas/OriginSourceEqualResourceCnameError'
      - $ref: '#/components/schemas/OriginSourceShouldNotHavePortError'
      - $ref: '#/components/schemas/OriginLastSourceNotBackupError'
      - $ref: '#/components/schemas/SourcesShouldBeEnabledError'
      - $ref: '#/components/schemas/OriginSourceNotResolvedError'
      - $ref: '#/components/schemas/OriginSourceWrongPortError'
      - $ref: '#/components/schemas/OriginSourcePrivateNetworkError'
      - $ref: '#/components/schemas/OriginSourceForbiddenNetworkError'
      - $ref: '#/components/schemas/OriginSourceBadIPError'
      - $ref: '#/components/schemas/OriginSourceInvalidError'
      - $ref: '#/components/schemas/OriginSourceIPv4Error'
      - $ref: '#/components/schemas/AuthTypeInvalidValueError'
      - $ref: '#/components/schemas/AuthInvalidWithNoneAuthTypeValueError'
      - $ref: '#/components/schemas/OriginGroupOriginsForbiddenForPrivateOriginError'
      - $ref: '#/components/schemas/AuthRequiredWithAwsSignatureV4ValueError'
      - $ref: '#/components/schemas/AuthInvalidValueError'
      - $ref: '#/components/schemas/AuthS3TypeIsRequiredError'
      - $ref: '#/components/schemas/AuthS3BucketNameIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AccessKeyIdIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AccessKeyIdIsInvalidError'
      - $ref: '#/components/schemas/AuthS3SecretAccessKeyIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AmazonSecretAccessKeyIsInvalidError'
      - $ref: '#/components/schemas/AuthS3OtherSecretAccessKeyIsInvalidError'
      - $ref: '#/components/schemas/AuthS3RegionIsRequiredError'
      - $ref: '#/components/schemas/AuthS3RegionIsInvalidError'
      - $ref: '#/components/schemas/AuthS3StorageHostnameIsRequiredError'
      - $ref: '#/components/schemas/S3ConfigRequiredError'
      - $ref: '#/components/schemas/S3BucketNameDuplicateError'
      - $ref: '#/components/schemas/S3SourceAmbiguousError'
      - $ref: '#/components/schemas/OriginTypeRequiredForNewS3Error'
      - $ref: '#/components/schemas/S3StorageIdInvalidError'
      - $ref: '#/components/schemas/S3StorageOwnedFieldError'
      - $ref: '#/components/schemas/S3StorageHostHeaderOverrideError'
      - $ref: '#/components/schemas/S3StorageBucketNameInvalidError'
      - $ref: '#/components/schemas/S3StorageBindingError'
      - $ref: '#/components/schemas/S3StorageBindingRetryError'
      - $ref: '#/components/schemas/S3StorageBindingChangedError'
    ChangeOriginGroupValidationError:
      oneOf:
      - $ref: '#/components/schemas/OriginGroupNameNotUniqueError'
      - $ref: '#/components/schemas/OriginGroupNameMore255Error'
      - $ref: '#/components/schemas/OriginGroupIsEmptyError'
      - $ref: '#/components/schemas/OriginSourceIsRequiredError'
      - $ref: '#/components/schemas/OriginGroupSourcesLimitEditError'
      - $ref: '#/components/schemas/OriginSourceWithoutSchemaError'
      - $ref: '#/components/schemas/OriginSourceWithoutPathError'
      - $ref: '#/components/schemas/OriginSourceMustBeUniqueError'
      - $ref: '#/components/schemas/OriginSourceForbiddenError'
      - $ref: '#/components/schemas/OriginSourceEqualResourceCnameError'
      - $ref: '#/components/schemas/OriginSourceShouldNotHavePortError'
      - $ref: '#/components/schemas/OriginLastSourceNotBackupError'
      - $ref: '#/components/schemas/SourcesShouldBeEnabledError'
      - $ref: '#/components/schemas/OriginSourceNotResolvedError'
      - $ref: '#/components/schemas/OriginSourceWrongPortError'
      - $ref: '#/components/schemas/OriginSourcePrivateNetworkError'
      - $ref: '#/components/schemas/OriginSourceForbiddenNetworkError'
      - $ref: '#/components/schemas/OriginSourceBadIPError'
      - $ref: '#/components/schemas/OriginSourceInvalidError'
      - $ref: '#/components/schemas/OriginSourceIPv4Error'
      - $ref: '#/components/schemas/AuthTypeInvalidValueError'
      - $ref: '#/components/schemas/AuthInvalidWithNoneAuthTypeValueError'
      - $ref: '#/components/schemas/OriginGroupOriginsForbiddenForPrivateOriginError'
      - $ref: '#/components/schemas/AuthRequiredWithAwsSignatureV4ValueError'
      - $ref: '#/components/schemas/AuthInvalidValueError'
      - $ref: '#/components/schemas/AuthS3TypeIsRequiredError'
      - $ref: '#/components/schemas/AuthS3BucketNameIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AccessKeyIdIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AccessKeyIdIsInvalidError'
      - $ref: '#/components/schemas/AuthS3SecretAccessKeyIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AmazonSecretAccessKeyIsInvalidError'
      - $ref: '#/components/schemas/AuthS3OtherSecretAccessKeyIsInvalidError'
      - $ref: '#/components/schemas/AuthS3RegionIsRequiredError'
      - $ref: '#/components/schemas/AuthS3RegionIsInvalidError'
      - $ref: '#/components/schemas/AuthS3StorageHostnameIsRequiredError'
      - $ref: '#/components/schemas/S3ConfigRequiredError'
      - $ref: '#/components/schemas/S3BucketNameDuplicateError'
      - $ref: '#/components/schemas/S3SourceAmbiguousError'
      - $ref: '#/components/schemas/OriginTypeRequiredForNewS3Error'
      - $ref: '#/components/schemas/S3StorageIdInvalidError'
      - $ref: '#/components/schemas/S3StorageOwnedFieldError'
      - $ref: '#/components/schemas/S3StorageHostHeaderOverrideError'
      - $ref: '#/components/schemas/S3StorageBucketNameInvalidError'
      - $ref: '#/components/schemas/S3StorageBindingError'
      - $ref: '#/components/schemas/S3StorageBindingRetryError'
      - $ref: '#/components/schemas/S3StorageBindingChangedError'
    ChangeOriginShieldingResponse:
      type: object
      example:
        shielding_pop: 4
    ChangeResource:
      type: object
      properties:
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name-2'
        description:
          $ref: '#/components/schemas/description'
        secondaryHostnames:
          $ref: '#/components/schemas/secondaryHostnames'
        originGroup:
          $ref: '#/components/schemas/originGroup'
        originProtocol:
          $ref: '#/components/schemas/originProtocol'
        sslEnabled:
          $ref: '#/components/schemas/sslEnabled'
        sslData:
          $ref: '#/components/schemas/sslData'
        proxy_ssl_enabled:
          $ref: '#/components/schemas/proxy_ssl_enabled'
        proxy_ssl_ca:
          $ref: '#/components/schemas/proxy_ssl_ca'
        proxy_ssl_data:
          $ref: '#/components/schemas/proxy_ssl_data'
        options:
          type: object
          $ref: '#/components/schemas/resource_options'
      required:
      - originGroup
    ChangeRule:
      type: object
      properties:
        active:
          $ref: '#/components/schemas/active-2'
        name:
          $ref: '#/components/schemas/name-3'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        originGroup:
          $ref: '#/components/schemas/originGroup-2'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
      required:
      - rule
      - ruleType
    ChangeRuleTemplate:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/name-4'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
      required:
      - rule
      - ruleType
    ChangeS3Source:
      type: object
      title: S3 Source
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/S3Config'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
      required:
      - config
    ChangeSource:
      oneOf:
      - $ref: '#/components/schemas/ChangeHostSource'
      - $ref: '#/components/schemas/ChangeS3Source'
      - $ref: '#/components/schemas/ChangeFastedgeSource'
    ClientID:
      type: integer
      description: ID of the client who made the request.
    ClientsMeFeaturesResponse:
      type: object
      properties:
        id:
          type: integer
          description: Account ID.
          example: 100
        paid_features:
          type: array
          description: Paid features available for your account.
          items:
            $ref: '#/components/schemas/paid_feature_item'
        free_features:
          type: array
          description: Free features available for your account.
          items:
            $ref: '#/components/schemas/free_feature_item'
    ClientsMeLimitsResponse:
      type: object
      properties:
        id:
          type: integer
          description: Account ID.
          example: 100
        resources_limit:
          type: integer
          description: Maximum number of CDN resources that can be created on your tariff plan.
          example: 30
        rules_limit:
          type: integer
          description: Maximum number of rules that can be created per CDN resource on your tariff plan.
          example: 5
        origins_in_group_limit:
          type: integer
          description: Maximum number of origins that can be added to the origin group on your tariff plan.
          example: 10
        secondary_hostnames_limit:
          type: integer
          description: Maximum number of secondary hostnames (additional CNAMEs) per CDN resource.
          example: 10
        purge_pattern_limit:
          type: integer
          description: Maximum number of patterns per purge request.
          example: 50
        purge_max_urls_limit:
          type: integer
          description: Maximum number of URLs per purge-by-URL request.
          example: 100
        purge_request_limit:
          type: string
          description: Rate limit for purge-by-pattern requests.
          example: 1/m
        purge_by_urls_request_limit:
          type: string
          description: Rate limit for purge-by-URL requests.
          example: 2/m
        prefetch_pattern_limit:
          type: integer
          description: Maximum number of patterns per prefetch request.
          example: 100
        prefetch_request_limit:
          type: string
          description: Rate limit for prefetch requests.
          example: 2/m
        aliases_limit:
          type: integer
          description: Maximum number of aliases that can be created on your tariff plan.
          example: 100
    CnameAlreadyExistsError:
      title: CNAME already exists
      type: object
      properties:
        errors:
          type: object
          properties:
            cname:
              type: array
              description: The specified CNAME is already used by another resource in our system. Try another CNAME or contact support.
              items:
                type: string
              example:
              - CNAME cdn.example.com already exists. Try another CNAME or contact support.
    CommonValidationError:
      title: Other Errors
      type: object
      properties:
        errors:
          type: object
          description: This object contains error descriptions per field from your request.
          properties:
            field_name:
              type: array
              description: Error list for specific field.
              items:
                type: string
                description: Error description
              example:
              - Error description.
    Count:
      type: integer
      description: Total number of activity logs records.
    CreateAlias:
      type: object
      required:
      - cname
      - resource_id
      properties:
        cname:
          type: string
          description: Alias hostname. Wildcard hostnames are not supported.
          example: shop.example.com
        resource_id:
          type: integer
          description: ID of the CDN resource whose settings the alias is served with.
          example: 4567
        ssl_id:
          type: integer
          nullable: true
          description: |-
            ID of your own SSL certificate to serve for the alias. The certificate must cover the alias hostname. A Let's Encrypt certificate issued for one of your CDN resources cannot be used.

            Omit it to have a Let's Encrypt certificate issued automatically.
          example: 890
        automated:
          type: boolean
          description: |-
            How the alias certificate is managed. Defaults to `true` when `ssl_id` is omitted and to `false` when `ssl_id` is passed.

            Possible values:
            - `true` – A Let's Encrypt certificate is issued and renewed automatically. `ssl_id` must be omitted.
            - `false` – Your own certificate referenced by `ssl_id`, if any, is served.
          example: true
        challenge_type:
          allOf:
          - $ref: '#/components/schemas/AliasChallengeType'
          description: Domain validation method used to issue the Let's Encrypt certificate. Defaults to `dns_01`. Can be passed only when `automated` is `true`.
        active:
          type: boolean
          description: Whether the alias is enabled. Defaults to `true`.
          example: true
    CreateLogsUploaderConfig:
      properties:
        enabled:
          type: boolean
          description: Enables or disables the config.
          default: true
        name:
          type: string
          description: Name of the config.
        policy:
          type: integer
          description: ID of the policy that should be assigned to given config.
        target:
          type: integer
          description: ID of the target to which logs should be uploaded.
        for_all_resources:
          type: boolean
          description: |-
            If set to true, the config will be applied to all CDN resources.
            If set to false, the config will be applied to the resources specified in the `resources` field.
          default: false
        resources:
          type: array
          items:
            type: integer
          description: List of resource IDs to which the config should be applied.
      required:
      - name
      - policy
      - target
    CreateLogsUploaderPolicy:
      type: object
      properties:
        include_empty_logs:
          type: boolean
          description: Include empty logs in the upload.
          default: false
        include_shield_logs:
          type: boolean
          description: Include logs from origin shielding in the upload.
          default: false
        name:
          type: string
          description: Name of the policy.
          maxLength: 255
          default: Policy
        description:
          type: string
          description: Description of the policy.
          maxLength: 255
        retry_interval_minutes:
          type: integer
          description: Interval in minutes to retry failed uploads.
          maximum: 60
          minimum: 5
          default: 60
        rotate_interval_minutes:
          type: integer
          description: Interval in minutes to rotate logs.
          maximum: 60
          minimum: 5
          default: 5
        rotate_threshold_mb:
          type: integer
          description: Threshold in MB to rotate logs.
          minimum: 100
          maximum: 2147483647
          nullable: true
          default: null
        rotate_threshold_lines:
          type: integer
          description: Threshold in lines to rotate logs.
          maximum: 10000
          minimum: 0
          default: 0
        date_format:
          type: string
          description: Date format for logs.
          maxLength: 255
        field_delimiter:
          type: string
          description: Field delimiter for logs.
          maxLength: 10
          default: '"'
        field_separator:
          type: string
          description: Field separator for logs.
          minLength: 1
          maxLength: 10
          default: ' '
        fields:
          type: array
          items:
            type: string
            maxLength: 255
          description: List of fields to include in logs. Duplicate names are allowed for plain text output, but rejected when `format_type` is `json` or a `field_remap` is set (each field becomes a distinct output key).
          default:
          - remote_addr
          - '-'
          - remote_user
          - time_local
          - request
          - status
          - body_bytes_sent
          - http_referer
          - http_user_agent
          - bytes_sent
          - hostname
          - scheme
          - host
          - request_time
          - upstream_response_time
          - request_length
          - http_range
          - dc
          - upstream_cache_status
          - upstream_response_length
          - upstream_addr
          - gcdn_api_client_id
          - gcdn_api_resource_id
          - uid_got
          - uid_set
          - geoip2_country_code
          - geoip2_city
          - shield_type
          - real_server_addr
          - server_port
          - upstream_status
          - '-'
          - upstream_connect_time
          - upstream_header_time
          - shard_addr
          - geoip2_data_asnumber
          - connection
          - connection_requests
          - http_traceparent
          - http_x_forwarded_proto
          - gcdn_internal_status_code
          - ssl_cipher
          - ssl_session_id
          - ssl_session_reused
          - sent_http_content_type
          - real_tcpinfo_rtt
          - server_country_code
          - gcdn_tcpinfo_snd_cwnd
          - gcdn_tcpinfo_total_retrans
          - gcdn_rule_id
        file_name_template:
          type: string
          description: Template for log file name.
          maxLength: 255
          default: '{{YYYY}}/{{MM}}/{{DD}}/{{HH}}/{{mm}}/{{ss}}/{{HOST}}_{{CNAME}}_access.log.gz'
        format_type:
          type: string
          enum:
          - json
          - ''
          description: |-
            Format type for logs.

            Possible values:
            - **""** - empty, it means it will apply the format configurations from the policy.
            - **"json"** - output the logs as json lines.
          maxLength: 255
        tags:
          type: object
          description: Tags allow for dynamic decoration of logs by adding predefined fields to the log format. These tags serve as customizable key-value pairs that can be included in log entries to enhance context and readability.
          additionalProperties:
            type: string
            maxLength: 50
        field_remap:
          type: object
          description: Per-field output-name remap for exported logs. Maps a canonical Gcore field name (from `/cdn/logs_uploader/policies/fields`, and must be present in `fields`) to the field name it should have in the exported logs. Unmapped fields keep their canonical name. Output names (after remapping) must be unique.
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 255
        field_conversions:
          $ref: '#/components/schemas/FieldConversions'
        escape_special_characters:
          type: boolean
          description: |-
            When set to true, the service sanitizes string values by escaping characters that may be unsafe for transport, logging, or downstream processing.

            The following categories of characters are escaped:
            - Control and non-printable characters
            - Quotation marks and escape characters
            - Characters outside the standard ASCII range

            The resulting output contains only printable ASCII characters.
          default: false
        log_sample_rate:
          type: number
          format: float
          description: |-
            Sampling rate for logs. A value between 0 and 1 that determines the fraction of log entries to collect.

            - **1** - collect all logs (default).
            - **0.5** - collect approximately 50% of logs.
            - **0** - collect no logs (effectively disables logging without removing the policy).
          minimum: 0
          maximum: 1
          default: 1
      example:
        include_empty_logs: true
        include_shield_logs: true
        name: Policy
        description: New policy
        retry_interval_minutes: 32
        rotate_interval_minutes: 32
        rotate_threshold_mb: 252
        rotate_threshold_lines: 5000
        date_format: '[02/Jan/2006:15:04:05 -0700]'
        field_delimiter: ','
        field_separator: ;
        fields:
        - remote_addr
        - request_time
        - upstream_cache_status
        file_name_template: '{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz'
        format_type: json
        tags: {}
        field_remap: {}
        field_conversions:
          request_time:
            conversions:
            - type: scale
              config:
                factor: 1000
                precision: 0
                rounding: nearest
          upstream_cache_status:
            conversions:
            - type: replace
              config:
                values:
                  HIT: cached
                  MISS: uncached
                default: other
        log_sample_rate: 1
    CreateLogsUploaderTarget:
      oneOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetS3Gcore'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetS3Amazon'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetS3OSS'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetS3Other'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetS3V1'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetFTP'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetSFTP'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetHTTP'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetAzureBlob'
      - $ref: '#/components/schemas/CreateLogsUploaderTargetSLS'
      discriminator:
        propertyName: storage_type
        mapping:
          s3_gcore: '#/components/schemas/CreateLogsUploaderTargetS3Gcore'
          s3_amazon: '#/components/schemas/CreateLogsUploaderTargetS3Amazon'
          s3_oss: '#/components/schemas/CreateLogsUploaderTargetS3OSS'
          s3_other: '#/components/schemas/CreateLogsUploaderTargetS3Other'
          s3_v1: '#/components/schemas/CreateLogsUploaderTargetS3V1'
          ftp: '#/components/schemas/CreateLogsUploaderTargetFTP'
          sftp: '#/components/schemas/CreateLogsUploaderTargetSFTP'
          http: '#/components/schemas/CreateLogsUploaderTargetHTTP'
          azure_blob: '#/components/schemas/CreateLogsUploaderTargetAzureBlob'
          sls: '#/components/schemas/CreateLogsUploaderTargetSLS'
    CreateLogsUploaderTargetAzureBlob:
      title: Azure Blob Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - azure_blob
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/AzureBlobConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetBase:
      type: object
      properties:
        name:
          type: string
          description: Name of the target.
          maxLength: 255
          default: Target
        description:
          type: string
          description: Description of the target.
          maxLength: 255
    CreateLogsUploaderTargetFTP:
      title: FTP Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - ftp
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/FTPConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetHTTP:
      title: HTTP Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - http
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/HTTPConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetS3Amazon:
      title: S3 Amazon Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_amazon
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3AmazonConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetS3Gcore:
      title: S3 Gcore Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_gcore
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/LogsUploaderS3GcoreTargetConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetS3OSS:
      title: S3 OSS Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_oss
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3OSSConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetS3Other:
      title: S3 Other Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_other
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3OtherConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetS3V1:
      title: S3 V1 Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_v1
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3V1Config'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetSFTP:
      title: SFTP Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - sftp
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/SFTPConfig'
        required:
        - storage_type
        - config
    CreateLogsUploaderTargetSLS:
      title: SLS Target
      allOf:
      - $ref: '#/components/schemas/CreateLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - sls
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/SLSConfig'
        required:
        - storage_type
        - config
    CreateOriginGroup:
      oneOf:
      - type: object
        title: None Auth
        description: Create an origin group with host origins, or mixed host and S3 origins.
        properties:
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_none'
          sources:
            type: array
            items:
              $ref: '#/components/schemas/ChangeSource'
        required:
        - name
        - sources
      - type: object
        title: AWS Signature V4
        deprecated: true
        description: '**Deprecated.** To create S3 origins, configure them directly in sources with `origin_type` and `config` instead.'
        properties:
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_aws'
          auth:
            $ref: '#/components/schemas/auth'
        required:
        - name
        - auth_type
        - auth
    CreateOriginGroupValidationError:
      oneOf:
      - $ref: '#/components/schemas/OriginGroupNameNotUniqueError'
      - $ref: '#/components/schemas/OriginGroupNameMore255Error'
      - $ref: '#/components/schemas/OriginGroupIsEmptyError'
      - $ref: '#/components/schemas/OriginSourceIsRequiredError'
      - $ref: '#/components/schemas/OriginGroupSourcesLimitCreateError'
      - $ref: '#/components/schemas/OriginSourceWithoutSchemaError'
      - $ref: '#/components/schemas/OriginSourceWithoutPathError'
      - $ref: '#/components/schemas/OriginSourceMustBeUniqueError'
      - $ref: '#/components/schemas/OriginSourceForbiddenError'
      - $ref: '#/components/schemas/OriginSourceEqualResourceCnameError'
      - $ref: '#/components/schemas/OriginSourceShouldNotHavePortError'
      - $ref: '#/components/schemas/OriginLastSourceNotBackupError'
      - $ref: '#/components/schemas/SourcesShouldBeEnabledError'
      - $ref: '#/components/schemas/OriginSourceNotResolvedError'
      - $ref: '#/components/schemas/OriginSourceWrongPortError'
      - $ref: '#/components/schemas/OriginSourcePrivateNetworkError'
      - $ref: '#/components/schemas/OriginSourceForbiddenNetworkError'
      - $ref: '#/components/schemas/OriginSourceBadIPError'
      - $ref: '#/components/schemas/OriginSourceInvalidError'
      - $ref: '#/components/schemas/OriginSourceIPv4Error'
      - $ref: '#/components/schemas/AuthTypeInvalidValueError'
      - $ref: '#/components/schemas/AuthInvalidWithNoneAuthTypeValueError'
      - $ref: '#/components/schemas/OriginGroupOriginsForbiddenForPrivateOriginError'
      - $ref: '#/components/schemas/AuthRequiredWithAwsSignatureV4ValueError'
      - $ref: '#/components/schemas/AuthInvalidValueError'
      - $ref: '#/components/schemas/AuthS3TypeIsRequiredError'
      - $ref: '#/components/schemas/AuthS3BucketNameIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AccessKeyIdIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AccessKeyIdIsInvalidError'
      - $ref: '#/components/schemas/AuthS3SecretAccessKeyIsRequiredError'
      - $ref: '#/components/schemas/AuthS3AmazonSecretAccessKeyIsInvalidError'
      - $ref: '#/components/schemas/AuthS3OtherSecretAccessKeyIsInvalidError'
      - $ref: '#/components/schemas/AuthS3RegionIsRequiredError'
      - $ref: '#/components/schemas/AuthS3RegionIsInvalidError'
      - $ref: '#/components/schemas/AuthS3StorageHostnameIsRequiredError'
      - $ref: '#/components/schemas/S3ConfigRequiredError'
      - $ref: '#/components/schemas/S3BucketNameDuplicateError'
      - $ref: '#/components/schemas/S3StorageIdInvalidError'
      - $ref: '#/components/schemas/S3StorageOwnedFieldError'
      - $ref: '#/components/schemas/S3StorageHostHeaderOverrideError'
      - $ref: '#/components/schemas/S3StorageBucketNameInvalidError'
      - $ref: '#/components/schemas/S3StorageBindingError'
      - $ref: '#/components/schemas/S3StorageBindingRetryError'
    CreateResource:
      type: object
      properties:
        cname:
          $ref: '#/components/schemas/cname'
        originGroup:
          $ref: '#/components/schemas/originGroup_create'
        origin:
          $ref: '#/components/schemas/origin'
        active:
          $ref: '#/components/schemas/active'
        originProtocol:
          $ref: '#/components/schemas/originProtocol'
        name:
          $ref: '#/components/schemas/name-2'
        description:
          $ref: '#/components/schemas/description'
        secondaryHostnames:
          $ref: '#/components/schemas/secondaryHostnames'
        sslEnabled:
          $ref: '#/components/schemas/sslEnabled'
        sslData:
          $ref: '#/components/schemas/sslData'
        proxy_ssl_enabled:
          $ref: '#/components/schemas/proxy_ssl_enabled'
        proxy_ssl_ca:
          $ref: '#/components/schemas/proxy_ssl_ca'
        proxy_ssl_data:
          $ref: '#/components/schemas/proxy_ssl_data'
        primary_resource:
          $ref: '#/components/schemas/primary_resource'
        options:
          type: object
          $ref: '#/components/schemas/resource_options'
      required:
      - cname
    CreateRule:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/name-3'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        active:
          $ref: '#/components/schemas/active-2'
        weight:
          $ref: '#/components/schemas/weight'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        originGroup:
          $ref: '#/components/schemas/originGroup-2'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
      required:
      - name
      - rule
      - ruleType
    CreateRuleTemplate:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/name-4'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
      required:
      - rule
      - ruleType
    CreateSSlPayload:
      title: Own Certificate
      properties:
        name:
          type: string
          description: |-
            SSL certificate name.

            It must be unique.
          example: New certificate
        sslCertificate:
          type: string
          description: |-
            Public part of the SSL certificate.

            All chain of the SSL certificate should be added.
          example: |
            -----BEGIN CERTIFICATE-----
            MIIFWzCCBEOgAwIBAgISBK6qoNitg//89H/YJamujpWlMA0GCSqGSIb3DQEBCwUA
            MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
            ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODExMTMxMjQwMDJaFw0x
            OTAyMTExMjQwMDJaMBwxGjAYBgNVBAMTEWNkbjIudG50LWNsdWIuY29tMIIBIjAN
            BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzaHExDEXNSf6ELS0WUR7qq8gs9cc
            xx99sM2zs3Jld0twPmuldkVNe5xte/Hj03r4SesfOBczR7pn+t60YujPvUQDN8lx
            WYpvRuetOneyf4gNPatwzR/W1GWGlahet1xPVYGrttqL4gCJeShIXvU4aCyzW941
            Pt0wCs+bg9u+59fXFkigWrWJPkwbR7bJ14XTStYynMbYLfCg+VPeGWj3d8wOhQcf
            AD86o8TLTbVfK2BDXwS5S8Dgf5u8g+WvmVHYDIkYKCxcLj0jP61Y7uHoFbSg41oN
            A9yPOa+0cYxA7U702V2WjxbfIeATYtNLZvH17lk+DYlQl8q3MLwguqZdgwIDAQAB
            iIqI2xquGONtHFDOKJvy1O2qYTVRtNRVZqhc1ol+mw==
            -----END CERTIFICATE-----
            -----BEGIN CERTIFICATE-----
            MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
            MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
            DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
            SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
            GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
            AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
            q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8
            SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0
            KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
            -----END CERTIFICATE-----
        sslPrivateKey:
          type: string
          description: Private key of the SSL certificate.
          example: |
            -----BEGIN PRIVATE KEY-----
            MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDZcNCZiNNHfX2O
            dZpf12mv2rAZwqGZBAdpox0wntEPK3JciQ7ZRloLJeHuCNIJs9MidnH7Xk8zveju
            mab6HmfIzvMJAAm88OYWMFQRiYe1ggJEHMe7yYPQbtXwTqWDYdWmjPPma3Ujqqmb
            hmVX2rsYILD7cUjS+e0Ucfqx3QODQj/aujTt1rS0gFhJ0soY5m+C6VimPCx4Bjyw
            5rhtskJDRrfXxrIhVXOvSPFRyxDSfjt3win8vjhhZ3oFPWgrl9lVhn0zaB5hjDsd
            -----END PRIVATE KEY-----
        validate_root_ca:
          type: boolean
          description: |-
            Defines whether to check the SSL certificate for a signature from a trusted certificate authority.

            Possible values:

            - **true** - SSL certificate must be verified to be signed by a trusted certificate authority.
            - **false** - SSL certificate will not be verified to be signed by a trusted certificate authority.
          example: true
      required:
      - name
      - sslCertificate
      - sslPrivateKey
    Data:
      type: object
      description: Request body.
    FTPConfig:
      title: FTP Config
      allOf:
      - $ref: '#/components/schemas/BaseFTPConfig'
      - type: object
        properties:
          password:
            type: string
      required:
      - user
      - password
      - hostname
    FTPConfigResponse:
      title: FTP Config
      allOf:
      - $ref: '#/components/schemas/BaseFTPConfig'
    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
    FastedgeConfig:
      type: object
      description: FastEdge application configuration. Required when `origin_type` is `fastedge`.
      properties:
        app_id:
          type: string
          description: |-
            ID of the FastEdge application served as origin (string, matching the existing
            fastedge option's convention). The CDN dispatches requests to the local FastEdge runtime
            on the edge node using this identifier. The application must be in your account, be
            enabled, and have `wasi-http` API type.
      required:
      - app_id
      example:
        app_id: '12345'
    FastedgeSourceResponse:
      type: object
      title: FastEdge Source
      description: A FastEdge application origin source.
      additionalProperties: false
      required:
      - origin_type
      - config
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/FastedgeConfig'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    FieldConversion:
      oneOf:
      - $ref: '#/components/schemas/ScaleFieldConversion'
      - $ref: '#/components/schemas/ReplaceFieldConversion'
      discriminator:
        propertyName: type
        mapping:
          scale: '#/components/schemas/ScaleFieldConversion'
          replace: '#/components/schemas/ReplaceFieldConversion'
    FieldConversionPipeline:
      type: object
      additionalProperties: false
      required:
      - conversions
      properties:
        conversions:
          type: array
          minItems: 1
          maxItems: 3
          items:
            $ref: '#/components/schemas/FieldConversion'
    FieldConversions:
      type: object
      maxProperties: 50
      description: 'Per-field value conversions for exported logs. Maps a canonical Gcore field name to the pipeline applied to its values. Field names are limited to 255 characters and must not be empty. Each key must be present in `fields`, and each conversion type must be listed in that field''s `allowed_conversions` from `/cdn/v2/logs_uploader/policies/fields`. Conversions in a pipeline are applied in array order. Values are converted independently of `field_remap`, which renames the exported field: both are keyed on the canonical field name.'
      additionalProperties:
        $ref: '#/components/schemas/FieldConversionPipeline'
      example:
        request_time:
          conversions:
          - type: scale
            config:
              factor: 1000
              precision: 0
              rounding: nearest
        upstream_cache_status:
          conversions:
          - type: replace
            config:
              values:
                HIT: cached
                MISS: uncached
              default: other
    FullCustomResourceDeletionFailed:
      title: Resource has a custom configuration
      type: object
      properties:
        errors:
          type: array
          description: |-
            This resource has a custom configuration and cannot be deleted.
            To delete the resource, contact technical support.
          items:
            type: string
          example:
          - You cannot delete this resource because it has a custom configuration. To delete the resource, contact technical support.
    GetAggregatedCDNStatisticsResponse:
      type: object
      properties:
        resource:
          type: object
          description: Resources IDs by which statistics data is grouped.
        1 (example):
          type: object
          description: CDN resource ID for which statistics data is shown.
        region:
          type: object
          description: Regions by which statistics data is grouped.
        cis (example):
          type: object
          description: Region by which statistics data is grouped.
        metrics:
          type: object
          description: Statistics parameters.
        upstream_bytes:
          type: integer
          description: Traffic in bytes from the upstream to CDN servers.
        sent_bytes:
          type: integer
          description: Traffic in bytes from CDN servers to clients.
        total_bytes:
          type: integer
          description: Upstream bytes and `sent_bytes` combined.
        backblaze_bytes:
          type: integer
          description: Traffic in bytes from Backblaze origin.
        requests:
          type: integer
          description: Number of requests to edge servers.
        responses_2xx:
          type: integer
          description: Number of 2xx response codes.
        responses_3xx:
          type: integer
          description: Number of 3xx response codes.
        responses_4xx:
          type: integer
          description: Number of 4xx response codes.
        responses_5xx:
          type: integer
          description: Number of 5xx response codes.
        responses_hit:
          type: integer
          description: 'Number of responses with the header Cache: HIT.'
        responses_miss:
          type: integer
          description: 'Number of responses with the header Cache: MISS.'
        response_types:
          type: object
          description: Statistics by content type. It returns a number of responses for content with different MIME types.
        cache_hit_traffic_ratio:
          type: integer
          description: 'Formula: 1 - `upstream_bytes` / `sent_bytes`. We deduct the non-cached traffic from the total traffic amount'
        95_percentile:
          type: integer
          description: 95 percentile bandwidth value
        min_bandwidth:
          type: integer
          description: Minimum bandwidth
        max_bandwidth:
          type: integer
          description: Maximum bandwidth
      example:
        resource:
          '1':
            region:
              cis:
                metrics:
                  95_percentile: 20023536
                  cache_hit_traffic_ratio: 0.9958449964158854
                  max_bandwidth: 34794756
                  min_bandwidth: 379257
                  requests: 21575631
                  responses_2xx: 21095299
                  responses_3xx: 278225
                  responses_4xx: 202026
                  responses_5xx: 81
                  sent_bytes: 22014089592053
                  total_bytes: 22105558213209
                  backblaze_bytes: 2105658213209
                  upstream_bytes: 91468621156
                  responses_hit: 63368252
                  responses_miss: 866237
                  response_types:
                    '-': 378412
                    application/json: 173054
                    application/vnd: 7224
                    application/zip: 8420
                    image/gif: 1349
                    image/jpeg: 2775
                    image/png: 7536543
                    image/webp: 746884
              eu:
                metrics:
                  95_percentile: 14324356
                  cache_hit_traffic_ratio: 0.9852247660029627
                  max_bandwidth: 22215199
                  min_bandwidth: 299608
                  requests: 64234595
                  responses_2xx: 62616980
                  responses_3xx: 1196666
                  responses_4xx: 420718
                  responses_5xx: 216
                  sent_bytes: 16552226067556
                  backblaze_bytes: 2105658213209
                  total_bytes: 16796789080876
                  upstream_bytes: 244563013320
                  responses_hit: 21235829
                  responses_miss: 339566
                  response_types:
                    '-': 478532
                    application/json: 172084
                    application/vnd: 3324
                    application/zip: 8100
                    image/gif: 1379
                    image/jpeg: 1975
                    image/png: 7131343
                    image/webp: 643574
    GetAliasUsageAggregatedStat:
      type: object
      properties:
        resource:
          type: object
          description: Resources IDs by which statistics data is grouped.
        1 (example):
          type: object
          description: CDN resource ID for which statistics data is shown.
        client:
          type: object
          description: Client IDs by which statistics data is grouped.
        12 (example):
          type: object
          description: Client ID for which statistics data is shown.
        metrics:
          type: object
          properties:
            alias_usage:
              type: integer
              description: Number of aliases in use.
          description: Statistics parameters.
      example:
        resource:
          '1':
            metrics:
              alias_usage: 1
    GetAlibabaRegionsResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/AlibabaRegionItem'
        example:
        - id: 1
          code: cn-hangzhou
          name: China (Hangzhou)
        - id: 2
          code: cn-shanghai
          name: China (Shanghai)
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/AlibabaRegionItem'
        example:
          count: 2
          next: null
          previous: null
          results:
          - id: 1
            code: cn-hangzhou
            name: China (Hangzhou)
          - id: 2
            code: cn-shanghai
            name: China (Shanghai)
    GetAwsRegionsResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/AwsRegionItem'
        example:
        - id: 1
          code: us-east-1
          name: US East (N. Virginia)
        - id: 2
          code: us-east-2
          name: US East (Ohio)
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/AwsRegionItem'
        example:
          count: 2
          next: null
          previous: null
          results:
          - id: 1
            code: us-east-1
            name: US East (N. Virginia)
          - id: 2
            code: us-east-2
            name: US East (Ohio)
    GetLogsResponse:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: Contains requested logs.
          items:
            type: object
            properties:
              timestamp:
                type: integer
                description: Log timestamp.
                example: 1633914371
              client_ip:
                type: string
                description: IP address from that the request was received.
                example: 192.0.2.10
              cname:
                type: string
                description: CDN resource custom domain.
                example: cdn.example.com
              resource_id:
                type: integer
                description: CDN resource ID.
                example: 100
              path:
                type: string
                description: Path requested.
                example: /awesome-site
              method:
                type: string
                description: HTTP method used in the request.
                example: GET
              user_agent:
                type: string
                description: Value of 'User-Agent' header.
                example: Mozilla/5.0 (compatible; MSIE 6.0; Windows 95; Trident/3.1)
              status:
                type: integer
                description: HTTP status code.
                example: 200
              size:
                type: integer
                description: Response size in bytes.
                example: 17340162
              cache_status:
                type: string
                description: 'Cache status: HIT, MISS, etc.'
                example: HIT
              datacenter:
                type: string
                description: Data center where the request was processed.
                example: m9
              referer:
                type: string
                description: Value of 'Referer' header.
                example: https://www.example.com/
              sent_http_content_type:
                type: string
                description: Value of the Content-Type HTTP header, indicating the MIME type of the resource being transmitted.
                example: image/jpeg
              tcpinfo_rtt:
                type: integer
                description: 'Time required to transmit a complete TCP segment: from the first bit to the last.'
                example: 70
        meta:
          type: object
          description: Contains meta-information.
          required:
          - count
          properties:
            count:
              type: integer
              description: Total number of records which match given parameters.
              example: 129874732
    GetNetworkCapacity:
      type: array
      items:
        type: object
        properties:
          country_code:
            type: string
            description: ISO country code.
          country:
            type: string
            description: Country name.
          capacity:
            type: number
            description: Network capacity in Gbit/s.
      example:
      - country_code: NL
        country: Netherlands
        capacity: 974.09
      - country_code: DE
        country: Germany
        capacity: 913.05
      - country_code: JP
        country: Japan
        capacity: 851.77
    GetPaidFeaturesSeriesStat:
      type: array
      items:
        type: object
        properties:
          id:
            type: integer
            description: Identifier of the paid feature usage record.
          active_from:
            type: string
            description: Date and time when paid feature was enabled (ISO 8601/RFC 3339 format, UTC.)
          active_to:
            type: string
            nullable: true
            description: |-
              Date and time when paid feature was disabled (ISO 8601/RFC 3339 format, UTC.)

              It returns **null** if the paid feature is enabled.
          client_id:
            type: integer
            description: Client ID.
          resource_id:
            type: integer
            description: CDN resource ID.
          cname:
            type: string
            description: CDN resource CNAME.
      example:
      - id: 1
        active_from: '2020-01-21T04:36:35.473Z'
        active_to: null
        client_id: 1
        resource_id: 1
        cname: cdn1.example.com
      - id: 2
        active_from: '2020-03-21T04:36:30.269Z'
        active_to: '2020-04-21T04:36:33.062Z'
        client_id: 1
        cname: cdn2.example.com
    GetPublicIPList:
      type: object
      properties:
        addresses:
          type: array
          description: List of IPv4 addresses.
          items:
            type: string
          example:
          - 198.51.100.10/32
        addresses_v6:
          type: array
          description: List of IPv6 addresses.
          items:
            type: string
          example:
          - 2001:db8::8/128
    GetPublicNetworkList:
      type: object
      properties:
        addresses:
          type: array
          description: List of IPv4 networks.
          items:
            type: string
          example:
          - 203.0.113.0/24
        addresses_v6:
          type: array
          description: List of IPv6 networks.
          items:
            type: string
          example:
          - 2001:db8:1::/112
    GetRawLogsAggregatedStat:
      type: object
      properties:
        resource:
          type: object
          description: Resources IDs by which statistics data is grouped..
        1 (example):
          type: object
          description: CDN resource ID for which statistics data is shown.
        metrics:
          type: object
          description: Statistics parameters.
        raw_logs_usage:
          type: string
          description: Number of resources that used Logs uploader.
      example:
        resource:
          '1':
            metrics:
              raw_logs_usage: 1
    GetSSLAnswer:
      type: object
      properties:
        id:
          type: integer
          description: SSL certificate ID.
          example: 42
        deleted:
          type: boolean
          description: |-
            Defines whether the certificate has been deleted. Parameter is **deprecated**.

            Possible values:
            - **true** - Certificate has been deleted.
            - **false** - Certificate has not been deleted.
          example: false
        cert_issuer:
          type: string
          description: Name of the certification center issued the SSL certificate.
          example: Some certification center
        cert_subject_cn:
          type: string
          description: Domain name that the SSL certificate secures.
          example: mydomain.name
        cert_subject_alt:
          type: string
          description: Alternative domain names that the SSL certificate secures.
        validity_not_before:
          type: string
          description: Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.)
          example: '2016-09-17T18:06:01Z'
        validity_not_after:
          type: string
          description: Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.)
          example: '2017-08-21T11:02:00Z'
        sslCertificateChain:
          type: string
          description: Parameter is **deprecated**.
        hasRelatedResources:
          type: boolean
          description: |-
            Defines whether the SSL certificate is used by a CDN resource or an alias.

            Possible values:
            - **true** - Certificate is used by a CDN resource or an alias.
            - **false** - Certificate is not used by a CDN resource or an alias.
          example: true
        name:
          type: string
          description: SSL certificate name.
          example: Some certificate
        automated:
          type: boolean
          description: |-
            How the SSL certificate was issued.

            Possible values:
            - **true** - Certificate was issued automatically.
            - **false** - Certificate was added by a use.
          example: false
    GetSSLAnswerList:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/GetSSLAnswer'
        example:
        - id: 42
          deleted: false
          cert_issuer: Some certification center
          cert_subject_cn: mydomain.name
          validity_not_before: '2016-09-17T18:06:01Z'
          validity_not_after: '2017-08-21T11:02:00Z'
          hasRelatedResources: true
          name: Some certificate
          automated: false
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/GetSSLAnswer'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 42
            deleted: false
            cert_issuer: Some certification center
            cert_subject_cn: mydomain.name
            validity_not_before: '2016-09-17T18:06:01Z'
            validity_not_after: '2017-08-21T11:02:00Z'
            hasRelatedResources: true
            name: Some certificate
            automated: false
    GetSeriesResponse:
      type: object
      properties:
        resource:
          type: object
          description: Resources IDs by which statistics data is grouped.
        1 (example):
          type: object
          description: ID of CDN resource for which statistics data is shown.
        region:
          type: object
          description: |-
            Regions for which data is displayed.

            Possible values:
            - **na** – North America
            - **eu** – Europe
            - **cis** – Commonwealth of Independent States
            - **asia** – Asia
            - **au** – Australia
            - **latam** – Latin America
            - **me** – Middle East
            - **africa** - Africa
            - **sa** - South America
        metrics:
          type: object
          description: |-
            Types of statistics data.

            Possible values:
            - **`upstream_bytes`** – Traffic in bytes from an origin server to CDN servers or to origin shielding when used.
            - **`sent_bytes`** – Traffic in bytes from CDN servers to clients.
            - **`shield_bytes`** – Traffic in bytes from origin shielding to CDN servers.
            - **`backblaze_bytes`** - Traffic in bytes from Backblaze origin.
            - **`total_bytes`** – `shield_bytes`, `upstream_bytes` and `sent_bytes` combined.
            - **`cdn_bytes`** – `sent_bytes` and `shield_bytes` combined.
            - **requests** – Number of requests to edge servers.
            - **`responses_2xx`** – Number of 2xx response codes.
            - **`responses_3xx`** – Number of 3xx response codes.
            - **`responses_4xx`** – Number of 4xx response codes.
            - **`responses_5xx`** – Number of 5xx response codes.
            - **`responses_hit`** – Number of responses with the header Cache: HIT.
            - **`responses_miss`** – Number of responses with the header Cache: MISS.
            - **`response_types`** – Statistics by content type. It returns a number of responses for content with different MIME types.
            - **`cache_hit_traffic_ratio`** – Formula: 1 - `upstream_bytes` / `sent_bytes`. We deduct the non-cached traffic from the total traffic amount.
            - **`cache_hit_requests_ratio`** – Formula: `responses_hit` / requests. The share of sending cached content.
            - **`shield_traffic_ratio`** – Formula: (`shield_bytes` - `upstream_bytes`) / `shield_bytes`. The efficiency of the Origin Shielding: how much more traffic is sent from the Origin Shielding than from the origin.
            - **`image_processed`** - Number of images transformed on the Image optimization service.
            - **`request_time`** - Time elapsed between the first bytes of a request were processed and logging after the last bytes were sent to a user.
            - **`upstream_response_time`** - Number of milliseconds it took to receive a response from an origin. If upstream `response_time_` contains several indications for one request (in case of more than 1 origin), we summarize them. In case of aggregating several queries, the average of this amount is calculated.

            Metrics **`upstream_response_time`** and **`request_time`** should be requested separately from other metrics
        upstream_bytes:
          type: array
          items:
            type: integer
          description: |-
            Bytes from the upstream to the CDN servers.

            Represented by two values:
            - 1543622400 — Time in the UNIX timestamp when statistics were received.
            - 17329220573 — Bytes.
        sent_bytes:
          type: array
          items:
            type: integer
          description: |-
            Bytes from CDN servers to the end-users.

            Represented by two values:
            - 1543622400 — Time in the UNIX timestamp when statistics were received.
            - 17329220573 — Bytes.
        total_bytes:
          type: array
          items:
            type: integer
          description: |-
            Upstream bytes and `sent_bytes` combined.

            Represented by two values:
            - 1543622400 — Time in the UNIX timestamp when statistics were received.
            - 17329220573 — Bytes.
        backblaze_bytes:
          type: array
          items:
            type: integer
          description: |-
            BackBlaze bytes from Backblaze origin.

            Represented by two values:
            - 1543622400 — Time in the UNIX timestamp when statistics were received.
            - 17329220573 — Bytes.
      example:
        resource:
          '1':
            region:
              asia:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 17329220573
                  total_bytes:
                  - - 1543622400
                    - 17384617989
                  backblaze_bytes:
                  - - 1543622400
                    - 17384617989
                  upstream_bytes:
                  - - 1543622400
                    - 55397416
              cis:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 234582406061
                  total_bytes:
                  - - 1543622400
                    - 234677982848
                  backblaze_bytes:
                  - - 1543622400
                    - 234677982848
                  upstream_bytes:
                  - - 1543622400
                    - 95576787
              eu:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 243212514764
                  total_bytes:
                  - - 1543622400
                    - 243297296511
                  backblaze_bytes:
                  - - 1543622400
                    - 243297296511
                  upstream_bytes:
                  - - 1543622400
                    - 84781747
              latam:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 59819837564
                  total_bytes:
                  - - 1543622400
                    - 59927133387
                  backblaze_bytes:
                  - - 1543622400
                    - 59927133387
                  upstream_bytes:
                  - - 1543622400
                    - 107295823
              me:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 13643432427
                  total_bytes:
                  - - 1543622400
                    - 13644762375
                  backblaze_bytes:
                  - - 1543622400
                    - 13644762375
                  upstream_bytes:
                  - - 1543622400
                    - 1329948
              na:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 234004049506
                  total_bytes:
                  - - 1543622400
                    - 234655863540
                  backblaze_bytes:
                  - - 1543622400
                    - 234655863540
                  upstream_bytes:
                  - - 1543622400
                    - 651814034
          '4777':
            region:
              au:
                metrics:
                  sent_bytes:
                  - - 1543622400
                    - 490800672
    GetShieldUsageAggregatedStat:
      type: object
      properties:
        resource:
          type: object
          description: Resources IDs by which statistics data is grouped.
        1 (example):
          type: object
          description: CDN resource ID for which statistics data is shown.
        metrics:
          type: object
          description: Statistics parameters.
        shield_usage:
          type: string
          description: Number of CDN resources that used origin shielding.
      example:
        resource:
          '1':
            metrics:
              shield_usage: 1
    GetShieldingPOPV2:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/ShieldingLocationItem'
        example:
        - id: 1
          datacenter: Ashburn
          country: United States
          city: Ashburn
        - id: 2
          datacenter: Frankfurt
          country: Germany
          city: Frankfurt
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/ShieldingLocationItem'
        example:
          count: 2
          next: null
          previous: null
          results:
          - id: 1
            datacenter: Ashburn
            country: United States
            city: Ashburn
          - id: 2
            datacenter: Frankfurt
            country: Germany
            city: Frankfurt
    HTTPAction:
      allOf:
      - $ref: '#/components/schemas/BaseHTTPAction'
      - type: object
        properties:
          use_compression:
            type: boolean
            default: false
          response_actions:
            type: array
            items:
              type: object
              properties:
                match_status_code:
                  type: integer
                  default: 0
                match_payload:
                  type: string
                  default: ''
                description:
                  type: string
                  default: ''
                action:
                  type: string
                  enum:
                  - drop
                  - retry
                  - append
              required:
              - action
        required:
        - url
    HTTPAuth:
      allOf:
      - $ref: '#/components/schemas/BaseHTTPAuth'
      - type: object
        properties:
          config:
            $ref: '#/components/schemas/HTTPAuthTokenConfig'
        required:
        - type
        - config
    HTTPAuthTokenConfig:
      allOf:
      - $ref: '#/components/schemas/BaseHTTPAuthTokenConfig'
      - type: object
        required:
        - header_name
        - token
    HTTPConfig:
      title: HTTP Config
      type: object
      properties:
        upload:
          type: object
          $ref: '#/components/schemas/HTTPAction'
        append:
          allOf:
          - type: object
            nullable: true
          - $ref: '#/components/schemas/HTTPAction'
        retry:
          allOf:
          - type: object
            nullable: true
          - $ref: '#/components/schemas/HTTPAction'
        auth:
          allOf:
          - type: object
            nullable: true
          - $ref: '#/components/schemas/HTTPAuth'
        content_type:
          type: string
          enum:
          - json
          - text
          default: text
      required:
      - upload
    HTTPConfigResponse:
      title: HTTP Config
      type: object
      properties:
        upload:
          type: object
          allOf:
          - $ref: '#/components/schemas/BaseHTTPAction'
        append:
          type: object
          nullable: true
          allOf:
          - $ref: '#/components/schemas/BaseHTTPAction'
        retry:
          type: object
          nullable: true
          allOf:
          - $ref: '#/components/schemas/BaseHTTPAction'
        auth:
          type: object
          nullable: true
          allOf:
          - $ref: '#/components/schemas/BaseHTTPAuth'
        content_type:
          type: string
          enum:
          - json
          - text
          default: text
    Host:
      type: string
      description: Host from which the request was made.
    HostSourceResponse:
      type: object
      title: Host Source
      description: A host origin source.
      additionalProperties: false
      required:
      - source
      properties:
        source:
          $ref: '#/components/schemas/source'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    ID:
      type: integer
      description: Activity logs record ID.
    IncorrectPathsFormatPurgeError:
      title: Incorrect paths format provided
      type: object
      properties:
        errors:
          type: object
          properties:
            paths:
              type: array
              description: The field "paths" has invalid values.
              items:
                type: string
              example:
              - A path should start with /.
    IncorrectPathsItemsPurgeOrPrefetchError:
      title: Incorrect paths items provided
      type: object
      properties:
        errors:
          type: object
          properties:
            paths:
              type: object
              properties:
                index:
                  type: array
                  description: Some items in "paths" is invalid.
                  items:
                    type: string
                  example:
                  - This field may not be blank.
    IncorrectPathsTypePurgeError:
      title: Incorrect paths type provided
      type: object
      properties:
        errors:
          type: object
          properties:
            paths:
              type: array
              description: The field "paths" is incorrect. Must be an array of strings.
              items:
                type: string
              example:
              - Expected a list of items but got type "str".
    JSONParseError:
      title: Invalid request JSON schema
      type: object
      properties:
        message:
          type: string
          description: This message describes error if json schema from your request is invalid.
          example: |
            JSON parse error - Expecting ',' delimiter: line 3 column 33 (char 77)
    LECertificateIsIssuingError:
      title: Let's Encrypt certificate is issuing
      type: object
      properties:
        errors:
          type: object
          properties:
            resource:
              type: array
              items:
                type: string
              description: |-
                You cannot renew Let's Encrypt certificate because a Let's Encrypt certificate issuing is in progress.
                Please wait until the issuing is completed and try again.
              example:
              - Certificate issuing process has already been launched.
    LECertificateIsNotAttachedToResourceError:
      title: Let's Encrypt certificate is not attached to resource
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: The specified certificate is not attached to any resource. Please check the certificate ID.
              example:
              - Certificate is not attached to a resource.
    LECertificateIssuingInProgressForceRetryError:
      title: Let's Encrypt certificate issuance is in progress
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: |-
                You cannot force retry Let's Encrypt issuing process until the current issuing attempt is in progress.
                Please wait until the attempt is completed.
              example:
              - You cannot force retry Let's Encrypt issuing process until the current issuing attempt is in progress. Please wait until the attempt is completed.
    LECertificateIssuingNotStartedYetError:
      title: Let's Encrypt certificate issuing is not started yet
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: Let's Encrypt certificate issuing is not started yet.
              example:
              - Let's Encrypt certificate issuing is not started yet.
    LECertificatePreValidationError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: Errors occurred during resource pre-validation. Check the response to get more details.
          example:
          - An error occurred when connecting to the validation URL. Please ensure that DNS records are pointed to our services, and check whether the rules you created overlap the path "/.well-known/acme-challenge/". If you have just created a CDN resource, it may take up to 15 minutes to activate it. In this case, please wait until the CDN resource is activated and try to issue the certificate again.
    LEChallengeStatus:
      type: object
      properties:
        domain:
          type: string
          description: Domain the challenge validates.
          example: shop.example.com
        challenge_type:
          type: string
          description: |-
            Domain validation method of the challenge.

            Possible values:
            - `dns_01` – Validation via a DNS record.
            - `http_01` – Validation via an HTTP request.
          example: http_01
        state:
          type: string
          description: |-
            State of the challenge.

            Possible values:
            - `pending` – The challenge has not been checked yet.
            - `processing` – Let's Encrypt is validating the challenge.
            - `valid` – The challenge passed.
            - `invalid` – The challenge failed; see `error`.
          example: invalid
        error:
          type: string
          description: Why the challenge failed. Empty unless `state` is `invalid`.
          example: A 404 error occurred when attempting to connect to the validation URL.
    LERequestAttemptStatus:
      type: object
      properties:
        id:
          type: integer
          description: ID of the attempt to issue the Let's Encrypt certificate.
          example: 1
        status:
          type: string
          description: |-
            Status of the attempt to issue the Let's Encrypt certificate.

            Possible values:
            - `DONE` – Attempt is successful. Let's Encrypt certificate was issued.
            - `FAILED` – Attempt failed. Let's Encrypt certificate was not issued.
            - `CANCELLED` – Attempt is cancelled. Let's Encrypt certificate was not issued.
            - `FORBIDDEN` – Issuing of Let's Encrypt certificates is disabled for your account. Let's Encrypt certificate was not issued.
          example: DONE
        error:
          type: string
          description: Brief description of the error that occurred when trying to issue a Let's Encrypt certificate.
          example: ''
        details:
          type: string
          description: Detailed description of the error that occurred when trying to issue a Let's Encrypt certificate.
          example: ''
        created:
          type: string
          description: Date and time when the issuing attempt status was created (ISO 8601/RFC 3339 format, UTC).
          example: '2021-10-29T13:21:01.550849Z'
        retry_after:
          type: string
          description: |-
            Date indicating when the certificate issuance limit will be lifted (ISO 8601/RFC 3339 format, UTC).

            It is filled in only if error = RateLimited.
          example: '2024-01-01T10:00:00Z'
    LERequestStatusBase:
      type: object
      properties:
        id:
          type: integer
          description: ID of the attempt to issue a Let's Encrypt certificate.
          example: 1
        statuses:
          type: array
          description: Detailed information about attempts to issue a Let's Encrypt certificate.
          items:
            $ref: '#/components/schemas/LERequestAttemptStatus'
        latest_status:
          type: object
          nullable: true
          description: |-
            Detailed information about last attempt to issue a Let's Encrypt certificate.

            The field is `null` until the first attempt of the issuing process has been recorded.
          allOf:
          - $ref: '#/components/schemas/LERequestAttemptStatus'
        started:
          type: string
          description: Date when the process of issuing a Let's Encrypt certificate was started (ISO 8601/RFC 3339 format, UTC).
          example: '2021-10-29T13:20:56.543678Z'
        finished:
          type: string
          nullable: true
          description: |-
            Date when the process of issuing a Let's Encrypt certificate was finished (ISO 8601/RFC 3339 format, UTC).

            The field is `null` if the issuing process is not finished.
          example: '2021-10-29T13:21:01.550849Z'
        active:
          type: boolean
          description: |-
            Defines whether the Let's Encrypt certificate issuing process is active.

            Possible values:
            - `true` – Issuing process is active.
            - `false` – Issuing process is completed.
          example: false
        attempts_count:
          type: integer
          description: Number of attempts to issue the Let's Encrypt certificate.
          example: 1
        next_attempt_time:
          type: string
          nullable: true
          description: Time of the next scheduled attempt to issue the Let's Encrypt certificate (ISO 8601/RFC 3339 format, UTC).
          example: '2021-10-29T13:21:01.550849Z'
    LERequestStatusV2:
      allOf:
      - $ref: '#/components/schemas/LERequestStatusBase'
      - type: object
        properties:
          resource:
            type: integer
            description: CDN resource ID.
            example: 1
    LetsEncryptCertificateAlreadyAttached:
      title: Let's Encrypt certificate is attached to another resource
      type: object
      properties:
        errors:
          type: object
          properties:
            sslData:
              type: array
              items:
                type: string
              description: |-
                Let's Encrypt certificates can't be attached to multiple resources.
                This error occurred because certificate is already attached to other resource.
              example:
              - You cannot attach this Let's Encrypt SSL certificate because it is already attached to another resource.
    LimitsForCreationOriginsGroup:
      title: Upgrade service
      type: object
      properties:
        message:
          type: string
          description: You have exceeded the number of allowed origin groups. Please upgrade the service to create more origin groups.
          example: Upgrade service to create more than {limit} Origins group(s).
    LogsUploaderConfigListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/LogsUploaderConfigResponse'
        example:
        - id: 1
          client_id: 100
          created: '2024-01-15T10:30:00Z'
          updated: '2024-01-15T10:30:00Z'
          enabled: true
          name: Production Logs
          policy: 123
          target: 456
          for_all_resources: false
          resources:
          - 1001
          - 1002
          status:
            status: successful
            code: 0
            updated: '2024-01-15T10:30:00Z'
            details: ''
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/LogsUploaderConfigResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 1
            client_id: 100
            created: '2024-01-15T10:30:00Z'
            updated: '2024-01-15T10:30:00Z'
            enabled: true
            name: Production Logs
            policy: 123
            target: 456
            for_all_resources: false
            resources:
            - 1001
            - 1002
            status:
              status: successful
              code: 0
              updated: '2024-01-15T10:30:00Z'
              details: ''
    LogsUploaderConfigResponse:
      properties:
        id:
          type: integer
          readOnly: true
        client_id:
          type: integer
          description: Client that owns the config.
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
          description: Time when the config was created.
        updated:
          type: string
          format: date-time
          readOnly: true
          description: Time when the config was updated.
        enabled:
          type: boolean
          description: Enables or disables the config.
        name:
          type: string
          description: Name of the config.
        policy:
          type: integer
          description: ID of the policy that should be assigned to given config.
        target:
          type: integer
          description: ID of the target to which logs should be uploaded.
        for_all_resources:
          type: boolean
          description: |-
            If set to true, the config will be applied to all CDN resources.
            If set to false, the config will be applied to the resources specified in the `resources` field.
        resources:
          type: array
          items:
            type: integer
          description: List of resource IDs to which the config should be applied.
        status:
          allOf:
          - $ref: '#/components/schemas/LogsUploaderValidationResponse'
          - type: object
            description: Validation status of the logs uploader config.
    LogsUploaderPolicyField:
      type: object
      required:
      - name
      - allowed_conversions
      properties:
        name:
          type: string
          description: Canonical Gcore field name, or `-` as the skipped-column placeholder, selectable in a policy's `fields`.
          maxLength: 255
        allowed_conversions:
          type: array
          description: Conversion types this field permits in `field_conversions`. Empty when the field permits none.
          items:
            type: string
            enum:
            - scale
            - replace
      example:
        name: request_time
        allowed_conversions:
        - scale
        - replace
    LogsUploaderPolicyListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/LogsUploaderPolicyResponse'
        example:
        - id: 123
          client_id: 123
          created: '2023-11-07T05:31:56Z'
          updated: '2023-11-07T05:31:56Z'
          include_empty_logs: true
          include_shield_logs: true
          name: Policy
          description: New policy
          retry_interval_minutes: 32
          rotate_interval_minutes: 32
          rotate_threshold_mb: 252
          rotate_threshold_lines: 5000
          date_format: '[02/Jan/2006:15:04:05 -0700]'
          field_delimiter: ','
          field_separator: ;
          fields:
          - remote_addr
          - status
          file_name_template: '{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz'
          format_type: json
          tags: {}
          field_remap: {}
          field_conversions: {}
          log_sample_rate: 1
          related_uploader_configs:
          - 123
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/LogsUploaderPolicyResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 123
            client_id: 123
            created: '2023-11-07T05:31:56Z'
            updated: '2023-11-07T05:31:56Z'
            include_empty_logs: true
            include_shield_logs: true
            name: Policy
            description: New policy
            retry_interval_minutes: 32
            rotate_interval_minutes: 32
            rotate_threshold_mb: 252
            rotate_threshold_lines: 5000
            date_format: '[02/Jan/2006:15:04:05 -0700]'
            field_delimiter: ','
            field_separator: ;
            fields:
            - remote_addr
            - status
            file_name_template: '{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz'
            format_type: json
            tags: {}
            field_remap: {}
            field_conversions: {}
            log_sample_rate: 1
            related_uploader_configs:
            - 123
    LogsUploaderPolicyResponse:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        client_id:
          type: integer
          description: Client that owns the policy.
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
          description: Time when logs uploader policy was created.
        updated:
          type: string
          format: date-time
          readOnly: true
          description: Time when logs uploader policy was updated.
        include_empty_logs:
          type: boolean
          description: Include empty logs in the upload.
        include_shield_logs:
          type: boolean
          description: Include logs from origin shielding in the upload.
        name:
          type: string
          description: Name of the policy.
          maxLength: 255
        description:
          type: string
          description: Description of the policy.
          maxLength: 255
        retry_interval_minutes:
          type: integer
          description: Interval in minutes to retry failed uploads.
          maximum: 60
          minimum: 5
        rotate_interval_minutes:
          type: integer
          description: Interval in minutes to rotate logs.
          maximum: 60
          minimum: 5
        rotate_threshold_mb:
          type: integer
          description: Threshold in MB to rotate logs.
          maximum: 500
          minimum: 5
          nullable: true
        rotate_threshold_lines:
          type: integer
          description: Threshold in lines to rotate logs.
          maximum: 10000
          minimum: 0
        date_format:
          type: string
          description: Date format for logs.
          maxLength: 255
        field_delimiter:
          type: string
          description: Field delimiter for logs.
          maxLength: 10
          example: ;
        field_separator:
          type: string
          description: Field separator for logs.
          minLength: 1
          maxLength: 10
        fields:
          type: array
          items:
            type: string
            maxLength: 255
          description: List of fields to include in logs. Duplicate names are allowed for plain text output, but rejected when `format_type` is `json` or a `field_remap` is set (each field becomes a distinct output key).
        file_name_template:
          type: string
          description: Template for log file name.
          maxLength: 255
        format_type:
          type: string
          enum:
          - json
          - ''
          description: |-
            Format type for logs.

            Possible values:
            - **""** - empty, it means it will apply the format configurations from the policy.
            - **"json"** - output the logs as json lines.
          maxLength: 255
        tags:
          type: object
          description: Tags allow for dynamic decoration of logs by adding predefined fields to the log format. These tags serve as customizable key-value pairs that can be included in log entries to enhance context and readability.
          additionalProperties:
            type: string
            maxLength: 50
        field_remap:
          type: object
          description: Per-field output-name remap for exported logs. Maps a canonical Gcore field name (from `/cdn/logs_uploader/policies/fields`, and must be present in `fields`) to the field name it should have in the exported logs. Unmapped fields keep their canonical name. Output names (after remapping) must be unique.
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 255
        field_conversions:
          $ref: '#/components/schemas/FieldConversions'
        escape_special_characters:
          type: boolean
          description: |-
            When set to true, the service sanitizes string values by escaping characters that may be unsafe for transport, logging, or downstream processing.

            The following categories of characters are escaped:
            - Control and non-printable characters
            - Quotation marks and escape characters
            - Characters outside the standard ASCII range

            The resulting output contains only printable ASCII characters.
        log_sample_rate:
          type: number
          format: float
          description: |-
            Sampling rate for logs. A value between 0 and 1 that determines the fraction of log entries to collect.

            - **1** - collect all logs (default).
            - **0.5** - collect approximately 50% of logs.
            - **0** - collect no logs (effectively disables logging without removing the policy).
          minimum: 0
          maximum: 1
        related_uploader_configs:
          type: array
          items:
            type: integer
          description: List of logs uploader configs that use this policy.
      example:
        id: 123
        client_id: 123
        created: '2023-11-07T05:31:56Z'
        updated: '2023-11-07T05:31:56Z'
        include_empty_logs: true
        include_shield_logs: true
        name: Policy
        description: New policy
        retry_interval_minutes: 32
        rotate_interval_minutes: 32
        rotate_threshold_mb: 252
        rotate_threshold_lines: 5000
        date_format: '[02/Jan/2006:15:04:05 -0700]'
        field_delimiter: ','
        field_separator: ;
        fields:
        - remote_addr
        - status
        file_name_template: '{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz'
        format_type: json
        tags: {}
        field_remap: {}
        field_conversions: {}
        log_sample_rate: 1
        related_uploader_configs:
        - 123
    LogsUploaderS3GcoreTargetConfig:
      description: Config for the `s3_gcore` storage type.
      oneOf:
      - $ref: '#/components/schemas/S3GcoreConfig'
      - $ref: '#/components/schemas/S3GcoreBoundConfig'
    LogsUploaderS3GcoreTargetConfigResponse:
      description: Config for the `s3_gcore` storage type.
      oneOf:
      - $ref: '#/components/schemas/S3GcoreConfigResponse'
      - $ref: '#/components/schemas/S3GcoreBoundConfigResponse'
    LogsUploaderS3GcoreTargetPutConfig:
      description: Config for the `s3_gcore` storage type.
      oneOf:
      - $ref: '#/components/schemas/S3GcoreConfig'
      - $ref: '#/components/schemas/S3GcoreBoundConfigPut'
    LogsUploaderTargetBaseResponse:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        client_id:
          type: integer
          description: Client that owns the target.
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
          description: Time when logs uploader target was created.
        updated:
          type: string
          format: date-time
          readOnly: true
          description: Time when logs uploader target was updated.
        name:
          type: string
          description: Name of the target.
          maxLength: 255
        description:
          type: string
          description: Description of the target.
          maxLength: 255
        related_uploader_configs:
          type: array
          items:
            type: integer
          description: List of logs uploader configs that use this target.
        status:
          allOf:
          - $ref: '#/components/schemas/LogsUploaderValidationResponse'
          - type: object
            description: Validation status of the logs uploader target. Informs if the specified target is reachable.
    LogsUploaderTargetListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/LogsUploaderTargetResponse'
        example:
        - id: 1
          client_id: 100
          created: '2024-01-15T10:30:00Z'
          updated: '2024-01-15T10:30:00Z'
          storage_type: s3_gcore
          name: My S3 Target
          description: Gcore S3 log storage
          related_uploader_configs:
          - 10
          status:
            status: successful
            code: 0
            updated: '2024-01-15T10:30:00Z'
            details: ''
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/LogsUploaderTargetResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 1
            client_id: 100
            created: '2024-01-15T10:30:00Z'
            updated: '2024-01-15T10:30:00Z'
            storage_type: s3_gcore
            name: My S3 Target
            description: Gcore S3 log storage
            related_uploader_configs:
            - 10
            status:
              status: successful
              code: 0
              updated: '2024-01-15T10:30:00Z'
              details: ''
    LogsUploaderTargetPatchConfig:
      description: Config for specific storage type.
      oneOf:
      - $ref: '#/components/schemas/S3GcoreConfig'
      - $ref: '#/components/schemas/S3GcoreBoundConfigPatch'
      - $ref: '#/components/schemas/S3AmazonConfig'
      - $ref: '#/components/schemas/S3OSSConfig'
      - $ref: '#/components/schemas/S3OtherConfig'
      - $ref: '#/components/schemas/S3V1Config'
      - $ref: '#/components/schemas/FTPConfig'
      - $ref: '#/components/schemas/SFTPConfig'
      - $ref: '#/components/schemas/HTTPConfig'
      - $ref: '#/components/schemas/AzureBlobConfig'
      - $ref: '#/components/schemas/SLSConfig'
    LogsUploaderTargetResponse:
      oneOf:
      - $ref: '#/components/schemas/LogsUploaderTargetResponseS3Gcore'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseS3Amazon'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseS3OSS'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseS3Other'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseS3V1'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseFTP'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseSFTP'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseHTTP'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseAzureBlob'
      - $ref: '#/components/schemas/LogsUploaderTargetResponseSLS'
      discriminator:
        propertyName: storage_type
        mapping:
          s3_gcore: '#/components/schemas/LogsUploaderTargetResponseS3Gcore'
          s3_amazon: '#/components/schemas/LogsUploaderTargetResponseS3Amazon'
          s3_oss: '#/components/schemas/LogsUploaderTargetResponseS3OSS'
          s3_other: '#/components/schemas/LogsUploaderTargetResponseS3Other'
          s3_v1: '#/components/schemas/LogsUploaderTargetResponseS3V1'
          ftp: '#/components/schemas/LogsUploaderTargetResponseFTP'
          sftp: '#/components/schemas/LogsUploaderTargetResponseSFTP'
          http: '#/components/schemas/LogsUploaderTargetResponseHTTP'
          azure_blob: '#/components/schemas/LogsUploaderTargetResponseAzureBlob'
          sls: '#/components/schemas/LogsUploaderTargetResponseSLS'
    LogsUploaderTargetResponseAzureBlob:
      title: Azure Blob Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - azure_blob
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/AzureBlobConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseFTP:
      title: FTP Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - ftp
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/FTPConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseHTTP:
      title: HTTP Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - http
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/HTTPConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseS3Amazon:
      title: S3 Amazon Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_amazon
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3AmazonConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseS3Gcore:
      title: S3 Gcore Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_gcore
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/LogsUploaderS3GcoreTargetConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseS3OSS:
      title: S3 OSS Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_oss
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3OSSConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseS3Other:
      title: S3 Other Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_other
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3OtherConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseS3V1:
      title: S3 V1 Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_v1
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3V1ConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseSFTP:
      title: SFTP Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - sftp
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/SFTPConfigResponse'
        required:
        - storage_type
    LogsUploaderTargetResponseSLS:
      title: SLS Target
      allOf:
      - $ref: '#/components/schemas/LogsUploaderTargetBaseResponse'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - sls
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/SLSConfigResponse'
        required:
        - storage_type
    LogsUploaderValidationResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - in_progress
          - successful
          - failed
          description: Status of the validation.
        code:
          type: integer
          description: Error code indicating the type of validation error.
        updated:
          type: string
          format: date-time
          description: Time when the validation status was updated.
        details:
          type: string
          description: Error message if the validation failed.
    Method:
      type: string
      description: Request HTTP method.
    Next:
      type: string
      description: URL to the next activity logs records slice.
    NoPermissionsWithExample:
      title: No permissions
      type: object
      properties:
        message:
          type: string
          description: You do not have permission to perform this action.
          example: You do not have permission to perform this action.
    NotActiveLECertificateIssueRequestForceRetryError:
      title: Let's Encrypt certificate issuance is completed
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: The certificate issuance process has already been completed.
              example:
              - The certificate issuance process has already been completed.
    NotLECertificateForceRetryError:
      title: Not Let's Encrypt certificate selected
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: The specified certificate is not Let's Encrypt certificate. Please check the certificate ID.
              example:
              - Force retry is not allowed for non-Let's Encrypt certificates.
    NotLECertificateSelectedError:
      title: Not Let's Encrypt certificate selected
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: The specified certificate is not Let's Encrypt certificate. Please check the certificate ID.
              example:
              - Certificate doesn't support automatic renewal.
    NotLECertificateStatusError:
      title: Not Let's Encrypt certificate selected
      type: object
      properties:
        errors:
          type: object
          properties:
            certificate:
              type: array
              items:
                type: string
              description: The specified certificate is not Let's Encrypt certificate. Please check the certificate ID.
              example:
              - Status is available for Let's Encrypt certificates only.
    OriginGroupIsEmptyError:
      title: Origin group must contain origins
      type: object
      properties:
        errors:
          type: object
          properties:
            source:
              type: array
              items:
                type: string
              description: Origin group cannot be created without origins. Please add at least one origin to create the origin group.
              example:
              - Origin Group has to have at least one origin source.
    OriginGroupIsUsedByResourceError:
      title: Origin group is used by resources
      type: object
      properties:
        name:
          type: array
          items:
            type: string
          description: The origin group is used by resources and cannot be deleted.
          example:
          - There are resources using this group
    OriginGroupIsUsedByRulesError:
      title: Origin group is used by rules
      type: object
      properties:
        name:
          type: array
          items:
            type: string
          description: The origin group is used by rules and cannot be deleted.
          example:
          - There are rules using this group
    OriginGroupNameMore255Error:
      title: Origin group name is too long
      type: object
      properties:
        errors:
          type: object
          properties:
            name:
              type: array
              items:
                type: string
              description: The specified origin group name is longer than 255 characters. Please shorten the name and try again.
              example:
              - Ensure this field has no more than 255 characters.
    OriginGroupNameNotUniqueError:
      title: Origin group name must be unique
      type: object
      properties:
        errors:
          type: object
          properties:
            name:
              type: array
              items:
                type: string
              description: The specified origin group name is already used by another origin group. Try another name.
              example:
              - Origin Group name should be unique.
    OriginGroupOriginsForbiddenForPrivateOriginError:
      title: Origin group with private origin must be sole
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: Origin group with private origin must be sole.
              example:
              - You can`t add another origin to a group. Private origin can only be used as the sole origin in the group.
    OriginGroupSourcesLimitCreateError:
      title: Number of allowed sources has been exceeded
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: You have exceeded the number of allowed sources in the origin group. Please reduce the number of sources or contact support.
              example:
              - Impossible to add origin group with more than {origins_limit} origins on your tariff plan.
    OriginGroupSourcesLimitEditError:
      title: Number of allowed sources has been exceeded
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: You have exceeded the number of allowed sources in the origin group. Please reduce the number of sources or contact support.
              example:
              - Impossible to edit origin group with more than {origins_limit} origins and add more origins on your tariff plan.
    OriginGroupsListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/OriginGroupsResponse'
        example:
        - id: 1
          name: YourOriginGroup
          use_next: true
          proxy_next_upstream:
          - error
          - timeout
          auth_type: none
          sources:
          - backup: false
            enabled: true
            source: origin.example.com
          path: ''
          has_related_resources: true
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/OriginGroupsResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 1
            name: YourOriginGroup
            use_next: true
            proxy_next_upstream:
            - error
            - timeout
            auth_type: none
            sources:
            - backup: false
              enabled: true
              source: origin.example.com
            path: ''
            has_related_resources: true
    OriginGroupsResponse:
      oneOf:
      - type: object
        title: None Auth
        description: Origin group with host origins, or mixed host and S3 origins using inline `origin_type` and `config` in sources.
        properties:
          id:
            $ref: '#/components/schemas/id'
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_none'
          sources:
            $ref: '#/components/schemas/sources'
          path:
            $ref: '#/components/schemas/path'
          has_related_resources:
            $ref: '#/components/schemas/has_related_resources'
        required:
        - id
        - name
        - sources
      - type: object
        title: AWS Signature V4
        deprecated: true
        description: '**Deprecated.** To create S3 origins, configure them directly in sources with `origin_type` and `config` instead.'
        properties:
          id:
            $ref: '#/components/schemas/id'
          name:
            $ref: '#/components/schemas/name'
          use_next:
            $ref: '#/components/schemas/use_next'
          proxy_next_upstream:
            $ref: '#/components/schemas/proxy_next_upstream'
          auth_type:
            $ref: '#/components/schemas/auth_type_aws'
          auth:
            $ref: '#/components/schemas/auth'
          path:
            $ref: '#/components/schemas/path'
          has_related_resources:
            $ref: '#/components/schemas/has_related_resources'
        required:
        - id
        - name
        - auth_type
        - auth
    OriginLastSourceNotBackupError:
      title: The single origin cannot be backup
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.com:
                  type: object
                  properties:
                    backup:
                      type: array
                      items:
                        type: string
                      description: This origin is the single in the specified origin group and cannot be used as a backup. Please add another origin before setting this one as a backup.
                      example:
                      - You cannot specify all origin sources as reserve (backup). Add non-reserve origins.
    OriginShielding:
      type: object
      properties:
        shielding_pop:
          type: integer
          nullable: true
          description: |-
            Shielding location ID.

            If origin shielding is disabled, the parameter value is **null**.
      example:
        shielding_pop: 4
    OriginSourceBadIPError:
      title: Origin IP cannot be reserved IP address
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                100.64.0.0:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source is a reserved IP address. Please specify the origin source that belongs to a public network.
                      example:
                      - The IP address cannot be used as an origin source. Please try another IP.
    OriginSourceEqualResourceCnameError:
      title: Origin source is equal to resource's CNAME
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                cdn.example.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source is equal to the linked resource's CNAME. Please use origin sources that are different from the linked resource's CNAME.
                      example:
                      - Origin source is equal to attached resource`s CNAME.
    OriginSourceForbiddenError:
      title: Origin source is forbidden
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.org:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source is blacklisted. It cannot be used to create an origin. Please specify another origin source.
                      example:
                      - That origin source is forbidden
    OriginSourceForbiddenNetworkError:
      title: Origin source belongs to forbidden network
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.org:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source belongs to a forbidden network. Please specify the origin source that belongs to a public network.
                      example:
                      - The domain name's IP belongs to a forbidden network. Please use another domain name.
    OriginSourceIPv4Error:
      title: Origin domain IP is not IPv4
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.org:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin domain IP is not IPv4. Please specify a domain that has an IPv4 address.
                      example:
                      - The domain name's IP is not IPv4. Please use another domain name.
    OriginSourceInvalidError:
      title: Port origin source value is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                ':origin.example.com:':
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source value is incorrect. Origin source must be a valid IP address or valid domain name. Please specify valid source value.
                      example:
                      - The origin source value is invalid. Please specify an IP address or valid domain name.
    OriginSourceIsRequiredError:
      title: Origin must have a source
      type: object
      properties:
        errors:
          type: object
          properties:
            source:
              type: array
              items:
                type: string
              description: Source is a mandatory field. Please specify it.
              example:
              - This field is required.
    OriginSourceMustBeUniqueError:
      title: Origin source must be unique
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source is already used in this origin group. Make sure that all specified origins have different sources.
                      example:
                      - The field origin source must be unique inside group of origins.
    OriginSourceNotResolvedError:
      title: Origin source must be registered domain
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source cannot be resolved. Please use a registered domain as the origin source.
                      example:
                      - The domain name cannot be resolved. Please specify a valid domain name.
    OriginSourcePrivateNetworkError:
      title: Origin source belongs to private network
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                192.168.0.1:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source belongs to a private network. Please specify the origin source that belongs to a public network.
                      example:
                      - The domain name's IP belongs to a private network. Please use another domain name.
    OriginSourceShouldNotHavePortError:
      title: Origin source cannot have port
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.com:8000:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: Resource linked to the origin group uses 'MATCH' as the originProtocol field value. So the origin source cannot have a port. Please specify the origin source without the port.
                      example:
                      - Origin source shouldn`t have specified port, some resources that linked to origin group {resource_id} have an origin protocol = 'MATCH'.
    OriginSourceWithoutPathError:
      title: Origin source contains slash
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.com/path:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source contains a slash ('/'). Specify the source without slashes and try again.
                      example:
                      - Source should be specified without path
    OriginSourceWithoutSchemaError:
      title: Origin source contains schema
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                https://origin.example.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The specified origin source contains a schema (https:// or http://). Specify the source without schema and try again.
                      example:
                      - Source should be specified without schema
    OriginSourceWrongPortError:
      title: Port value is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                192.0.2.10:99999:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: The port value specified after ':' is incorrect. It must be a number within the range 1 and 65535. Please specify valid port value.
                      example:
                      - The port value must be a number within the range 1 and 65535
    OriginTypeRequiredForNewS3Error:
      title: origin_type is required for new S3 sources on update
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: object
                properties:
                  origin_type:
                    type: array
                    items:
                      type: string
                    description: Provide `origin_type` explicitly when adding new S3 sources to an existing origin group.
                    example:
                    - No existing S3 source with bucket "my-bucket". Provide origin_type explicitly for new S3 sources.
    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
    PatchLogsUploaderConfig:
      properties:
        enabled:
          type: boolean
          description: Enables or disables the config.
        name:
          type: string
          description: Name of the config.
        policy:
          type: integer
          description: ID of the policy that should be assigned to given config.
        target:
          type: integer
          description: ID of the target to which logs should be uploaded.
        for_all_resources:
          type: boolean
          description: |-
            If set to true, the config will be applied to all CDN resources.
            If set to false, the config will be applied to the resources specified in the `resources` field.
        resources:
          type: array
          items:
            type: integer
          description: List of resource IDs to which the config should be applied.
    PatchLogsUploaderPolicy:
      type: object
      properties:
        include_empty_logs:
          type: boolean
          description: Include empty logs in the upload.
        include_shield_logs:
          type: boolean
          description: Include logs from origin shielding in the upload.
        name:
          type: string
          description: Name of the policy.
          maxLength: 255
        description:
          type: string
          description: Description of the policy.
          maxLength: 255
        retry_interval_minutes:
          type: integer
          description: Interval in minutes to retry failed uploads.
          maximum: 60
          minimum: 5
        rotate_interval_minutes:
          type: integer
          description: Interval in minutes to rotate logs.
          maximum: 60
          minimum: 5
        rotate_threshold_mb:
          type: integer
          description: Threshold in MB to rotate logs.
          minimum: 100
          nullable: true
        rotate_threshold_lines:
          type: integer
          description: Threshold in lines to rotate logs.
          maximum: 10000
          minimum: 0
        date_format:
          type: string
          description: Date format for logs.
          maxLength: 255
        field_delimiter:
          type: string
          description: Field delimiter for logs.
          maxLength: 10
        field_separator:
          type: string
          description: Field separator for logs.
          minLength: 1
          maxLength: 10
        fields:
          type: array
          items:
            type: string
            maxLength: 255
          description: List of fields to include in logs. Duplicate names are allowed for plain text output, but rejected when `format_type` is `json` or a `field_remap` is set (each field becomes a distinct output key).
        file_name_template:
          type: string
          description: Template for log file name.
          maxLength: 255
        format_type:
          type: string
          enum:
          - json
          - ''
          description: |-
            Format type for logs.

            Possible values:
            - **""** - empty, it means it will apply the format configurations from the policy.
            - **"json"** - output the logs as json lines.
          maxLength: 255
        tags:
          type: object
          description: Tags allow for dynamic decoration of logs by adding predefined fields to the log format. These tags serve as customizable key-value pairs that can be included in log entries to enhance context and readability.
          additionalProperties:
            type: string
            maxLength: 50
        field_remap:
          type: object
          description: Per-field output-name remap for exported logs. Maps a canonical Gcore field name (from `/cdn/logs_uploader/policies/fields`, and must be present in `fields`) to the field name it should have in the exported logs. Unmapped fields keep their canonical name. Output names (after remapping) must be unique.
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 255
        field_conversions:
          $ref: '#/components/schemas/FieldConversions'
        escape_special_characters:
          type: boolean
          description: |-
            When set to true, the service sanitizes string values by escaping characters that may be unsafe for transport, logging, or downstream processing.

            The following categories of characters are escaped:
            - Control and non-printable characters
            - Quotation marks and escape characters
            - Characters outside the standard ASCII range

            The resulting output contains only printable ASCII characters.
        log_sample_rate:
          type: number
          format: float
          description: |-
            Sampling rate for logs. A value between 0 and 1 that determines the fraction of log entries to collect.

            - **1** - collect all logs (default).
            - **0.5** - collect approximately 50% of logs.
            - **0** - collect no logs (effectively disables logging without removing the policy).
          minimum: 0
          maximum: 1
      example:
        include_empty_logs: true
        include_shield_logs: true
        name: Policy
        description: New policy
        retry_interval_minutes: 32
        rotate_interval_minutes: 32
        rotate_threshold_mb: 252
        rotate_threshold_lines: 5000
        date_format: '[02/Jan/2006:15:04:05 -0700]'
        field_delimiter: ','
        field_separator: ;
        fields:
        - remote_addr
        - status
        file_name_template: '{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz'
        format_type: json
        tags: {}
        field_remap: {}
        field_conversions: {}
        log_sample_rate: 0.5
    PatchLogsUploaderTarget:
      type: object
      properties:
        storage_type:
          type: string
          enum:
          - s3_gcore
          - s3_amazon
          - s3_oss
          - s3_other
          - s3_v1
          - ftp
          - sftp
          - http
          - azure_blob
          - sls
          description: Type of storage for logs.
        name:
          type: string
          description: Name of the target.
          maxLength: 255
        description:
          type: string
          description: Description of the target.
          maxLength: 255
        config:
          $ref: '#/components/schemas/LogsUploaderTargetPatchConfig'
    PatchResource:
      type: object
      properties:
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name-2'
        description:
          $ref: '#/components/schemas/description'
        secondaryHostnames:
          $ref: '#/components/schemas/secondaryHostnames'
        originGroup:
          $ref: '#/components/schemas/originGroup'
        originProtocol:
          $ref: '#/components/schemas/originProtocol'
        sslEnabled:
          $ref: '#/components/schemas/sslEnabled'
        sslData:
          $ref: '#/components/schemas/sslData'
        proxy_ssl_enabled:
          $ref: '#/components/schemas/proxy_ssl_enabled'
        proxy_ssl_ca:
          $ref: '#/components/schemas/proxy_ssl_ca'
        proxy_ssl_data:
          $ref: '#/components/schemas/proxy_ssl_data'
        options:
          type: object
          $ref: '#/components/schemas/resource_options'
    PatchRule:
      type: object
      properties:
        active:
          $ref: '#/components/schemas/active-2'
        name:
          $ref: '#/components/schemas/name-3'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        originGroup:
          $ref: '#/components/schemas/originGroup-2'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
    PatchRuleTemplate:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/name-4'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
    Path:
      type: string
      description: Request URL.
    PathsNotProvidedPurgeError:
      title: Paths not provided
      type: object
      properties:
        errors:
          type: object
          properties:
            paths:
              type: array
              description: The field "paths" is not set. Define "paths" field in request body.
              items:
                type: string
              example:
              - This field is required.
    PresetListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/PresetResponse'
        example:
        - id: 42
          name: Static content acceleration
          service: cdn
          object_type: CDNResource
          preset_settings:
            options:
              gzipOn:
                enabled: true
                value: true
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/PresetResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 42
            name: Static content acceleration
            service: cdn
            object_type: CDNResource
            preset_settings:
              options:
                gzipOn:
                  enabled: true
                  value: true
    PresetResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id-5'
        name:
          $ref: '#/components/schemas/name-5'
        service:
          $ref: '#/components/schemas/service-2'
        object_type:
          $ref: '#/components/schemas/object_type'
        preset_settings:
          $ref: '#/components/schemas/preset_settings'
    Previous:
      type: string
      description: URL to the previous activity logs records slice.
    PrimaryResourceDeletionFailed:
      title: It's a primary resource
      type: object
      properties:
        errors:
          type: array
          description: |-
            This resource is used as primary for common cache feature and cannot be deleted.
            Please delete linked resources first.
          items:
            type: string
          example:
          - The CDN resource is used as primary for common cache feature and can not be deleted. Delete linked resources first [29]
    PurgeStatusResponse:
      type: object
      properties:
        purge_id:
          $ref: '#/components/schemas/purge_id'
        status:
          $ref: '#/components/schemas/status-2'
        resource:
          $ref: '#/components/schemas/resource'
        payload:
          $ref: '#/components/schemas/payload'
        created:
          $ref: '#/components/schemas/created-2'
        purge_type:
          $ref: '#/components/schemas/purge_type'
    PurgeStatusesListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/PurgeStatusResponse'
        example:
        - purge_id: 1
          status: Successful
          resource:
            id: 1
            cname: cdn.example.com
          payload:
            urls:
            - http://cdn.example.com/path1/file1.jpg
            - http://cdn.example.com/path-18/file2.jpg
          created: '2021-10-29T13:21:01.550849Z'
          purge_type: purge_by_url
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/PurgeStatusResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - purge_id: 1
            status: Successful
            resource:
              id: 1
              cname: cdn.example.com
            payload:
              urls:
              - http://cdn.example.com/path1/file1.jpg
              - http://cdn.example.com/path-18/file2.jpg
            created: '2021-10-29T13:21:01.550849Z'
            purge_type: purge_by_url
    PutLogsUploaderTarget:
      oneOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetS3Gcore'
      - $ref: '#/components/schemas/PutLogsUploaderTargetS3Amazon'
      - $ref: '#/components/schemas/PutLogsUploaderTargetS3OSS'
      - $ref: '#/components/schemas/PutLogsUploaderTargetS3Other'
      - $ref: '#/components/schemas/PutLogsUploaderTargetS3V1'
      - $ref: '#/components/schemas/PutLogsUploaderTargetFTP'
      - $ref: '#/components/schemas/PutLogsUploaderTargetSFTP'
      - $ref: '#/components/schemas/PutLogsUploaderTargetHTTP'
      - $ref: '#/components/schemas/PutLogsUploaderTargetAzureBlob'
      - $ref: '#/components/schemas/PutLogsUploaderTargetSLS'
      discriminator:
        propertyName: storage_type
        mapping:
          s3_gcore: '#/components/schemas/PutLogsUploaderTargetS3Gcore'
          s3_amazon: '#/components/schemas/PutLogsUploaderTargetS3Amazon'
          s3_oss: '#/components/schemas/PutLogsUploaderTargetS3OSS'
          s3_other: '#/components/schemas/PutLogsUploaderTargetS3Other'
          s3_v1: '#/components/schemas/PutLogsUploaderTargetS3V1'
          ftp: '#/components/schemas/PutLogsUploaderTargetFTP'
          sftp: '#/components/schemas/PutLogsUploaderTargetSFTP'
          http: '#/components/schemas/PutLogsUploaderTargetHTTP'
          azure_blob: '#/components/schemas/PutLogsUploaderTargetAzureBlob'
          sls: '#/components/schemas/PutLogsUploaderTargetSLS'
    PutLogsUploaderTargetAzureBlob:
      title: Azure Blob Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - azure_blob
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/AzureBlobConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetBase:
      type: object
      properties:
        name:
          type: string
          description: Name of the target.
          maxLength: 255
          default: Target
        description:
          type: string
          description: Description of the target.
          maxLength: 255
    PutLogsUploaderTargetFTP:
      title: FTP Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - ftp
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/FTPConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetHTTP:
      title: HTTP Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - http
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/HTTPConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetS3Amazon:
      title: S3 Amazon Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_amazon
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3AmazonConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetS3Gcore:
      title: S3 Gcore Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_gcore
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/LogsUploaderS3GcoreTargetPutConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetS3OSS:
      title: S3 OSS Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_oss
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3OSSConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetS3Other:
      title: S3 Other Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_other
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3OtherConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetS3V1:
      title: S3 V1 Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - s3_v1
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/S3V1Config'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetSFTP:
      title: SFTP Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - sftp
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/SFTPConfig'
        required:
        - storage_type
        - config
    PutLogsUploaderTargetSLS:
      title: SLS Target
      allOf:
      - $ref: '#/components/schemas/PutLogsUploaderTargetBase'
      - type: object
        properties:
          storage_type:
            type: string
            enum:
            - sls
            description: Type of storage for logs.
          config:
            $ref: '#/components/schemas/SLSConfig'
        required:
        - storage_type
        - config
    QueryParams:
      type: string
      description: Request parameters.
    RemoteIPAddress:
      type: string
      description: IP address from which the request was made.
    ReplaceFieldConversion:
      type: object
      additionalProperties: false
      required:
      - type
      - config
      properties:
        type:
          type: string
          enum:
          - replace
        config:
          $ref: '#/components/schemas/ReplaceFieldConversionConfig'
    ReplaceFieldConversionConfig:
      type: object
      additionalProperties: false
      required:
      - values
      properties:
        values:
          type: object
          minProperties: 1
          maxProperties: 50
          description: Exact, case-sensitive replacements, matched and written without trimming. Keys must not be empty and are limited to 255 characters; values are limited to 100 characters and may be empty.
          additionalProperties:
            type: string
            maxLength: 100
        default:
          type: string
          maxLength: 100
          description: Value used when the input does not match any key in `values`.
    RequestedAt:
      type: string
      description: Date and time when the request was made.
    ResourceListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/ResourceResponse'
        example:
        - id: 220
          cname: cdn.example.com
          active: true
          enabled: true
          status: active
          deleted: false
          client: 170
          name: My resource
          description: Resource for images
          created: '2017-06-10T10:30:04.954354Z'
          updated: '2017-06-10T10:35:04.954354Z'
          originGroup: 80
          originGroup_name: Resource origin group
          originProtocol: HTTP
          secondaryHostnames:
          - cdn1.example.com
          - cdn2.example.com
          shielded: false
          shield_dc: null
          shield_enabled: false
          shield_routing_map: null
          sslEnabled: true
          sslData: 100
          proxy_ssl_enabled: false
          proxy_ssl_ca: null
          proxy_ssl_data: null
          preset_applied: false
          vp_enabled: false
          full_custom_enabled: false
          can_purge_by_urls: true
          suspend_date: null
          suspended: false
          primary_resource: null
          is_primary: null
          waap_domain_id: null
          rules: []
          options: {}
        - id: 222
          deleted: true
          client: 170
          status: deleted
          updated: '2021-06-07T12:23:44.978506Z'
          cname: www.example.com
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/ResourceResponse'
        example:
          count: 2
          next: null
          previous: null
          results:
          - id: 220
            cname: cdn.example.com
            active: true
            enabled: true
            status: active
            deleted: false
            client: 170
            name: My resource
            description: Resource for images
            created: '2017-06-10T10:30:04.954354Z'
            updated: '2017-06-10T10:35:04.954354Z'
            originGroup: 80
            originGroup_name: Resource origin group
            originProtocol: HTTP
            secondaryHostnames:
            - cdn1.example.com
            - cdn2.example.com
            shielded: false
            shield_dc: null
            shield_enabled: false
            shield_routing_map: null
            sslEnabled: true
            sslData: 100
            proxy_ssl_enabled: false
            proxy_ssl_ca: null
            proxy_ssl_data: null
            preset_applied: false
            vp_enabled: false
            full_custom_enabled: false
            can_purge_by_urls: true
            suspend_date: null
            suspended: false
            primary_resource: null
            is_primary: null
            waap_domain_id: null
            rules: []
            options: {}
    ResourcePrefetch:
      type: object
      properties:
        paths:
          type: array
          description: |-
            Paths to files that should be pre-populated to the CDN.

            Paths to the files should be specified without a domain name.
          items:
            type: string
          example:
          - /test.jpg
          - test1.jpg
      required:
      - paths
    ResourcePurge:
      oneOf:
      - type: object
        title: Purge by URL
        properties:
          urls:
            type: array
            items:
              type: string
            description: |-
              **Purge by URL** clears the cache of a specific files. This purge type is recommended.

              Specify file URLs including query strings. URLs should start with / without a domain name.

              Purge by URL depends on the following CDN options:

              1. "vary response header" is used. If your origin serves variants of the same content depending on the Vary HTTP response header, purge by URL will delete only one version of the file.
              2. "slice" is used. If you update several files in the origin without clearing the CDN cache, purge by URL will delete only the first slice (with bytes=0… .)
              3. "ignoreQueryString" is used. Don’t specify parameters in the purge request.
              4. "query_params_blacklist" is used. Only files with the listed in the option parameters will be cached as different objects. Files with other parameters will be cached as one object. In this case, specify the listed parameters in the Purge request. Don't specify other parameters.
              5. "query_params_whitelist" is used. Files with listed in the option parameters will be cached as one object. Files with other parameters will be cached as different objects. In this case, specify other parameters (if any) besides the ones listed in the purge request.
        example:
          urls:
          - /some-url.jpg
          - /img/example.jpg
      - type: object
        title: Purge by pattern
        properties:
          paths:
            type: array
            items:
              type: string
            description: |-
              **Purge by pattern** clears the cache that matches the pattern.

              Use * operator, which replaces any number of symbols in your path. It's important to note that wildcard usage (*) is permitted only at the end of a pattern.

              Query string added to any patterns will be ignored, and purge request will be processed as if there weren't any parameters.

              Purge by pattern is recursive. Both /path and /path* will result in recursive purging, meaning all content under the specified path will be affected. As such, using the pattern /path* is functionally equivalent to simply using /path.
        example:
          paths:
          - /images/*
          - /videos/*
      - type: object
        title: Purge all cache
        properties:
          paths:
            type: array
            items:
              type: string
            description: |-
              **Purge all cache** clears the entire cache for the CDN resource.

              Specify an empty array to purge all content for the resource.

              When you purge all assets, CDN servers request content from your origin server and cause a high load. Therefore, we recommend to use purge by URL for large content quantities.
        example:
          paths: []
    ResourceResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id-2'
        cname:
          $ref: '#/components/schemas/cname'
        active:
          $ref: '#/components/schemas/active'
        enabled:
          $ref: '#/components/schemas/enabled-2'
        status:
          $ref: '#/components/schemas/status'
        deleted:
          $ref: '#/components/schemas/deleted'
        client:
          $ref: '#/components/schemas/client'
        name:
          $ref: '#/components/schemas/name-2'
        description:
          $ref: '#/components/schemas/description'
        created:
          $ref: '#/components/schemas/created'
        updated:
          $ref: '#/components/schemas/updated'
        originGroup:
          $ref: '#/components/schemas/originGroup'
        originGroup_name:
          $ref: '#/components/schemas/originGroup_name'
        originProtocol:
          $ref: '#/components/schemas/originProtocol'
        secondaryHostnames:
          $ref: '#/components/schemas/secondaryHostnames'
        shielded:
          $ref: '#/components/schemas/shielded'
        shield_dc:
          $ref: '#/components/schemas/shield_dc'
        shield_enabled:
          $ref: '#/components/schemas/shield_enabled'
        shield_routing_map:
          $ref: '#/components/schemas/shield_routing_map'
        sslEnabled:
          $ref: '#/components/schemas/sslEnabled'
        sslData:
          $ref: '#/components/schemas/sslData'
        proxy_ssl_enabled:
          $ref: '#/components/schemas/proxy_ssl_enabled'
        proxy_ssl_ca:
          $ref: '#/components/schemas/proxy_ssl_ca'
        proxy_ssl_data:
          $ref: '#/components/schemas/proxy_ssl_data'
        preset_applied:
          $ref: '#/components/schemas/preset_applied'
        vp_enabled:
          $ref: '#/components/schemas/vp_enabled'
        full_custom_enabled:
          $ref: '#/components/schemas/full_custom_enabled'
        can_purge_by_urls:
          $ref: '#/components/schemas/can_purge_by_urls'
        suspend_date:
          $ref: '#/components/schemas/suspend_date'
        suspended:
          $ref: '#/components/schemas/suspended'
        primary_resource:
          $ref: '#/components/schemas/primary_resource'
        is_primary:
          $ref: '#/components/schemas/is_primary'
        waap_domain_id:
          $ref: '#/components/schemas/waap_domain_id'
        rules:
          type: array
          readOnly: true
          items:
            type: object
            format: Rule
          description: Rules configured for the CDN resource.
          example: []
        options:
          type: object
          $ref: '#/components/schemas/resource_options'
    Results:
      type: array
      items:
        $ref: '#/components/schemas/ActivityLogsDetails'
      description: Activity logs records.
    RevokeLECert:
      type: object
      properties:
        sslData:
          type: integer
          nullable: true
          description: |-
            ID of Let's Encrypt certificate linked to the CDN resource.

            It must be **null** to revoke Let's Encrypt certificate.
          example: null
        sslEnabled:
          type: boolean
          description: |-
            Defines whether the HTTPS protocol is enabled for CDN resource.

            Possible values:
            - **true** — HTTPS is enabled for the CDN resource. SSL certificate can be linked.
            - **false** — HTTPS is disabled for the CDN resource. SSL certificate cannot be linked.

            It must be **false** to revoke the Let's Encrypt certificate.
          example: false
      required:
      - sslData
      - sslEnabled
    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
    RuleNameAlreadyExistsError:
      title: Rule with the same name already exists
      type: object
      properties:
        errors:
          type: object
          properties:
            name:
              type: array
              description: The specified name is already used by another rule of the resource. Try another name.
              items:
                type: string
              example:
              - This field should be unique.
    RulePatternAlreadyExistsError:
      title: Rule with the same pattern already exists
      type: object
      properties:
        errors:
          type: object
          properties:
            rule:
              type: array
              description: The specified pattern is already used by another rule of the resource. Try another pattern.
              items:
                type: string
              example:
              - The field rule_string must be unique.
    RulePatternError:
      title: Rule template is invalid
      type: object
      properties:
        errors:
          type: object
          properties:
            rule:
              type: array
              description: The specified pattern is not a valid regular expression. Please, check the specified pattern via https://regex101.com.
              items:
                type: string
              example:
              - Rule should be a valid regular expression - check it via https://regex101.com.
    RuleResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id-3'
        name:
          $ref: '#/components/schemas/name-3'
        active:
          $ref: '#/components/schemas/active-2'
        deleted:
          $ref: '#/components/schemas/deleted-2'
        originGroup:
          $ref: '#/components/schemas/originGroup-2'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        originProtocol:
          $ref: '#/components/schemas/originProtocol-2'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        preset_applied:
          $ref: '#/components/schemas/preset_applied-2'
        primary_rule:
          $ref: '#/components/schemas/primary_rule'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
    RuleTemplateListResponse:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/RuleTemplateResponse'
        example:
        - id: 5
          name: All images template
          client: 7
          deleted: false
          rule: /folder/images/*.png
          ruleType: 0
          weight: 1
          template: true
          default: false
          overrideOriginProtocol: HTTPS
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/RuleTemplateResponse'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 5
            name: All images template
            client: 7
            deleted: false
            rule: /folder/images/*.png
            ruleType: 0
            weight: 1
            template: true
            default: false
            overrideOriginProtocol: HTTPS
    RuleTemplateResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id-4'
        name:
          $ref: '#/components/schemas/name-4'
        client:
          $ref: '#/components/schemas/client-2'
        deleted:
          $ref: '#/components/schemas/deleted-3'
        rule:
          $ref: '#/components/schemas/rule'
        ruleType:
          $ref: '#/components/schemas/ruleType'
        weight:
          $ref: '#/components/schemas/weight'
        template:
          $ref: '#/components/schemas/template'
        default:
          $ref: '#/components/schemas/default'
        overrideOriginProtocol:
          $ref: '#/components/schemas/overrideOriginProtocol'
        options:
          type: object
          $ref: '#/components/schemas/rule_options'
    S3AmazonConfig:
      title: S3 Amazon Config
      allOf:
      - $ref: '#/components/schemas/BaseS3Config'
      required:
      - access_key_id
      - secret_access_key
      - bucket_name
      - region
    S3AmazonConfigResponse:
      title: S3 Amazon Config
      properties:
        access_key_id:
          type: string
        region:
          type: string
        bucket_name:
          type: string
        directory:
          type: string
          nullable: true
    S3BucketNameDuplicateError:
      title: S3 sources must be distinct within origin group
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                my-bucket:
                  type: object
                  properties:
                    config:
                      type: array
                      items:
                        type: string
                      description: 'Two S3 sources can share a bucket name when they reach it through different storages: an `amazon` source alongside an `other` source, two `other` sources with different `s3_storage_hostname` values, sources bound to different Gcore Object Storages, or a source bound to a Gcore Object Storage alongside an `amazon` or `other` source. Sources reaching the same storage must use different bucket names.'
                      example:
                      - The S3 bucket name must be unique inside group of origins.
    S3Config:
      type: object
      description: |-
        S3 storage configuration. Required when `origin_type` is `s3`.

        To use your Gcore Object Storage as the origin, set `s3_type` to `gcore` and send only
        `storage_id` and `s3_bucket_name`. The CDN configures the connection for you, and the
        response returns only `s3_type`, `storage_id`, `s3_bucket_name` and `s3_auth_type`. For
        such an origin:
        - The CDN pulls content over HTTPS, regardless of the resource's `originProtocol`.
        - The CDN has read-only access to the bucket.
        - The CDN manages the Host header sent to the storage, so `host_header_override` is not
          accepted and is returned as `null`.
      properties:
        s3_type:
          type: string
          enum:
          - amazon
          - other
          - gcore
          description: |-
            Storage type compatible with S3.

            Possible values:
            - **amazon** - AWS S3 storage.
            - **other** - Other (not AWS) S3 compatible storage.
            - **gcore** - Your Gcore Object Storage. Select the storage and bucket, and the CDN
              configures the connection.
        storage_id:
          type: integer
          minimum: 1
          description: |-
            ID of your Gcore Object Storage.

            The parameter is required if `s3_type` is `gcore`, and not allowed otherwise. The
            storage must be active and of the Standard type.
          example: 123
        s3_bucket_name:
          type: string
          maxLength: 256
          pattern: ^[A-Za-z0-9_.:-]+$
          description: |-
            S3 bucket name.

            If `s3_type` is `gcore`, the bucket must exist in the selected storage.
        s3_region:
          type: string
          nullable: true
          description: |-
            S3 storage region.

            The parameter is required if `s3_type` is `amazon`. Not allowed if `s3_type` is
            `gcore`: the CDN fills it and does not return it.
        s3_storage_hostname:
          type: string
          nullable: true
          description: |-
            S3 storage hostname.

            The parameter is required if `s3_type` is `other`. Not allowed if `s3_type` is
            `gcore`: the CDN fills it and does not return it.

            Must be a public address: private and reserved IP addresses, `localhost`, and hostnames that resolve to them are rejected.
        s3_access_key_id:
          type: string
          maxLength: 255
          description: |-
            Access key ID for the S3 account. Masked as `SECRET_VALUE` in responses.

            The parameter is required if `s3_type` is `amazon` or `other`. Not allowed if
            `s3_type` is `gcore`: the CDN fills it and does not return it.

            Restrictions:
            - Latin letters (A-Z, a-z), numbers (0-9), colon, dash, and underscore.
            - From 4 to 255 characters.
        s3_secret_access_key:
          type: string
          maxLength: 255
          description: |-
            Secret access key for the S3 account. Masked as `SECRET_VALUE` in responses.

            The parameter is required if `s3_type` is `amazon` or `other`. Not allowed if
            `s3_type` is `gcore`: the CDN fills it and does not return it.

            Restrictions:
            - Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes, colons and underscores.
            - From 16 to 255 characters.
        s3_auth_type:
          type: string
          description: S3 authentication type.
          default: awsSignatureV4
          example: awsSignatureV4
      required:
      - s3_type
      - s3_bucket_name
      example:
        s3_type: amazon
        s3_bucket_name: example-bucket
        s3_region: eu-west-1
        s3_access_key_id: EXAMPLEFODNN7EXAMPLE
        s3_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        s3_auth_type: awsSignatureV4
    S3ConfigRequiredError:
      title: S3 config is required when origin_type is s3
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: object
                properties:
                  config:
                    type: array
                    items:
                      type: string
                    description: The config field is required when `origin_type` is s3.
                    example:
                    - This field is required.
    S3GcoreBoundConfig:
      title: S3 Gcore Bound Config
      type: object
      description: |-
        Deliver logs to a bucket in your Gcore Object Storage. Select the storage and bucket, and the
        CDN configures the connection for you.
      additionalProperties: false
      properties:
        storage_id:
          type: integer
          minimum: 1
          maximum: 2147483647
          description: ID of your Gcore Object Storage. The storage must be active and of the Standard type.
          example: 123
        bucket_name:
          type: string
          minLength: 3
          maxLength: 63
          pattern: ^[A-Za-z0-9._-]+$
          description: Name of a bucket in the selected storage.
          example: example-bucket
        directory:
          type: string
          nullable: true
          maxLength: 512
          example: raw
      required:
      - storage_id
      - bucket_name
    S3GcoreBoundConfigPatch:
      title: S3 Gcore Bound Config
      type: object
      description: |-
        Bind a target to your Gcore Object Storage, or change its bucket or storage. To bind a target
        that is not bound yet, send both `storage_id` and `bucket_name`, and set `storage_type` to
        `s3_gcore` if the target uses another storage type.
      additionalProperties: false
      properties:
        storage_id:
          $ref: '#/components/schemas/storage_id'
        bucket_name:
          $ref: '#/components/schemas/bucket_name'
        directory:
          $ref: '#/components/schemas/directory'
    S3GcoreBoundConfigPut:
      title: S3 Gcore Bound Config
      type: object
      description: |-
        `storage_id` keeps its current value when omitted. To bind a target that is not bound yet, or
        one that uses another storage type, send both `storage_id` and `bucket_name`.
      additionalProperties: false
      properties:
        storage_id:
          $ref: '#/components/schemas/storage_id'
        bucket_name:
          $ref: '#/components/schemas/bucket_name'
        directory:
          $ref: '#/components/schemas/directory'
      required:
      - bucket_name
    S3GcoreBoundConfigResponse:
      title: S3 Gcore Bound Config
      type: object
      description: |-
        A target bound to your Gcore Object Storage. The CDN manages the connection, so its settings
        are not returned.
      properties:
        storage_id:
          type: integer
          description: ID of your Gcore Object Storage.
          example: 123
        bucket_name:
          type: string
          example: example-bucket
        directory:
          type: string
          nullable: true
          example: raw
      required:
      - storage_id
      - bucket_name
    S3GcoreConfig:
      title: S3 Gcore Config
      allOf:
      - $ref: '#/components/schemas/BaseS3Config'
      - type: object
        properties:
          endpoint:
            type: string
            description: 'S3 storage endpoint URL. Must be a public address: private and reserved IP addresses, `localhost`, and hostnames that resolve to them are rejected.'
          use_path_style:
            type: boolean
            default: true
      required:
      - access_key_id
      - secret_access_key
      - bucket_name
      - endpoint
      - region
    S3GcoreConfigResponse:
      title: S3 Gcore Config
      required:
      - access_key_id
      properties:
        access_key_id:
          type: string
        region:
          type: string
        bucket_name:
          type: string
        directory:
          type: string
          nullable: true
        endpoint:
          type: string
        use_path_style:
          type: boolean
    S3OSSConfig:
      title: S3 OSS Config
      type: object
      properties:
        access_key_id:
          type: string
        secret_access_key:
          type: string
        region:
          type: string
          nullable: true
        bucket_name:
          type: string
        directory:
          type: string
          nullable: true
        endpoint:
          type: string
          nullable: true
          description: 'S3 storage endpoint URL. Must be a public address: private and reserved IP addresses, `localhost`, and hostnames that resolve to them are rejected.'
      required:
      - access_key_id
      - secret_access_key
      - bucket_name
    S3OSSConfigResponse:
      title: S3 OSS Config
      type: object
      properties:
        access_key_id:
          type: string
        region:
          type: string
          nullable: true
        bucket_name:
          type: string
        directory:
          type: string
          nullable: true
        endpoint:
          type: string
          nullable: true
    S3OtherConfig:
      title: S3 Other Config
      allOf:
      - $ref: '#/components/schemas/S3GcoreConfig'
      - type: object
        properties:
          use_path_style:
            type: boolean
            default: false
    S3OtherConfigResponse:
      title: S3 Other Config
      allOf:
      - $ref: '#/components/schemas/S3GcoreConfigResponse'
    S3SourceAmbiguousError:
      title: S3 source to update is ambiguous
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                $ref: '#/components/schemas/S3SourceAmbiguousSourceError'
    S3SourceAmbiguousSourceError:
      type: object
      properties:
        config:
          type: object
          properties:
            storage_id:
              type: array
              items:
                type: string
              description: Returned when one or more of the sources sharing the bucket name is bound to a Gcore Object Storage. Send `storage_id` to target a bound source. When the other sources sharing the name are `amazon` or `other` sources, the message also names `s3_type` or `s3_storage_hostname` for them, and those keys are returned with the same message.
              example:
              - Several S3 sources use bucket "my-bucket". Provide storage_id to identify which one.
            s3_storage_hostname:
              type: array
              items:
                type: string
              description: Several S3 sources in the group use this bucket name, so the update cannot tell which of them it targets. Send `s3_storage_hostname` to identify one.
              example:
              - Several S3 sources use bucket "my-bucket". Provide s3_storage_hostname to identify which one.
            s3_type:
              type: array
              items:
                type: string
              description: 'Returned alongside `s3_storage_hostname` when one of the sources sharing the bucket name is an `amazon` source, which no hostname can identify. Send `s3_type: amazon` to target that one; the others are identified by their host.'
              example:
              - 'Several S3 sources use bucket "my-bucket". Provide s3_type: amazon for the Amazon source, or s3_storage_hostname for the others.'
    S3SourceResponse:
      type: object
      title: S3 Source
      description: An S3 origin source.
      additionalProperties: false
      required:
      - origin_type
      - config
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/S3Config'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    S3StorageBindingChangedError:
      title: Gcore Object Storage binding changed during the update
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: A storage binding that this update keeps was changed or removed by another request while this one was being processed. Retry the request.
              example:
              - The storage binding changed while this request was being processed (storage_ids=123). Please try again.
    S3StorageBindingError:
      title: Gcore Object Storage cannot be bound
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                $ref: '#/components/schemas/S3StorageBindingSourceError'
    S3StorageBindingRetryError:
      title: Gcore Object Storage binding must be retried
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: |-
                The storage binding could not be completed when the change was saved. Retry the
                request. If the message says the storage does not exist or is not active, select
                another storage first. Possible messages:
                - `You cannot bind the storage now. Try later.`
                - `Provided storage does not exist (storage_id=123).`
                - `Provided storage is not active (storage_id=123).`
                - `Unable to validate provided storage due to internal error. Please try again.`
              example:
              - You cannot bind the storage now. Try later.
    S3StorageBindingSourceError:
      type: object
      properties:
        config:
          type: array
          items:
            type: string
          description: |-
            The selected storage or bucket cannot be used. Possible messages:
            - `You cannot use the Gcore Object Storage integration. Contact support for more info.`
            - `You do not have permission to use this storage (storage_id=123).`
            - `Provided storage does not exist (storage_id=123).`
            - `Provided storage is not active (storage_id=123).`
            - `Only Standard storages are supported by the integration (storage_id=123). Please select a Standard storage.`
            - `Provided bucket does not exist (storage_id=123, bucket=assets).`
            - `Unable to validate provided storage due to internal error. Please try again.`
            - `Cannot bind the storage right now. Please try again.`
          example:
          - Provided bucket does not exist (storage_id=123, bucket=assets).
    S3StorageBucketNameInvalidError:
      title: Bucket name for a Gcore Object Storage binding is invalid
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                $ref: '#/components/schemas/S3StorageBucketNameInvalidSourceError'
    S3StorageBucketNameInvalidSourceError:
      type: object
      properties:
        config:
          type: object
          properties:
            s3_bucket_name:
              type: array
              items:
                type: string
              description: |-
                The bucket name is missing or invalid. Possible messages:
                - `This field is required.`
                - `This field may not be null.`
                - `This field may not be blank.`
                - `Ensure this field has no more than 256 characters.`
                - `Contains invalid characters. Allowed ^[A-Za-z0-9_.:-]+$`
              example:
              - Contains invalid characters. Allowed ^[A-Za-z0-9_.:-]+$
    S3StorageHostHeaderOverrideError:
      title: Host header override is not allowed with a Gcore Object Storage binding
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                $ref: '#/components/schemas/S3StorageHostHeaderOverrideSourceError'
    S3StorageHostHeaderOverrideSourceError:
      type: object
      properties:
        host_header_override:
          type: array
          items:
            type: string
          description: The CDN manages the Host header for an origin bound to a Gcore Object Storage. Omit `host_header_override` or send `null`.
          example:
          - 'Not allowed with a storage binding: CDN fills this field from the selected storage.'
    S3StorageIdInvalidError:
      title: storage_id is invalid
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                $ref: '#/components/schemas/S3StorageIdInvalidSourceError'
    S3StorageIdInvalidSourceError:
      type: object
      properties:
        config:
          type: object
          properties:
            storage_id:
              type: array
              items:
                type: string
              description: |-
                `storage_id` is required when `s3_type` is `gcore`, and allowed only then. Possible
                messages:
                - `This field is required.`
                - `This field may not be null.`
                - `A valid integer is required.`
                - `Ensure this value is greater than or equal to 1.`
                - `Only allowed with s3_type "gcore".`
              example:
              - This field is required.
    S3StorageOwnedFieldError:
      title: Field is not allowed with a Gcore Object Storage binding
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                $ref: '#/components/schemas/S3StorageOwnedFieldSourceError'
    S3StorageOwnedFieldMessages:
      type: array
      items:
        type: string
      example:
      - 'Not allowed with a storage binding: CDN fills this field from the selected storage.'
    S3StorageOwnedFieldSourceError:
      type: object
      description: When `s3_type` is `gcore`, the CDN fills the storage endpoint, region and access credentials. Each of these fields sent in the request is returned with this error.
      properties:
        config:
          type: object
          properties:
            s3_access_key_id:
              $ref: '#/components/schemas/S3StorageOwnedFieldMessages'
            s3_secret_access_key:
              $ref: '#/components/schemas/S3StorageOwnedFieldMessages'
            s3_region:
              $ref: '#/components/schemas/S3StorageOwnedFieldMessages'
            s3_storage_hostname:
              $ref: '#/components/schemas/S3StorageOwnedFieldMessages'
    S3V1Config:
      title: S3 V1 Config
      allOf:
      - $ref: '#/components/schemas/S3OtherConfig'
    S3V1ConfigResponse:
      title: S3 V1 Config
      allOf:
      - $ref: '#/components/schemas/S3GcoreConfigResponse'
    SFTPConfig:
      title: SFTP Config
      allOf:
      - $ref: '#/components/schemas/BaseFTPConfig'
      - type: object
        properties:
          password:
            type: string
            nullable: true
          private_key:
            type: string
            nullable: true
          key_passphrase:
            type: string
            nullable: true
      required:
      - user
      - hostname
    SFTPConfigResponse:
      title: SFTP Config
      allOf:
      - $ref: '#/components/schemas/SFTPConfig'
    SLSAuthConfig:
      type: object
      properties:
        type:
          type: string
          enum:
          - ak_sk
          description: Authentication type.
        config:
          type: object
          description: Authentication credentials.
          oneOf:
          - type: object
            properties:
              access_key_id:
                type: string
                description: Alibaba access key ID.
              secret_access_key:
                type: string
                description: Alibaba secret access key.
            required:
            - access_key_id
            - secret_access_key
      required:
      - type
      - config
    SLSAuthConfigResponse:
      type: object
      properties:
        type:
          type: string
          enum:
          - ak_sk
          description: Authentication type.
        config:
          type: object
          description: Authentication credentials. Secret fields are masked with '*****'.
          oneOf:
          - type: object
            properties:
              access_key_id:
                type: string
                description: Alibaba access key ID.
              secret_access_key:
                type: string
                description: Masked secret value.
                example: '*****'
      required:
      - type
      - config
    SLSConfig:
      title: SLS Config
      allOf:
      - $ref: '#/components/schemas/BaseSLSConfig'
      - type: object
        properties:
          auth:
            $ref: '#/components/schemas/SLSAuthConfig'
      required:
      - region
      - project
      - log_store
      - auth
    SLSConfigResponse:
      title: SLS Config
      allOf:
      - $ref: '#/components/schemas/BaseSLSConfig'
      - type: object
        properties:
          auth:
            $ref: '#/components/schemas/SLSAuthConfigResponse'
    SSLCertificateUsage:
      type: object
      description: List of CDN resources and aliases using this SSL certificate.
      properties:
        resources:
          type: array
          description: CDN resources that have this certificate attached.
          items:
            type: object
            properties:
              id:
                type: integer
                description: CDN resource ID.
                example: 101
              cname:
                type: string
                description: CDN resource CNAME (primary hostname).
                example: api.example.com
              status:
                $ref: '#/components/schemas/status'
            required:
            - id
            - cname
            - status
        aliases:
          type: array
          description: Aliases that have this certificate attached, including one in the process of issuance.
          items:
            type: object
            properties:
              id:
                type: integer
                description: Alias ID.
                example: 201
              cname:
                type: string
                description: Alias hostname.
                example: shop.example.com
              status:
                $ref: '#/components/schemas/AliasStatus'
            required:
            - id
            - cname
            - status
      required:
      - resources
      - aliases
    ScaleFieldConversion:
      type: object
      additionalProperties: false
      required:
      - type
      - config
      properties:
        type:
          type: string
          enum:
          - scale
        config:
          $ref: '#/components/schemas/ScaleFieldConversionConfig'
    ScaleFieldConversionConfig:
      type: object
      additionalProperties: false
      required:
      - factor
      properties:
        factor:
          type: number
          format: double
          minimum: 1.0e-15
          maximum: 1000000000000000
          description: Multiplier applied to the field value.
        precision:
          type: integer
          minimum: 0
          maximum: 9
          nullable: true
          default: null
          description: Optional number of decimal places in the converted value. Must be specified together with `rounding`; returned as `null` when unspecified.
        rounding:
          type: string
          enum:
          - nearest
          - down
          - up
          nullable: true
          default: null
          description: Optional rounding mode. Must be specified together with `precision`; returned as `null` when unspecified.
    SecondaryCnameAlreadyExistsError:
      title: Hostname already exists
      type: object
      properties:
        errors:
          type: object
          properties:
            secondaryHostnames:
              type: string
              description: The additional CNAME is already used by another resource in our system. Try another additional CNAME or contact support.
          example:
            secondaryHostnames: Hostname cdn1.example.com already exists.
    ShieldingLocationItem:
      type: object
      properties:
        id:
          type: integer
          description: Origin shielding location ID.
        datacenter:
          type: string
          description: Name of origin shielding location datacenter.
        country:
          type: string
          description: Country of origin shielding location.
        city:
          type: string
          description: City of origin shielding location.
    ShieldingPopNotExistsError:
      title: Shielding pop does not exists
      type: object
      properties:
        errors:
          type: object
          properties:
            shielding_pop:
              type: array
              description: |-
                Probably you made a mistake in a origin shielding location ID.
                Find a request to get available origin shielding location IDs [here](/api-reference/cdn/origin-shielding/get-origin-shielding-locations).
              items:
                type: string
              example:
              - Invalid pk "{}" - object does not exist.
    SourceResponse:
      oneOf:
      - $ref: '#/components/schemas/HostSourceResponse'
      - $ref: '#/components/schemas/S3SourceResponse'
      - $ref: '#/components/schemas/FastedgeSourceResponse'
    SourcesShouldBeEnabledError:
      title: Enable at least one origin source
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                origin.example.com:
                  type: object
                  properties:
                    enabled:
                      type: array
                      items:
                        type: string
                      description: This active origin group should have one enabled origin source. Please enable one origin source.
                      example:
                      - Origin Group must have at least one active origin sources.
    StandaloneLERequestEvidence:
      type: object
      properties:
        reason:
          type: string
          nullable: true
          description: |-
            Why this attempt was opened.

            Possible values:
            - `initial` – First attempt to issue a certificate.
            - `renewal` – A scheduled renewal of an existing certificate.
            - `manual` – Manually triggered, for example via a retry.
            - `switch` – Switching from your own certificate to a Let's Encrypt certificate.
            - `extend` – Extending the set of domains covered by the certificate.
          example: initial
        challenge_type:
          type: string
          nullable: true
          description: |-
            The domain validation method this attempt uses.

            Possible values:
            - `dns_01` – Validation via a DNS record.
            - `http_01` – Validation via an HTTP request.
          example: dns_01
        requested_domains:
          type: array
          nullable: true
          description: Domains this attempt requested a certificate for.
          items:
            type: string
          example:
          - shop.example.com
        challenges:
          type: array
          description: Domain validation challenges of the latest order placed with Let's Encrypt, one per domain.
          items:
            $ref: '#/components/schemas/LEChallengeStatus'
    StateAfterRequest:
      type: object
      description: JSON representation of object after the request.
    StateBeforeRequest:
      type: object
      description: JSON representation of object before the request.
    StatusCode:
      type: integer
      description: Status code that is returned in the response.
    StreamingResourceDeletionFailed:
      title: It's a resource for the Streaming service
      type: object
      properties:
        errors:
          type: array
          description: |-
            This resource is integrated with the Streaming service and cannot be deleted.
            Please stop using the resource in the Streaming service before deletion.
          items:
            type: string
          example:
          - The CDN resource is integrated with the streaming and can not be deleted.
    TokenID:
      type: integer
      description: Permanent API token ID with which the request was made.
    UserID:
      type: integer
      description: ID of the user who made the request.
    UtilizationLevelCDNServiceError:
      type: object
      properties:
        errors:
          type: object
          properties:
            utilization_level:
              type: array
              description: The specified limit has an unacceptable value. The value must be greater than or equal to 0.
              items:
                type: string
              example:
              - Ensure this value is greater than or equal to 0.
    WildcardResourceCnameSSLLEError:
      title: Wildcard resource's cname
      type: object
      properties:
        errors:
          type: object
          properties:
            sslData:
              type: array
              items:
                type: string
              description: |-
                The resource has a wildcard additional CNAME. In this case, you can use only your own certificate
                for content delivery via HTTPS.
              example:
              - We cannot issue a Let's Encrypt certificate for a resource with a wildcard cname.
    active:
      type: boolean
      default: true
      description: |-
        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.
      example: true
    active-2:
      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
    allowedHttpMethods:
      type: object
      nullable: true
      description: HTTP methods allowed for content requests from the CDN.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
            - GET
            - HEAD
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
      required:
      - enabled
      - value
      example:
        enabled: true
        value:
        - GET
        - POST
    applied_object_id:
      type: integer
      description: ID of the object (CDN resource or rule, according to the preset `object_type`) the preset is applied to.
      example: 7531
    applied_preset_id:
      type: integer
      description: ID of the preset that is applied to the object. Matches the `preset_id` path parameter.
      example: 42
    auth:
      deprecated: true
      description: |-
        **Deprecated.** To create S3 origins, configure them directly in sources with `origin_type` and `config` instead.

        Credentials to access the private bucket.
      type: object
      properties:
        s3_type:
          type: string
          description: |-
            Storage type compatible with S3.

            Possible values:
            - **amazon** – AWS S3 storage.
            - **other** – Other (not AWS) S3 compatible storage.
        s3_access_key_id:
          type: string
          description: |-
            Access key ID for the S3 account.

            Restrictions:
            - Latin letters (A-Z, a-z), numbers (0-9), colon, dash, and underscore.
            - From 3 to 512 characters.
        s3_secret_access_key:
          type: string
          description: |-
            Secret access key for the S3 account.

            Restrictions:
            - Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes, colons and underscores.
            - If "s3_type": amazon, length should be 40 characters.
            - If "s3_type": other, length should be from 16 to 255 characters.
        s3_bucket_name:
          type: string
          maxLength: 256
          description: S3 bucket name.
        s3_storage_hostname:
          type: string
          description: |-
            S3 storage hostname.

            The parameter is required, if "s3_type": other.

            Must be a public address: private and reserved IP addresses, `localhost`, and hostnames that resolve to them are rejected.
        s3_region:
          type: string
          description: |-
            S3 storage region.

            The parameter is required, if "s3_type": amazon.
      required:
      - s3_type
      - s3_access_key_id
      - s3_secret_access_key
      - s3_bucket_name
      example:
        s3_type: amazon
        s3_access_key_id: EXAMPLEFODNN7EXAMPLE
        s3_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        s3_bucket_name: example-bucket
        s3_region: us-east-2
    auth_type_aws:
      type: string
      deprecated: true
      description: |-
        **Deprecated.** To create S3 origins, configure them directly in sources with `origin_type` and `config` instead.

        Authentication type.

        **awsSignatureV4** value is used for S3 storage.
      example: awsSignatureV4
    auth_type_none:
      type: string
      deprecated: true
      default: none
      description: |-
        **Deprecated.** No longer necessary. Defaults to `none`.

        Origin authentication type.

        Possible values:
        - **none** - Used for public origins.
        - **awsSignatureV4** - Used for S3 storage.
      example: none
    backup:
      type: boolean
      description: |-
        Defines whether the origin is a backup, meaning that it will not be used until one of active origins become unavailable.

        Possible values:
        - **true** - Origin is a backup.
        - **false** - Origin is not a backup.
      example: false
    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/enabled-3'
        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
      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/enabled-3'
        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
    bucket_name:
      type: string
      minLength: 3
      maxLength: 63
      pattern: ^[A-Za-z0-9._-]+$
      description: Name of a bucket in the selected storage.
      example: example-bucket
    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/enabled-3'
        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
    can_purge_by_urls:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: false
    client:
      type: integer
      readOnly: true
      description: ID of an account to which the CDN resource belongs.
      example: 170
    client-2:
      type: integer
      readOnly: true
      description: Client ID
      example: 7
    cname:
      type: string
      description: |-
        Delivery domains that will be used for content delivery through a CDN.

        Delivery domains should be added to your DNS settings.
      example: cdn.example.com
    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/enabled-3'
        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": ["example.com", "example.org"]`
            - **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:
          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:
        - example.com
        - example.org
        always: true
    country_acl:
      type: object
      nullable: true
      description: Enables control access to content for specified countries.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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.
      required:
      - enabled
      - policy_type
      - excepted_values
      example:
        enabled: true
        policy_type: allow
        excepted_values:
        - GB
        - DE
    created:
      type: string
      readOnly: true
      description: Date of CDN resource creation.
      example: '2017-06-10T10:30:04.954354Z'
    created-2:
      type: string
      description: Date and time when the purge was created (ISO 8601/RFC 3339 format, UTC).
      example: '2021-10-29T13:21:01.550849Z'
    default:
      type: boolean
      readOnly: true
      description: |-
        Defines whether the template is a system template developed for common cases. System templates are available to all customers.

        Possible values:
        - **true** - Template is a system template and cannot be changed by a user.
        - **false** - Template is a custom template and can be changed by a user.
      example: false
    deleted:
      type: boolean
      readOnly: true
      description: |-
        Defines whether CDN resource has been deleted.

        Possible values:
        - **true** - CDN resource is deleted.
        - **false** - CDN resource is not deleted.
      example: false
    deleted-2:
      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
    deleted-3:
      type: boolean
      readOnly: true
      description: |-
        Defines whether the template has been deleted.

        Possible values:
        - **true** - Template has been deleted.
        - **false** - Template has not been deleted.
      example: false
    description:
      type: string
      description: Optional comment describing the CDN resource.
      example: My resource
    directory:
      type: string
      nullable: true
      maxLength: 512
      example: raw
    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/enabled-3'
        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/enabled-3'
        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/enabled-3'
        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}'
        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
    enabled:
      type: boolean
      description: |-
        Enables or disables an origin source in the origin group.

        Possible values:
        - **true** - Origin is enabled and the CDN uses it to pull content.
        - **false** - Origin is disabled and the CDN does not use it to pull content.

        Origin group must contain at least one enabled origin.
      example: true
    enabled-2:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: true
    enabled-3:
      type: boolean
      description: |-
        Controls the option state.

        Possible values:
        - **true** - Option is enabled.
        - **false** - Option is disabled.
    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_headers_after_cache`, `on_request_body`, `on_response_headers`, or `on_response_body` must be specified.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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_headers_after_cache:
          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, **after 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/enabled-3'
        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/enabled-3'
        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.
      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/enabled-3'
        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/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: false
        value: false
    free_feature_item:
      title: Free feature item
      type: object
      properties:
        feature_id:
          type: integer
          description: Feature ID.
          example: 22
        name:
          type: string
          description: Feature name.
          example: Additional stats
        free_feature_id:
          type: integer
          description: Internal feature activation ID.
          example: 127
        create_date:
          type: string
          description: Date and time when the feature was activated (ISO 8601/RFC 3339 format, UTC.)
          example: '2021-01-09T08:22:13.143273Z'
    full_custom_enabled:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: false
    grpc_passthrough:
      type: object
      nullable: true
      description: Enables gRPC pass-through for the CDN resource.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    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/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    has_related_resources:
      type: boolean
      description: |-
        Defines whether the origin group has related CDN resources.

        Possible values:
        - **true** - Origin group has related CDN resources.
        - **false** - Origin group does not have related CDN resources.
      example: 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/enabled-3'
        value:
          type: string
          maxLength: 2048
          pattern: ^[a-z0-9.\-_:]*$
          description: Host Header value.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: example.com
    host_header_override:
      type: string
      nullable: true
      maxLength: 255
      description: |-
        Per-origin Host header override. When set, the CDN sends this value as the Host header when
        requesting content from this origin instead of the default.

        Not accepted for an origin bound to a Gcore Object Storage (`s3_type` is `gcore`): any
        non-null value is rejected, and the field is returned as `null` for such origins.
      example: null
    http3_enabled:
      type: object
      nullable: true
      description: |-
        Enables HTTP/3 protocol for content delivery.

        `http3_enabled` option works only with `"sslEnabled": true`.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    id:
      type: integer
      description: Origin group ID.
      example: 1
    id-2:
      type: integer
      readOnly: true
      description: CDN resource ID.
      example: 220
    id-3:
      type: integer
      readOnly: true
      description: Rule ID.
      example: 5
    id-4:
      type: integer
      readOnly: true
      description: Rule template ID.
      example: 5
    id-5:
      type: integer
      readOnly: true
      description: Preset ID.
      example: 42
    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/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: false
    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/enabled-3'
        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
    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/enabled-3'
        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.](/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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.0.2.10/32`
            - `2001:db8::8/128`
      required:
      - enabled
      - excepted_values
      - policy_type
      example:
        enabled: true
        policy_type: deny
        excepted_values:
        - 192.0.2.20/32
    is_primary:
      type: boolean
      readOnly: true
      nullable: true
      description: |-
        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.
      example: null
    limit_bandwidth:
      type: object
      nullable: true
      description: Allows to control the download speed per connection.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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
    name:
      type: string
      description: Origin group name.
      example: YourOriginGroup
    name-2:
      type: string
      nullable: true
      description: CDN resource name.
      example: Resource for images
    name-3:
      type: string
      maxLength: 255
      description: Rule name.
      example: My first rule
    name-4:
      type: string
      description: Rule template name.
      example: All images template
    name-5:
      type: string
      description: Preset name.
      example: Static content acceleration
    network_error_logging:
      type: object
      nullable: true
      description: |-
        Enables Network Error Logging (NEL) for the resource.

        When enabled, the edge instructs browsers to collect and report network
        errors (via the `Report-To` and `NEL` response headers), improving
        observability of connectivity issues for the resource.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    object_type:
      type: string
      enum:
      - CDNResource
      - Rule
      description: |-
        Type of object the preset can be applied to.

        Possible values:
        - **CDNResource** - Preset is applied to a CDN resource.
        - **Rule** - Preset is applied to a rule.
      example: CDNResource
    origin:
      type: string
      description: |-
        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.
      example: example.com
    originGroup:
      type: integer
      description: Origin group ID with which the CDN resource is associated.
      example: 132
    originGroup-2:
      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
    originGroup_create:
      type: integer
      description: |-
        Origin group ID with which the CDN resource is associated.

        Exactly one of `origin` or `originGroup` must be provided during resource creation.
      example: 132
    originGroup_name:
      type: string
      readOnly: true
      description: Origin group name.
      example: Resource origin group
    originProtocol:
      type: string
      enum:
      - HTTP
      - HTTPS
      - MATCH
      default: HTTP
      description: |-
        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.

        If an enabled origin in the resource's origin group is bound to a Gcore Object Storage (`s3_type` is `gcore`), the CDN connects to every origin in that group over HTTPS regardless of this setting.
      example: HTTPS
    originProtocol-2:
      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
    origin_type:
      type: string
      enum:
      - host
      - s3
      - fastedge
      description: |-
        Origin type. Present in responses for S3 and FastEdge sources.

        Possible values:
        - **host** - A source server or endpoint from which content is fetched.
        - **s3** - S3 storage with either AWS v4 authentication or public access.
        - **fastedge** - A FastEdge application served directly from the local FastEdge runtime on the edge node, identified by `app_id`.
      example: s3
    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.

        If an enabled origin among the origins this rule pulls from is bound to a Gcore Object Storage (`s3_type` is `gcore`), HTTPS is used regardless of this setting.
    paid_feature_item:
      title: Paid feature item
      type: object
      properties:
        feature_id:
          type: integer
          description: Feature ID.
          example: 2
        name:
          type: string
          description: Feature name.
          example: Origin shield
        paid_feature_id:
          type: integer
          description: Internal feature activation ID.
          example: 100
        create_date:
          type: string
          description: Date and time when the feature was activated (ISO 8601/RFC 3339 format, UTC.)
          example: '2021-01-29T15:21:05.165473Z'
    path:
      type: string
      deprecated: true
      description: |-
        **Deprecated.** No longer necessary. Omit this field and the default origin path behavior will be used.

        Origin path prefix.
      example: ''
    payload:
      type: object
      description: |-
        Purge payload depends on purge type.

        Possible values:
          - **urls** - Purge by URL.
          - **paths** - Purge by Pattern and purge All.
      example:
        urls:
        - http://cdn.example.com/path1/file1.jpg
        - http://cdn.example.com/path-18/file2.jpg
    preset_applied:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: false
    preset_applied-2:
      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
    preset_settings:
      type: object
      additionalProperties: true
      description: |-
        CDN resource or rule settings that the preset applies to the target object, including the **options** object.

        The available keys match the writable fields of the object type the preset targets (`object_type`).
        Options included in the preset cannot be edited on the object while the preset is applied.
      example:
        options:
          browser_cache_settings:
            enabled: true
            value: 3600s
          gzipOn:
            enabled: true
            value: true
    primary_resource:
      type: integer
      nullable: true
      description: |-
        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.
      example: null
    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
    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.
        - **$`http_x_cdn_real_host`** — the original `Host` header sent by the client. Useful for splitting cache across multiple aliases served by a single CDN resource.
        - **$`request_uri`** — the full original request URI including the query string (e.g., `/path?id=1`).
        - **$scheme** — the request scheme, either `http` or `https`.
        - **$uri** — the normalized request URI without the query string (e.g., `/path`).

        **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/enabled-3'
        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/enabled-3'
        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/enabled-3'
        value:
          type: string
          description: |-
            Timeout value in seconds.

            Supported range: **1s - 5s**.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: 4s
    proxy_next_upstream:
      description: |-
        Defines cases when the request should be passed on to the next origin.

        Possible values:
        - **error** - an error occurred while establishing a connection with the origin, passing a request to it, or reading the response header
        - **timeout** - a timeout has occurred while establishing a connection with the origin, passing a request to it, or reading the response header
        - **`invalid_header`** - a origin returned an empty or invalid response
        - **`http_403`** - a origin returned a response with the code 403
        - **`http_404`** - a origin returned a response with the code 404
        - **`http_429`** - a origin returned a response with the code 429
        - **`http_500`** - a origin returned a response with the code 500
        - **`http_502`** - a origin returned a response with the code 502
        - **`http_503`** - a origin returned a response with the code 503
        - **`http_504`** - a origin returned a response with the code 504
      type: array
      default:
      - error
      - timeout
      items:
        type: string
      example:
      - error
      - timeout
      - invalid_header
      - http_500
      - http_502
      - http_503
      - http_504
    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.

        When the option is not set, the timeout is 30 seconds.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: string
          description: |-
            Timeout value in seconds.

            Supported range: **1s - 120s**.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: 10s
    proxy_ssl_ca:
      type: integer
      nullable: true
      description: |-
        ID of the trusted CA certificate used to verify an origin.

        It can be used only with `"proxy_ssl_enabled": true`.
      example: null
    proxy_ssl_data:
      type: integer
      nullable: true
      description: |-
        ID of the SSL certificate used to verify an origin.

        It can be used only with `"proxy_ssl_enabled": true`.
      example: null
    proxy_ssl_enabled:
      type: boolean
      default: false
      description: |-
        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.
      example: false
    purge_id:
      type: integer
      description: Purge ID.
      example: 1
    purge_type:
      type: string
      description: |-
        Contains the name of the purge request type.

        Possible values:
        - **`purge_by_pattern`** - Purge by Pattern.
        - **`purge_by_url`** - Purge by URL.
        - **`purge_all`** - Purge All.
      example: purge_by_url
    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/enabled-3'
        value:
          type: array
          items:
            type: string
          description: List of query parameters.
      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/enabled-3'
        value:
          type: array
          items:
            type: string
          description: List of query parameters.
      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/enabled-3'
        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.
        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.
        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.
        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.
      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/enabled-3'
        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/enabled-3'
        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/enabled-3'
        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`
      required:
      - enabled
      - excepted_values
      - policy_type
      example:
        enabled: true
        policy_type: deny
        excepted_values:
        - example.com
        - '*.example.org'
    resource:
      type: object
      properties:
        id:
          type: integer
          description: Resource ID.
          example: 1
        cname:
          type: string
          description: CNAME of the resource.
          example: cdn.example.com
    resource_options:
      type: object
      description: |-
        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.
      properties:
        allowedHttpMethods:
          $ref: '#/components/schemas/allowedHttpMethods'
        brotli_compression:
          $ref: '#/components/schemas/brotli_compression'
        browser_cache_settings:
          $ref: '#/components/schemas/browser_cache_settings'
        cache_http_headers:
          $ref: '#/components/schemas/cache_http_headers'
        cors:
          $ref: '#/components/schemas/cors'
        country_acl:
          $ref: '#/components/schemas/country_acl'
        disable_cache:
          $ref: '#/components/schemas/disable_cache'
        disable_proxy_force_ranges:
          $ref: '#/components/schemas/disable_proxy_force_ranges'
        edge_cache_settings:
          $ref: '#/components/schemas/edge_cache_settings'
        fastedge:
          $ref: '#/components/schemas/fastedge'
        fetch_compressed:
          $ref: '#/components/schemas/fetch_compressed'
        follow_origin_redirect:
          $ref: '#/components/schemas/follow_origin_redirect'
        force_return:
          $ref: '#/components/schemas/force_return'
        forward_host_header:
          $ref: '#/components/schemas/forward_host_header'
        grpc_passthrough:
          $ref: '#/components/schemas/grpc_passthrough'
        gzipOn:
          $ref: '#/components/schemas/gzipOn'
        hostHeader:
          $ref: '#/components/schemas/hostHeader'
        http3_enabled:
          $ref: '#/components/schemas/http3_enabled'
        ignore_cookie:
          $ref: '#/components/schemas/ignore_cookie'
        ignoreQueryString:
          $ref: '#/components/schemas/ignoreQueryString'
        image_stack:
          $ref: '#/components/schemas/image_stack'
        ip_address_acl:
          $ref: '#/components/schemas/ip_address_acl'
        limit_bandwidth:
          $ref: '#/components/schemas/limit_bandwidth'
        network_error_logging:
          $ref: '#/components/schemas/network_error_logging'
        proxy_cache_key:
          $ref: '#/components/schemas/proxy_cache_key'
        proxy_cache_methods_set:
          $ref: '#/components/schemas/proxy_cache_methods_set'
        proxy_connect_timeout:
          $ref: '#/components/schemas/proxy_connect_timeout'
        proxy_read_timeout:
          $ref: '#/components/schemas/proxy_read_timeout'
        query_params_blacklist:
          $ref: '#/components/schemas/query_params_blacklist'
        query_params_whitelist:
          $ref: '#/components/schemas/query_params_whitelist'
        query_string_forwarding:
          $ref: '#/components/schemas/query_string_forwarding'
        redirect_http_to_https:
          $ref: '#/components/schemas/redirect_http_to_https'
        redirect_https_to_http:
          $ref: '#/components/schemas/redirect_https_to_http'
        referrer_acl:
          $ref: '#/components/schemas/referrer_acl'
        response_headers_hiding_policy:
          $ref: '#/components/schemas/response_headers_hiding_policy'
        rewrite:
          $ref: '#/components/schemas/rewrite'
        secure_key:
          $ref: '#/components/schemas/secure_key'
        slice:
          $ref: '#/components/schemas/slice'
        sni:
          $ref: '#/components/schemas/sni'
        stale:
          $ref: '#/components/schemas/stale'
        static_response_headers:
          $ref: '#/components/schemas/static_response_headers'
        staticHeaders:
          $ref: '#/components/schemas/staticHeaders'
        staticRequestHeaders:
          $ref: '#/components/schemas/staticRequestHeaders'
        tls_ciphers:
          $ref: '#/components/schemas/tls_ciphers'
        tls_versions:
          $ref: '#/components/schemas/tls_versions'
        use_default_le_chain:
          $ref: '#/components/schemas/use_default_le_chain'
        use_dns01_le_challenge:
          $ref: '#/components/schemas/use_dns01_le_challenge'
        use_rsa_le_cert:
          $ref: '#/components/schemas/use_rsa_le_cert'
        user_agent_acl:
          $ref: '#/components/schemas/user_agent_acl'
        waap:
          $ref: '#/components/schemas/waap'
        websockets:
          $ref: '#/components/schemas/websockets'
    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/enabled-3'
        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`
      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/enabled-3'
        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
    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
    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'
        brotli_compression:
          $ref: '#/components/schemas/brotli_compression'
        browser_cache_settings:
          $ref: '#/components/schemas/browser_cache_settings'
        cache_http_headers:
          $ref: '#/components/schemas/cache_http_headers'
        cors:
          $ref: '#/components/schemas/cors'
        country_acl:
          $ref: '#/components/schemas/country_acl'
        disable_cache:
          $ref: '#/components/schemas/disable_cache'
        disable_proxy_force_ranges:
          $ref: '#/components/schemas/disable_proxy_force_ranges'
        edge_cache_settings:
          $ref: '#/components/schemas/edge_cache_settings'
        fastedge:
          $ref: '#/components/schemas/fastedge'
        fetch_compressed:
          $ref: '#/components/schemas/fetch_compressed'
        follow_origin_redirect:
          $ref: '#/components/schemas/follow_origin_redirect'
        force_return:
          $ref: '#/components/schemas/force_return'
        forward_host_header:
          $ref: '#/components/schemas/forward_host_header'
        gzipOn:
          $ref: '#/components/schemas/gzipOn'
        hostHeader:
          $ref: '#/components/schemas/hostHeader'
        ignore_cookie:
          $ref: '#/components/schemas/ignore_cookie'
        ignoreQueryString:
          $ref: '#/components/schemas/ignoreQueryString'
        image_stack:
          $ref: '#/components/schemas/image_stack'
        ip_address_acl:
          $ref: '#/components/schemas/ip_address_acl'
        limit_bandwidth:
          $ref: '#/components/schemas/limit_bandwidth'
        proxy_cache_key:
          $ref: '#/components/schemas/proxy_cache_key'
        proxy_cache_methods_set:
          $ref: '#/components/schemas/proxy_cache_methods_set'
        proxy_connect_timeout:
          $ref: '#/components/schemas/proxy_connect_timeout'
        proxy_read_timeout:
          $ref: '#/components/schemas/proxy_read_timeout'
        query_params_blacklist:
          $ref: '#/components/schemas/query_params_blacklist'
        query_params_whitelist:
          $ref: '#/components/schemas/query_params_whitelist'
        query_string_forwarding:
          $ref: '#/components/schemas/query_string_forwarding'
        redirect_http_to_https:
          $ref: '#/components/schemas/redirect_http_to_https'
        redirect_https_to_http:
          $ref: '#/components/schemas/redirect_https_to_http'
        referrer_acl:
          $ref: '#/components/schemas/referrer_acl'
        response_headers_hiding_policy:
          $ref: '#/components/schemas/response_headers_hiding_policy'
        rewrite:
          $ref: '#/components/schemas/rewrite'
        secure_key:
          $ref: '#/components/schemas/secure_key'
        slice:
          $ref: '#/components/schemas/slice'
        sni:
          $ref: '#/components/schemas/sni'
        stale:
          $ref: '#/components/schemas/stale'
        static_response_headers:
          $ref: '#/components/schemas/static_response_headers'
        staticHeaders:
          $ref: '#/components/schemas/staticHeaders'
        staticRequestHeaders:
          $ref: '#/components/schemas/staticRequestHeaders'
        user_agent_acl:
          $ref: '#/components/schemas/user_agent_acl'
        waap:
          $ref: '#/components/schemas/waap'
        websockets:
          $ref: '#/components/schemas/websockets'
    secondaryHostnames:
      type: array
      description: |-
        Additional delivery domains (CNAMEs) that will be used to deliver content via the CDN.

        Up to ten additional CNAMEs are possible.
      items:
        type: string
        format: domain
      example:
      - first.example.com
      - second.example.com
    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/enabled-3'
        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
    service:
      description: Information about the CDN service status.
      type: object
      properties:
        enabled:
          type: boolean
          description: |-
            Defines whether the CDN service is activated.

            Possible values:
            - **true** - Service is activated.
            - **false** - Service is not activated.
          example: true
        status:
          type: string
          description: |-
            CDN service status.

            Possible values:
            - **new** - CDN service is not activated.
            - **trial** - Free trial is in progress.
            - **trialend** - Free trial has ended and CDN service is stopped. All CDN resources are suspended.
            - **activating** - CDN service is being activated. It can take up to 15 minutes.
            - **active** - CDN service is active.
            - **paused** - CDN service is stopped. All CDN resources are suspended.
            - **deleted** - CDN service is stopped. All CDN resources are deleted.
          example: active
        updated:
          type: string
          description: Date of the last CDN service status update (ISO 8601/RFC 3339 format, UTC.)
          example: '2021-02-19T15:44:44.925201Z'
    service-2:
      type: string
      enum:
      - cdn
      description: Service the preset belongs to.
      example: cdn
    shield_dc:
      type: string
      nullable: true
      readOnly: true
      description: |-
        Name of the origin shielding location data center.

        Parameter returns **null** if origin shielding is disabled.
      example: null
    shield_enabled:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: false
    shield_routing_map:
      type: integer
      readOnly: true
      nullable: true
      description: |-
        Defines whether the origin shield with a dynamic location is enabled for the CDN resource.

        To manage origin shielding, you must contact customer support.
      example: null
    shielded:
      type: boolean
      readOnly: true
      description: |-
        Defines whether origin shielding feature is enabled for the resource.

        Possible values:
        - **true** - Origin shielding is enabled.
        - **false** - Origin shielding is disabled.
      example: false
    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/enabled-3'
        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/enabled-3'
        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
    source:
      type: string
      maxLength: 255
      description: IP address or domain name of the origin and the port, if custom port is used.
      example: origin.example.com
    sources:
      description: |-
        List of origin sources in the origin group. Each entry can be a host origin or an S3 origin.

        Host origins have a `source` field with the hostname or IP. S3 origins have `origin_type: s3`
        and a `config` object with S3 credentials or a Gcore Object Storage binding. Both types can
        be mixed in the same origin group.
      type: array
      items:
        $ref: '#/components/schemas/SourceResponse'
      example:
      - source: origin.example.com
        backup: false
        enabled: true
        host_header_override: null
      - source: 192.0.2.10:5500
        backup: true
        enabled: true
        host_header_override: null
      - origin_type: s3
        config:
          s3_type: amazon
          s3_bucket_name: example-bucket
          s3_region: eu-west-1
          s3_access_key_id: SECRET_VALUE
          s3_secret_access_key: SECRET_VALUE
          s3_auth_type: awsSignatureV4
        backup: true
        enabled: true
        host_header_override: null
      - origin_type: s3
        config:
          s3_type: gcore
          storage_id: 123
          s3_bucket_name: example-bucket
          s3_auth_type: awsSignatureV4
        backup: true
        enabled: true
        host_header_override: null
    sslData:
      type: integer
      nullable: true
      default: null
      description: |-
        ID of the SSL certificate linked to the CDN resource.

        Can be used only with `"sslEnabled": true`.
      example: 192
    sslEnabled:
      type: boolean
      default: false
      description: |-
        Defines whether the HTTPS protocol enabled for content delivery.

        Possible values:
        - **true** - HTTPS is enabled.
        - **false** - HTTPS is disabled.
      example: false
    ssl_ca_add:
      type: object
      properties:
        name:
          type: string
          description: |-
            CA certificate name.

            It must be unique.
          example: Example CA cert
        sslCertificate:
          type: string
          description: |-
            Public part of the CA certificate.

            It must be in the PEM format.
          example: |
            -----BEGIN CERTIFICATE-----
            MIIC0zCCAbugAwIBAgICA+gwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwLZXhh
            bXBsZS5jb20wHhcNMjAwNjI2MTIwMzUzWhcNMjEwNjI2MTIwMzUzWjAWMRQwEgYD
            VQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
            AN4nnSfTsMEnfPgL7rkbImxZAQoND+bpPoX8q16iXZz3fFfqdRk+uEIpU3Brleeg
            p0zrrT2eI3+c2h/PRod0Fam4TO6EcfwuboUFzV3j6yw6aWdfBjWZsWBR/FoqWLYq
            b3UejN7yiTYNSiIy3zVpi9pnFM8N8qT+VGBrRDGef2v9JCzhsSSU7wAYM5HKZTp+
            WHojjiyB2hOYqft7A2WlTEDmHFa5UcPHMRZKATUYI1T2TRVqLlSiE2mJ3dFRXGM2
            ZAS33J0NVUjkx3w8RmJ7DNflEFJt/6IXdfaokVgfza7LFarrQFQP/YURXEeJT7jm
            DvKpZ/a8wu3ve6N4ykC+CBsCAwEAAaMrMCkwDwYDVR0TBAgwBgEB/wIBADAWBgNV
            HREEDzANggtleGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAovxY5lm89Eod
            L8CH3dZzIH7nv8MXtwgpv2vth4PDq2btLS8xrqm2SsA/cV+DsbDjh5CxQLoDX+8V
            g8NtY+ipOE0hdJAUo7UVlsxuAY4frkmLL1/RwpjZg+Z2NAxpR7xGWgoMn7CH481w
            AOBypAuCxcfcyyAOttdS+YMRJnpL6z8/C3W0LGkNOs26Qhu1/U8lfz1f9F4XummD
            u2SCmJsAd1PrL1shsyh4HtmFjuY698aTjYUDUleAnx7ytrGlZuLOIeoQi7tcsLJJ
            TPMbxTLgGN2HEkdJerFRBNViuWvqioEyYlzZ3MshOCR2wsL4wrXrCF0Y3cNOYcIh
            Z8z+wUAP2g==
            -----END CERTIFICATE-----
      required:
      - name
      - sslCertificate
    ssl_ca_change:
      type: object
      properties:
        name:
          type: string
          description: |-
            CA certificate name.

            It must be unique.
          example: Example CA cert 2
      required:
      - name
    ssl_ca_list_response:
      oneOf:
      - title: Plain list
        type: array
        items:
          $ref: '#/components/schemas/ssl_ca_response'
        example:
        - id: 1
          name: Example CA certificate
          deleted: true
          cert_issuer: example.com
          cert_subject_cn: example.com
          cert_subject_alt: DNS:example.com
          validity_not_before: '2020-06-26T12:03:53Z'
          validity_not_after: '2021-06-26T12:03:53Z'
          sslCertificateChain: ''
          hasRelatedResources: false
      - title: Paginated list
        allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/ssl_ca_response'
        example:
          count: 1
          next: null
          previous: null
          results:
          - id: 1
            name: Example CA certificate
            deleted: true
            cert_issuer: example.com
            cert_subject_cn: example.com
            cert_subject_alt: DNS:example.com
            validity_not_before: '2020-06-26T12:03:53Z'
            validity_not_after: '2021-06-26T12:03:53Z'
            sslCertificateChain: ''
            hasRelatedResources: false
    ssl_ca_response:
      type: object
      properties:
        id:
          type: integer
          description: CA certificate ID.
          example: 1
        name:
          type: string
          description: CA certificate name.
          example: Example CA certificate
        deleted:
          type: boolean
          description: |-
            Defines whether the certificate has been deleted. Parameter is **deprecated**.

            Possible values:
            - **true** - Certificate has been deleted.
            - **false** - Certificate has not been deleted.
          example: true
        cert_issuer:
          type: string
          description: Name of the certification center that issued the CA certificate.
          example: example.com
        cert_subject_cn:
          type: string
          description: Domain name that the CA certificate secures.
          example: example.com
        cert_subject_alt:
          type: string
          description: Alternative domain names that the CA certificate secures.
          example: DNS:example.com
        validity_not_before:
          type: string
          description: Date when the CA certificate become valid (ISO 8601/RFC 3339 format, UTC.)
          example: '2020-06-26T12:03:53Z'
        validity_not_after:
          type: string
          description: Date when the CA certificate become untrusted (ISO 8601/RFC 3339 format, UTC.)
          example: '2021-06-26T12:03:53Z'
        sslCertificateChain:
          type: string
          description: Parameter is **deprecated**.
          example: ''
        hasRelatedResources:
          type: boolean
          description: |-
            Defines whether the CA certificate is used by a CDN resource.

            Possible values:
            - **true** - Certificate is used by a CDN resource.
            - **false** - Certificate is not used by a CDN resource.
          example: false
    stale:
      type: object
      nullable: true
      description: Serves stale cached content in case of origin unavailability.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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.
      required:
      - enabled
      - value
      example:
        enabled: true
        value:
        - http_404
        - http_500
    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/enabled-3'
        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/enabled-3'
        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
    static_response_headers:
      type: object
      nullable: true
      description: Custom HTTP Headers that a CDN server adds to a response.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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
    status:
      type: string
      enum:
      - active
      - suspended
      - processed
      - deleted
      readOnly: true
      description: |-
        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.
      example: active
    status-2:
      type: string
      description: |-
        Purge status.

        Possible values:
        - **In progress** - Purge is in progress.
        - **Successful** - Purge was successful.
        - **Failed** - Purge failed.
      enum:
      - In progress
      - Successful
      - Failed
    storage_id:
      type: integer
      minimum: 1
      maximum: 2147483647
      description: ID of your Gcore Object Storage. The storage must be active and of the Standard type.
      example: 123
    suspend_date:
      type: string
      readOnly: true
      nullable: true
      description: |-
        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.
      example: null
    suspended:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: false
    template:
      type: boolean
      readOnly: true
      description: Determines whether the rule is a template.
      example: true
    tls_ciphers:
      type: object
      nullable: true
      readOnly: true
      description: |-
        Cipher suite policy for HTTPS connections from end users to the domain, selected from predefined profiles.

        The exact cipher suites the policy enforces are returned in the `ciphers` field, and each profile defines which TLS versions may be enabled together with it. While the option is active:
        - The `tls_versions` option can include only the versions the profile allows.
        - The `tls_versions` option cannot be deleted or disabled.

        The option is read-only. Contact support to change it.

        When the option is absent or disabled, the default cipher suites of the CDN are used.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        mode:
          type: string
          readOnly: true
          enum:
          - pci_dss
          description: |-
            Name of the cipher profile.

            Possible values:
            - **`pci_dss`** - TLS 1.2 cipher suites compliant with PCI DSS. Allows only `TLSv1.2` and `TLSv1.3`; TLS 1.3 connections use the protocol's own standard cipher suites, which are PCI DSS compliant.
        ciphers:
          type: array
          readOnly: true
          items:
            type: string
          description: Cipher suites the profile resolves to, in the server preference order.
      required:
      - enabled
      - mode
      example:
        enabled: true
        mode: pci_dss
        ciphers:
        - ECDHE-ECDSA-AES128-GCM-SHA256
        - ECDHE-RSA-AES128-GCM-SHA256
        - ECDHE-ECDSA-AES256-GCM-SHA384
        - ECDHE-RSA-AES256-GCM-SHA384
        - ECDHE-ECDSA-CHACHA20-POLY1305
        - ECDHE-RSA-CHACHA20-POLY1305
    tls_versions:
      type: object
      nullable: true
      description: |-
        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.

        While the `tls_ciphers` option is active on the resource, only the TLS versions its cipher profile allows can be enabled, and this option cannot be deleted or disabled.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
            - SSLv3
            - TLSv1
            - TLSv1.1
            - TLSv1.2
            - TLSv1.3
          description: List of SSL/TLS protocol versions (case sensitive).
      required:
      - enabled
      - value
      example:
        enabled: true
        value:
        - SSLv3
        - TLSv1.3
    updated:
      type: string
      readOnly: true
      description: Date of the last CDN resource update.
      example: '2017-06-14T05:05:42.065221Z'
    use_default_le_chain:
      type: object
      nullable: true
      description: |-
        Let's Encrypt certificate chain.

        The specified chain will be used during the next Let's Encrypt certificate issue or renewal.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            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.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    use_dns01_le_challenge:
      type: object
      nullable: true
      description: |-
        DNS-01 challenge to issue a Let's Encrypt certificate for the resource.

        DNS service should be activated to enable this option.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            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.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    use_next:
      type: boolean
      description: |-
        Defines whether to use the next origin from the origin group if origin responds with the cases specified in `proxy_next_upstream`.
        If you enable it, you must specify cases in `proxy_next_upstream`.

        Possible values:
        - **true** - Option is enabled.
        - **false** - Option is disabled.
      example: true
    use_rsa_le_cert:
      type: object
      nullable: true
      description: |-
        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.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - RSA Let's Encrypt certificate.
            - **false** - ECDSA Let's Encrypt certificate.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    user_agent_acl:
      type: object
      nullable: true
      description: Controls access to the content for specified User-Agents.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        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.
      required:
      - enabled
      - excepted_values
      - policy_type
      example:
        enabled: true
        policy_type: allow
        excepted_values:
        - UserAgent Value
        - ~*.*bot.*
        - ''
    utilization_level:
      type: integer
      description: |-
        CDN traffic usage limit in gigabytes.

        When the limit is reached, we will send an email notification.
      example: 1111
    vp_enabled:
      type: boolean
      readOnly: true
      description: |-
        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.
      example: false
    waap:
      type: object
      nullable: true
      description: Allows to enable WAAP (Web Application and API Protection).
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    waap_domain_id:
      type: string
      readOnly: true
      nullable: true
      description: The ID of the associated WAAP domain.
      example: '123'
    websockets:
      type: object
      nullable: true
      description: Enables or disables WebSockets connections to an origin server.
      properties:
        enabled:
          $ref: '#/components/schemas/enabled-3'
        value:
          type: boolean
          description: |-
            Possible values:
            - **true** - Option is enabled.
            - **false** - Option is disabled.
      required:
      - enabled
      - value
      example:
        enabled: true
        value: true
    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
  responses:
    Details:
      description: Successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ActivityLogsDetails'
          example:
            id: 1
            user_id: 174
            token_id: 3
            client_id: 174
            requested_at: '2021-07-07T09:02:29.871030Z'
            path: /resources/1/purge
            remote_ip_address: 192.0.2.10
            host: api.gcore.com
            method: POST
            query_params: '{}'
            data:
              paths:
              - /url-path-1
              - /url-path-2
            status_code: 201
            actions: []
    List:
      description: Successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ActivityLogsPaginatedList'
          example:
            count: 1
            next: https://api.gcore.com/cdn/activity_log/requests?offset=20&limit=10
            previous: https://api.gcore.com/cdn/activity_log/requests?offset=10&limit=10
            results:
            - id: 1
              user_id: 174
              token_id: 3
              client_id: 174
              requested_at: '2021-07-07T09:02:29.871030Z'
              path: /resources/1/purge
              remote_ip_address: 192.0.2.10
              host: api.gcore.com
              method: POST
              query_params: '{}'
              data:
                paths:
                - /url-path-1
                - /url-path-2
              status_code: 201
              actions: []
    NoPermissions:
      description: You do not have permission to perform this action.
    OriginGroupNotFound:
      description: Origin group is not found.
    ResourceNotFound:
      description: The specified CDN resource is not found in the current account.
  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
x-tagGroups:
- name: CDN API
  tags:
  - CDN service
  - CDN resources
  - Origins
  - Rules
  - Rule templates
  - Presets
  - SSL certificates
  - Let's Encrypt certificates
  - CA certificates
  - Aliases
  - CDN activity logs
  - Log viewer
  - Logs uploader
  - Tools
  - Statistics
  - Advanced analytics
  - Origin shielding
  - IP addresses list
  - Purge history
security:
- APIKey: []
