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

# Get cost report resources sorted by cost (pay-as-you-go only)

> Get a detailed cost report for a given period and specific resources, sorted by cost by default.
Requested period should not exceed 31 days. Costs and usages are always returned at full precision.

Note: This report assumes there are no active commit features in the billing plan.
If there are active commit features (pre-paid resources) in your plan, use /v1/`reservation_cost_report`/totals,
as the results from this report will not be accurate.

Data from the past hour may not reflect the full set of statistics.
For the most complete and accurate results, we recommend accessing the data at least one hour after the
relevant time period. Updates are generally available within a 24-hour window, though timing can vary.
Scheduled maintenance or other exceptions may occasionally cause delays beyond 24 hours.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/cloud_api.yaml post /cloud/v2/cost_report/resources
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud 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: 9d63a03d99da
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
  - name: Container as a Service
  - name: Cost Reports
  - name: DDoS Protection
  - name: Everywhere Inference
  - name: Everywhere Inference Apps
  - name: File Shares
  - name: Floating IPs
  - name: Function as a Service
  - name: GPU Bare Metal
  - name: GPU Virtual
  - name: IP Ranges
  - name: Images
  - name: Instances
  - name: Load Balancers
  - name: Logging
  - name: Managed Kubernetes
  - name: Managed PostgreSQL
  - name: Networks
  - name: Placement Groups
  - name: Ports
  - name: Pricing
  - name: Projects
  - name: Quotas
  - name: Regions
  - name: Registry
  - name: Reservations
  - name: Reserved IPs
  - name: Routers
  - name: SSH Keys
  - name: Secrets
  - name: Security Groups
  - name: Snapshot Schedules
  - name: Snapshots
  - name: Tasks
  - name: User Actions
  - name: User Role Assignments
  - name: Volumes
paths:
  /cloud/v2/cost_report/resources:
    post:
      tags:
        - Cost Reports
      summary: Get cost report resources sorted by cost (pay-as-you-go only)
      description: >-
        Get a detailed cost report for a given period and specific resources,
        sorted by cost by default.

        Requested period should not exceed 31 days. Costs and usages are always
        returned at full precision.


        Note: This report assumes there are no active commit features in the
        billing plan.

        If there are active commit features (pre-paid resources) in your plan,
        use /v1/`reservation_cost_report`/totals,

        as the results from this report will not be accurate.


        Data from the past hour may not reflect the full set of statistics.

        For the most complete and accurate results, we recommend accessing the
        data at least one hour after the

        relevant time period. Updates are generally available within a 24-hour
        window, though timing can vary.

        Scheduled maintenance or other exceptions may occasionally cause delays
        beyond 24 hours.
      operationId: CostReportResourcesV2Handler.post
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostReportResourcesV2RequestSerializer'
      responses:
        '200':
          description: Cost report resources
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostReportResourcesV2ResponseSerializer'
        '400':
          $ref: '#/components/responses/ProblemBadRequestWithLegacyKeys'
        '401':
          $ref: '#/components/responses/ProblemUnauthorizedWithLegacyKeys'
        '403':
          $ref: '#/components/responses/ProblemForbiddenWithLegacyKeys'
        '404':
          $ref: '#/components/responses/ProblemNotFoundWithLegacyKeys'
        '409':
          $ref: '#/components/responses/ProblemConflictWithLegacyKeys'
        '500':
          $ref: '#/components/responses/ProblemInternalServerErrorWithLegacyKeys'
        '503':
          $ref: '#/components/responses/ProblemServiceUnavailableWithLegacyKeys'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from datetime import datetime
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            cost_report_detailed = client.cloud.cost_reports.get_detailed(
                time_from=datetime.fromisoformat("2023-01-01T00:00:00"),
                time_to=datetime.fromisoformat("2023-02-01T00:00:00"),
            )
            print(cost_report_detailed.count)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cloud\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcostReportDetailed, err := client.Cloud.CostReports.GetDetailed(context.TODO(), cloud.CostReportGetDetailedParams{\n\t\tTimeFrom: time.Now(),\n\t\tTimeTo:   time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", costReportDetailed.Count)\n}\n"
components:
  schemas:
    CostReportResourcesV2RequestSerializer:
      additionalProperties: false
      properties:
        enable_last_day:
          default: false
          description: >-
            Expenses for the last specified day are taken into account. As the
            default, False.
          example: false
          examples:
            - false
          title: Enable Last Day
          type: boolean
        limit:
          default: 10
          description: >-
            The response resources limit. Defaults to 10. Maximum 1000 for the
            json format, 10000 for the `csv_records` format.
          example: 10
          examples:
            - 10
          exclusiveMinimum: 0
          maximum: 1000
          title: Limit
          type: integer
        offset:
          default: 0
          description: The response resources offset.
          example: 0
          examples:
            - 0
          minimum: 0
          title: Offset
          type: integer
        order_by:
          default:
            - cost.desc
          description: List of sorting criteria in 'field.direction' format.
          example:
            - cost.desc
          examples:
            - - cost.desc
          items:
            $ref: '#/components/schemas/CostReportV2OrderByChoices'
          title: Order By
          type: array
        project_ids:
          description: >-
            List of project IDs. Omit for all accessible projects; an empty list
            is rejected.
          example:
            - 16
            - 17
            - 18
            - 19
            - 20
          examples:
            - - 16
              - 17
              - 18
              - 19
              - 20
          items:
            type: integer
          minItems: 1
          title: Project Ids
          type: array
        region_ids:
          description: >-
            List of region IDs. Omit for all regions and global usage; an empty
            list is rejected. Use 0 for global usage that has no region.
          example:
            - 0
            - 76
          examples:
            - - 0
              - 76
          items:
            type: integer
          minItems: 1
          title: Region Ids
          type: array
        response_format:
          $ref: '#/components/schemas/CostReportResourcesResponseFormat'
          default: json
          description: 'Format of the response: json (default) or `csv_records`.'
          examples:
            - csv_records
            - json
        search:
          description: >-
            Partial, case-insensitive search over region names, project names,
            resource names, flavors and tags.
          example: amsterdam
          examples:
            - amsterdam
            - web-01
          maxLength: 256
          minLength: 2
          title: Search
          type: string
        tags:
          $ref: '#/components/schemas/TagsFilterSerializer'
          description: Filter by tags
          examples:
            - condition_type: OR
              conditions:
                - key: os_version
                  strict: true
                  value: '22.04'
                - key: os_version
                  strict: true
                  value: '23.04'
        time_from:
          description: >-
            The start date of the report period (ISO 8601). The report starts
            from the beginning of this day in UTC.
          example: '2023-01-01T00:00:00Z'
          examples:
            - '2023-01-01T00:00:00Z'
          format: date-time
          title: Time From
          type: string
        time_to:
          description: >-
            The end date of the report period (ISO 8601). The report ends just
            before the beginning of this day in UTC.
          example: '2023-02-01T00:00:00Z'
          examples:
            - '2023-02-01T00:00:00Z'
          format: date-time
          title: Time To
          type: string
        types:
          description: >-
            List of resource types. Omit for all types; an empty list is
            rejected.
          example:
            - egress_traffic
            - instance
          examples:
            - - egress_traffic
              - instance
          items:
            $ref: '#/components/schemas/PrebillingResourceTypes'
          minItems: 1
          title: Types
          type: array
      required:
        - time_from
        - time_to
      title: CostReportResourcesV2RequestSerializer
      type: object
    CostReportResourcesV2ResponseSerializer:
      properties:
        count:
          description: Count of all the resources
          example: 45
          examples:
            - 45
          minimum: 0
          title: Count
          type: integer
        price_status:
          $ref: '#/components/schemas/CostReportPriceDisplayStatus'
          description: >-
            'show' when the client may see prices, 'hide' for trial clients,
            clients with no product status, and clients of a reseller that does
            not expose prices.
        results:
          items:
            $ref: '#/components/schemas/CostReportResourcesV2ResultSerializer'
          title: Results
          type: array
      required:
        - count
        - results
        - price_status
      title: CostReportResourcesV2ResponseSerializer
      type: object
    CostReportV2OrderByChoices:
      description: >-
        v1's sort fields plus cost, renamed to say which field is actually
        sorted on.


        There is no region sort: prebilling can only order by region name, and
        the response exposes

        `region_id`, so no token here could honestly describe it.


        Tokens are flat, not response paths: flavor -> resource.flavor,
        `resource_name` -> resource.name,

        usage -> usage.value, cost -> usage.cost, `first_seen`/`last_seen` ->
        usage.`first_seen`/usage.`last_seen`.
      enum:
        - cost.asc
        - cost.desc
        - first_seen.asc
        - first_seen.desc
        - flavor.asc
        - flavor.desc
        - last_seen.asc
        - last_seen.desc
        - project_id.asc
        - project_id.desc
        - resource_name.asc
        - resource_name.desc
        - usage.asc
        - usage.desc
      title: CostReportV2OrderByChoices
      type: string
    CostReportResourcesResponseFormat:
      enum:
        - csv_records
        - json
      title: CostReportResourcesResponseFormat
      type: string
    TagsFilterSerializer:
      description: Represents a filter consisting of multiple tag filtering conditions.
      properties:
        condition_type:
          $ref: '#/components/schemas/TagsFilterConditionTypes'
          default: OR
          description: >-
            Specifies whether conditions are combined using OR (default) or AND
            logic.
        conditions:
          description: A list of tag filtering conditions defining how tags should match.
          example:
            - key: os_version
              strict: true
              value: '9'
            - key: os_type
              strict: true
              value: linux
            - key: os_distro
              strict: true
              value: centos
          examples:
            - - key: os_version
                strict: true
                value: '9'
              - key: os_type
                strict: true
                value: linux
              - key: os_distro
                strict: true
                value: centos
          items:
            $ref: '#/components/schemas/TagsFilterConditionSerializer'
          maxItems: 10
          minItems: 1
          title: Conditions
          type: array
      required:
        - conditions
      title: TagsFilterSerializer
      type: object
    PrebillingResourceTypes:
      description: Resource types for prebilling report
      enum:
        - ai_cluster
        - ai_virtual_cluster
        - backup
        - baremetal
        - basic_vm
        - containers
        - dbaas_postgresql_connection_pooler
        - dbaas_postgresql_cpu
        - dbaas_postgresql_memory
        - dbaas_postgresql_public_network
        - dbaas_postgresql_volume
        - egress_traffic
        - external_ip
        - file_share
        - floatingip
        - functions
        - functions_calls
        - functions_traffic
        - image
        - inference
        - inference_public_models
        - instance
        - load_balancer
        - log_index
        - snapshot
        - volume
      title: PrebillingResourceTypes
      type: string
    CostReportPriceDisplayStatus:
      enum:
        - error
        - hide
        - show
      title: CostReportPriceDisplayStatus
      type: string
    CostReportResourcesV2ResultSerializer:
      properties:
        error:
          anyOf:
            - $ref: '#/components/schemas/CostReportCostError'
            - type: 'null'
          description: Why the cost is missing, set only when cost is null
          examples:
            - null
        project_id:
          description: ID of the project the resource belongs to
          example: 101
          examples:
            - 101
          title: Project Id
          type: integer
        region_id:
          description: Region ID. 0 means global usage that has no region.
          example: 76
          examples:
            - 76
          title: Region Id
          type: integer
        resource:
          $ref: '#/components/schemas/CostReportResourceV2Serializer'
        usage:
          $ref: '#/components/schemas/CostReportUsageV2Serializer'
      required:
        - region_id
        - project_id
        - resource
        - usage
        - error
      title: CostReportResourcesV2ResultSerializer
      type: object
    ProblemWithLegacyKeys:
      additionalProperties: false
      description: >-
        The error body of an endpoint that was released before the problem body.
        The old keys stay

        next to the problem fields until the endpoint is removed.
      properties:
        context:
          anyOf:
            - $ref: '#/components/schemas/ProblemContext'
            - type: 'null'
          default: null
          description: >-
            Data for the `type`. Absent on a type without context keys, and on a
            `not-found` for an unknown URL.
        detail:
          description: The facts of this occurrence.
          title: Detail
          type: string
        errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProblemError'
              type: array
            - type: 'null'
          default: null
          description: >-
            One item for each invalid input. Only on `validation-error`, and
            absent when no single input is wrong.
          title: Errors
        exception_class:
          deprecated: true
          description: The old name of the error. Use `type`.
          title: Exception Class
          type: string
        hint:
          description: What to do next.
          title: Hint
          type: string
        info:
          default: null
          deprecated: true
          description: Old data about the error. Use `context`.
          title: Info
        invalid_fields:
          default: null
          deprecated: true
          description: The old list of the invalid inputs. Use `errors`.
          title: Invalid Fields
        message:
          deprecated: true
          description: The old text of the error. Use `detail`.
          title: Message
          type: string
        request_id:
          description: >-
            ID of the request. The response also sends it in the `X-Request-Id`
            header. Quote it to support.
          title: Request Id
          type: string
        status:
          description: Copy of the HTTP status code.
          title: Status
          type: integer
        title:
          description: Fixed sentence for the `type`.
          title: Title
          type: string
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            W3C trace ID from the `traceparent` of the request. Null when the
            request has no valid `traceparent`.
          title: Trace Id
        type:
          $ref: '#/components/schemas/ProblemType'
          description: >-
            Stable error code in kebab-case, such as `not-found`. Clients branch
            on it. It is not `errors[].code`, which names what is wrong with one
            input in `snake_case`, such as `not_found`.
      required:
        - type
        - title
        - status
        - detail
        - hint
        - request_id
        - trace_id
        - exception_class
        - message
      title: ProblemWithLegacyKeys
      type: object
    TagsFilterConditionTypes:
      enum:
        - AND
        - OR
      title: TagsFilterConditionTypes
      type: string
    TagsFilterConditionSerializer:
      additionalProperties: false
      properties:
        key:
          description: The name of the tag to filter (e.g., 'os_version').
          example: os_version
          examples:
            - os_version
          maxLength: 128
          minLength: 3
          title: Key
          type: string
        strict:
          description: >-
            Determines how strictly the tag value must match the specified
            value. If true, the tag value must exactly match the given value. If
            false, a less strict match (e.g., partial or case-insensitive match)
            may be applied.
          example: true
          examples:
            - true
          title: Strict
          type: boolean
        value:
          description: The value of the tag to filter (e.g., '22.04').
          example: '22.04'
          examples:
            - '22.04'
          maxLength: 256
          minLength: 3
          title: Value
          type: string
      title: TagsFilterConditionSerializer
      type: object
    CostReportCostError:
      description: >-
        Why a row has no cost. Values are the plain strings v1 has always
        returned.
      enum:
        - Multiple subscriptions
        - No tariff
      title: CostReportCostError
      type: string
    CostReportResourceV2Serializer:
      description: What the resource is.
      properties:
        flavor:
          anyOf:
            - type: string
            - type: 'null'
          description: Flavor name
          examples:
            - bm2-infrastructure-medium
          title: Flavor
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Name of the resource
          examples:
            - bm-amsterdam-1fe6
          title: Name
        tags:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          description: List of tags
          examples:
            - - os_distro: ubuntu
              - os_version: '22.04'
          title: Tags
        type:
          $ref: '#/components/schemas/PrebillingResourceTypes'
          description: Resource type
          examples:
            - baremetal
        uuid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: UUID of the resource
          examples:
            - 066e202a-fc9a-43f2-a74d-be34afbee5c9
          title: Uuid
      required:
        - type
        - uuid
        - name
        - flavor
        - tags
      title: CostReportResourceV2Serializer
      type: object
    CostReportUsageV2Serializer:
      description: How much it was used, and what that costs.
      properties:
        cost:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Cost for the requested period, never rounded. Null if there is no
            price.
          examples:
            - 163.190753
          title: Cost
        currency:
          anyOf:
            - type: string
            - type: 'null'
          description: Currency of the cost, null if there is no cost
          examples:
            - EUR
          title: Currency
        first_seen:
          description: First time the resource was seen in the given period
          example: '2026-07-17T00:00:30Z'
          examples:
            - '2026-07-17T00:00:30Z'
          format: date-time
          title: First Seen
          type: string
        last_seen:
          description: >-
            Last time the resource was seen in the given period. Earlier than
            'time_to' means the resource stopped before the period ended.
          example: '2026-07-23T23:59:30Z'
          examples:
            - '2026-07-23T23:59:30Z'
          format: date-time
          title: Last Seen
          type: string
        unit:
          description: Unit of the billing value
          example: gb_hours
          examples:
            - gb_hours
          title: Unit
          type: string
        value:
          description: >-
            Usage of the billing metric for the period, in `unit`, kept at full
            precision.
          example: 6688
          examples:
            - 6688
          title: Value
          type: number
      required:
        - value
        - unit
        - first_seen
        - last_seen
        - cost
        - currency
      title: CostReportUsageV2Serializer
      type: object
    ProblemContext:
      additionalProperties: false
      description: >-
        Data for the `type`. One flat object shared by all types. Each `type`
        always sends the same keys, and a key that the server cannot fill is
        `null`. The keys of each type:

        - `resource-in-use`: `blocking_resources`, `blocking_count`

        - `quota-exceeded`: `quotas`

        - `not-available`: `reason`, `region_id`, `resource_type`, `resource_id`

        - `permission-denied`: `operation`, `client_id`, `project_id`

        - `not-found`: `resource_type`, `resource_id`

        - `method-not-allowed`: `allowed_methods`

        - `resource-busy`: `resource_type`, `resource_id`, `resource_status`

        - `rate-limited`: `retry_after`

        - `service-unavailable`: `retry_after`

        The other types send no `context`, and neither does a `not-found` for an
        unknown URL.
      properties:
        allowed_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: Methods that the endpoint supports.
          title: Allowed Methods
        blocking_count:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Total number of blocking resources.
          title: Blocking Count
        blocking_resources:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProblemBlockingResource'
              type: array
            - type: 'null'
          default: null
          description: At most 50 resources that block the request.
          title: Blocking Resources
        client_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The account of the operation.
          title: Client Id
        operation:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Name of the operation that the credentials lack.
          title: Operation
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The project of the operation.
          title: Project Id
        quotas:
          anyOf:
            - items:
                $ref: '#/components/schemas/ProblemQuota'
              type: array
            - type: 'null'
          default: null
          description: The quotas that the request exceeds.
          title: Quotas
        reason:
          anyOf:
            - $ref: '#/components/schemas/NotAvailableReason'
            - type: 'null'
          default: null
          description: Why the resource is not available.
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The region of the error.
          title: Region Id
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: ID or name of the resource.
          title: Resource Id
        resource_status:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Current status of the resource.
          title: Resource Status
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Type of the resource, as the permissions name it, such as
            `instances`.
          title: Resource Type
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            Seconds to wait before the next request. `null` when the server
            cannot tell.
          title: Retry After
      title: ProblemContext
      type: object
    ProblemError:
      additionalProperties: false
      description: One invalid input.
      properties:
        code:
          description: >-
            What is wrong, as a code from a fixed list, such as `missing`,
            `int_parsing` or `less_than_equal`, or one of the shared codes:
            `not_unique`, `not_found`, `mutually_exclusive`, `missing_one_of`,
            `incompatible_value`, `invalid_format`, `duplicate_item`,
            `invalid_status`. Codes are only added, never renamed or removed.
            Treat an unknown code like `value_error`.
          type: string
        ctx:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: >-
            Values of the broken constraint, such as `{"le": 4096}`. Absent when
            the check has no values.
          title: Ctx
        detail:
          description: What is wrong with the input.
          title: Detail
          type: string
        loc:
          description: >-
            Path to the input. Starts with `body`, `query`, `path` or `header`.
            A query filter is the parameter, then the operator: `name[contains]`
            is `["query", "name", "contains"]`.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Loc
          type: array
      required:
        - loc
        - code
        - detail
      title: ProblemError
      type: object
    ProblemType:
      enum:
        - internal-server-error
        - method-not-allowed
        - not-available
        - not-found
        - permission-denied
        - quota-exceeded
        - rate-limited
        - resource-busy
        - resource-in-use
        - service-unavailable
        - unauthorized
        - validation-error
      title: ProblemType
      type: string
    ProblemBlockingResource:
      additionalProperties: false
      description: One resource that blocks the request.
      properties:
        resource_id:
          description: ID of the blocking resource.
          title: Resource Id
          type: string
        resource_name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Name of the blocking resource.
          title: Resource Name
        resource_type:
          description: >-
            Type of the blocking resource, as the permissions name it, such as
            `ports`.
          title: Resource Type
          type: string
      required:
        - resource_type
        - resource_id
      title: ProblemBlockingResource
      type: object
    ProblemQuota:
      additionalProperties: false
      description: One quota that the request exceeds.
      properties:
        available:
          anyOf:
            - type: integer
            - type: number
          description: '`limit` minus `usage`.'
          title: Available
        limit:
          anyOf:
            - type: integer
            - type: number
          description: The limit of the quota.
          title: Limit
        name:
          description: Quota name, such as `vm_count`.
          title: Name
          type: string
        overflow:
          anyOf:
            - type: integer
            - type: number
          description: 'The amount above the limit: `resulting_usage` minus `limit`.'
          title: Overflow
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Region of a regional quota. `null` for a global quota, or when
            unknown.
          title: Region Id
        requested:
          anyOf:
            - type: integer
            - type: number
          description: The amount that the request adds.
          title: Requested
        resulting_usage:
          anyOf:
            - type: integer
            - type: number
          description: 'The usage after the request: `usage` plus `requested`.'
          title: Resulting Usage
        scope:
          anyOf:
            - $ref: '#/components/schemas/QuotaScope'
            - type: 'null'
          description: >-
            `regional` for a quota of one region, `global` for a quota of the
            account. `null` when the server cannot tell.
        unit:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Unit of the numbers, such as `MiB`, `GiB` or `bytes`. `null` for a
            quota that counts items.
          title: Unit
        usage:
          anyOf:
            - type: integer
            - type: number
          description: The usage before the request.
          title: Usage
      required:
        - name
        - scope
        - region_id
        - limit
        - usage
        - available
        - requested
        - resulting_usage
        - overflow
        - unit
      title: ProblemQuota
      type: object
    NotAvailableReason:
      enum:
        - account
        - balance
        - capacity
        - plan
        - region
      title: NotAvailableReason
      type: string
    QuotaScope:
      enum:
        - global
        - regional
      title: QuotaScope
      type: string
  responses:
    ProblemBadRequestWithLegacyKeys:
      description: >-
        The request cannot succeed as it is. `type` is `validation-error`,
        `resource-in-use`, `quota-exceeded` or `not-available`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemUnauthorizedWithLegacyKeys:
      description: The request has no valid credentials. `type` is `unauthorized`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemForbiddenWithLegacyKeys:
      description: >-
        The credentials do not permit the operation, or another service manages
        the resource. `type` is `permission-denied`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemNotFoundWithLegacyKeys:
      description: The resource or the URL does not exist. `type` is `not-found`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemConflictWithLegacyKeys:
      description: >-
        The resource is in a transient state. `type` is `resource-busy`. Send
        the same request again after the `Retry-After` seconds.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
    ProblemInternalServerErrorWithLegacyKeys:
      description: >-
        The server cannot complete the request. `type` is
        `internal-server-error`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
    ProblemServiceUnavailableWithLegacyKeys:
      description: >-
        The service is down for a known reason, such as planned maintenance.
        `type` is `service-unavailable`. A 503 without the
        `application/problem+json` media type, and every 502 and 504, comes from
        the gateway and has no problem body.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemWithLegacyKeys'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Content-Language:
          $ref: '#/components/headers/ContentLanguage'
  headers:
    RequestId:
      description: The ID of the request, the same as `request_id` in the body.
      schema:
        type: string
    ContentLanguage:
      description: >-
        The language of `title`, `detail`, `hint` and `errors[].detail`, from
        the `Accept-Language` of the request. Any other field is the same in
        every language.
      schema:
        type: string
        enum:
          - en
          - de
          - ru
          - az
          - zh
    RetryAfter:
      description: >-
        The number of seconds to wait before the client sends the same request
        again.
      schema:
        type: integer
        minimum: 0
        maximum: 60
  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

````